## Summary
Define API response Zod schemas in common-utils for alerts, webhooks, team, installation, and me endpoints. Apply Response<T> typing on backend route handlers with explicit Mongoose-to-JSON serialization (ObjectId, Date, Map). Replace all `any` types and `as Promise<T>` casts in frontend TanStack Query hooks with proper generics.
### How to test locally or on Vercel
1. `yarn dev`
2. Interact with app, ensuring nothing is broken
### References
- Linear Issue: HDX-3464
## Summary
This PR is the first step towards raw SQL-driven charts.
- It introduces updated ChartConfig types, which are now unions of `BuilderChartConfig` (which is unchanged from the current `ChartConfig` types` and `RawSqlChartConfig` types which represent sql-driven charts.
- It adds _very basic_ support for SQL-driven tables in the Chart Explorer and Dashboard pages. This is currently behind a feature toggle and enabled only in preview environments and for local development.
The changes in most of the files in this PR are either type updates or the addition of type guards to handle the new ChartConfig union type.
The DBEditTimeChartForm has been updated significantly to (a) add the Raw SQL option to the table chart editor and (b) handle conversion from internal form state (which can now include properties from either branch of the ChartConfig union) to valid SavedChartConfigs (which may only include properties from one branch).
Significant changes are in:
- packages/app/src/components/ChartEditor/types.ts
- packages/app/src/components/ChartEditor/RawSqlChartEditor.tsx
- packages/app/src/components/ChartEditor/utils.ts
- packages/app/src/components/DBEditTimeChartForm.tsx
- packages/app/src/components/DBTableChart.tsx
- packages/app/src/components/SQLEditor.tsx
- packages/app/src/hooks/useOffsetPaginatedQuery.tsx
Future PRs will add templating to the Raw SQL driven charts for date range and granularity injection; support for other chart types driven by SQL; improved placeholder, validation, and error states; and improved support in the external API and import/export.
### Screenshots or video
https://github.com/user-attachments/assets/008579cc-ef3c-496e-9899-88bbb21eaa5e
### How to test locally or on Vercel
The SQL-driven table can be tested in the preview environment or locally.
### References
- Linear Issue: HDX-3580
- Related PRs:
Adds an inline remove (X) button that appears on hover for each column header in the search results table. Clicking it removes the column from the SELECT statement without needing to edit the query manually.
Closes#1784
Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Had a couple of files with large fixes, I tested AutocompleteInput.tsx and SessionSubpanel.tsx quite a bit. Tested most others as well. I didn't act on some due to either a) correct usage or b) they are stable and I don't want to alter it. In both those cases, I added `eslint-disable-next-line` before each relevant line
References HDX-2955
You can use Cmd+F to search through the log search table. We've implemented a custom input that overrides the native input that allows you to search through virtual items. However, if you click on one of the rows, a drawer opens, and we don't want that search input to listen for keyboard events anymore at this point. This PR fixes this behaviour.
https://github.com/user-attachments/assets/cbcaea4d-77a8-4c37-a368-bffc44ba4d59
Fixes HDX-3302
Revisit the bug fix for https://github.com/hyperdxio/hyperdx/pull/1614.
The alias map should be used in useRowWhere hook
Ref: HDX-3196
Example:
For select
```
Timestamp,ServiceName,SeverityText,Body AS b, concat(b, 'blabla')
```
The generated query from useRowWhere is
```
WITH (Body) AS b
SELECT
*,
Timestamp AS "__hdx_timestamp",
Body AS "__hdx_body",
TraceId AS "__hdx_trace_id",
SpanId AS "__hdx_span_id",
SeverityText AS "__hdx_severity_text",
ServiceName AS "__hdx_service_name",
ResourceAttributes AS "__hdx_resource_attributes",
LogAttributes AS "__hdx_event_attributes"
FROM
DEFAULT.otel_logs
WHERE
(
Timestamp = parseDateTime64BestEffort('2026-01-20T06:11:00.170000000Z', 9)
AND ServiceName = 'hdx-oss-dev-api'
AND SeverityText = 'info'
AND Body = 'Received alert metric [saved_search source]'
AND concat(b, 'blabla') = 'Received alert metric [saved_search source]blabla'
AND TimestampTime = parseDateTime64BestEffort('2026-01-20T06:11:00Z', 9)
)
LIMIT
1
```
Fixes a bug where loading a saved search page from another non-search page may result in the default select/order by being used instead of the saved search values.
Attempts to make these types of errors happen less by creating a new `defaultSearchConfig` object which represents the default values to fallback on (currently it was mixing concerns in a few places)
also adds tests for the scenario
Fixes HDX-3149
This PR removes bootstrap-icons entirely from the app. It also adds an eslint plugin to detect uses and throw an error, this will help in the immediate short term with PRs in flight and merging downstream.
Fixes HDX-3050
Closes HDX-2874
# Summary
This PR hides the table header row when there are no displayed columns. This prevents a glitchy behavior where the table header icons would appear vertically aligned rather than in a horizontal row when loading the table data. This occurred because the table header was rendered with an empty, horizontally-skinny column header for the expand button column, and the icons were in that skinny column header.
I'd recommend reviewing with white space changes hidden - this is a very small change.
## Before
https://github.com/user-attachments/assets/fceb489b-d79d-40f8-99ba-d9e4c2c5ee27
## After
https://github.com/user-attachments/assets/3b382e08-43b7-49e4-81c6-45bb2aa00688
moves them into a core folder, this allows us to easily track when core files are modified via path
no changeset because no version bump required
fixes HDX-2589
Improves user reported issues that clicking outside the modal would click elements unexpectedly, also improves accessibility (keyboard focus trap & esc to exit)
Fixes HDX-2642
When the searching row limits is set very high (ex the max of 100k) the app quickly consumes all available memory and crashes.
This adds some improvements to help mitigate the problem:
1. **QueryKey Issues** - The `queryKey` is generating a ton of extra entries every time the `processedRows` changes (which is every 5s when in live mode). The queryKey and result is cached regardless of if enabled is true or false. The base hashFn strategy is to [stringify the objects](2a00fb6504/packages/query-core/src/utils.ts (L216-L217)) which creates a very large string to be stored in memory. I tried to fix this by providing a custom `queryKeyHashFn` to `useQuery` but it was too slow, and the faster browser based hashing fns return a promise which isn't supported by `useQuery` at this time. The easiest solution I found was to short circuit the hash generation if we are not denoising.
2. **Sync `gcTime`** - We already set `gcTime` in `useOffsetPaginatedQuery` so I added that field here too, this helps keep the memory usage lower while denoising rows (but the memory still is much higher).
**The app still uses very high memory usage, just from the sheer number of rows being captured and processed**, but it doesn't crash anymore. There is definitely further optimizations we could make to reduce this. One solution that comes to mind is storing a hash/unique id of each row server side before sending to the client, then our app can leverage this key instead of a stringified object.
Before (after 1 min):
<img width="645" height="220" alt="Screenshot 2025-09-17 at 4 05 59 PM" src="https://github.com/user-attachments/assets/dab0ba34-4e92-42ce-90a0-fefadd9f0556" />
After (after 5 mins):
<img width="1887" height="940" alt="Screenshot 2025-09-17 at 3 52 23 PM" src="https://github.com/user-attachments/assets/bd969d2a-f0ec-4a5a-9858-409ff4a1eaa1" />
Fixes: HDX-2409
Across the app, we are inconsistent with when we can open the sidebar and expand functionality. This is because the sidebar and logic was managed by the parent component.
Additionally, the expand logic was set to assume a certain structure that some places in the application could not support (ex clickhouse dashboard doesn't have a 'source').
As a result, I have created the `DBSqlRowTableWithSideBar` component which will manage a lot of the common use cases for us. This PR introduces that new component, and updates all references (that could be easily upgraded) to use the new component when applciable.
The result: a lot less duplicate code (see # of lines removed) and the ability to more easily maintain the components down the road.
This PR also fixes several bugs I found as I tested these flows, especially around sidebars opening subpanels.
Fixes: HDX-2341
Closes HDX-2407
This PR fixes searches which sort in ascending time order or do not order based on time. With this change, time-based "chunking" of queries (#1125) will only be used when the results are ordered by time. Further, when ordering by time _ascending_, the chunks will load in ascending time order (rather than descending time order).
Fixes: HDX-2296
When a user clicks the ">" icon, the row is expanded and live tail is paused.
<img width="1882" height="451" alt="image" src="https://github.com/user-attachments/assets/4b4f12e0-df80-49b0-b917-455b213b4f3a" />
The user is able to interact with with the inline view as well
<img width="1823" height="334" alt="image" src="https://github.com/user-attachments/assets/e0c1acfc-7523-470d-b385-343c6e84ad9f" />
The user can click the expand button in the top right to open the sidebar
<img width="258" height="180" alt="image" src="https://github.com/user-attachments/assets/40b40c59-29a8-44fc-a310-6b55121029b4" />
The tab last chosen by the user persists in local storage
Clicking on an item in the table results in the sidebar opening as it does today.
These changes also:
* Disable the chevron in places where the sidebar is not hooked up today
* Disables interactivity of Event Tags if it doesn't have the proper events passed into it as well.
Adds a download icon that allows users to download a csv of results. Note: In v1, this was a gear icon that brought up a modal with a few different search options, including adding additional columns. Since that functionality doesn't exist in v2 yet, I thought it was best to just have a direct icon for now.

Fixes: HDX-1590
Fixed the UI for DBSearchPage when one of the queries error. Only one error is displayed instead of two. Error shows the user's inputs and the exception, in hopes that the exception will help the user debug their query.
To further help the user debug their query, I added a new file called "useSqlSuggestion.tsx" that has parsers to search through the form's select, where (but not for Lucene), and orderBy clauses to detect errors and offer suggestions to the user. The user can then click a button that will fix the appropriate input. So far the only suggestion offered would be changing double quotes (invalid for ClickHouse queries) to single quotes. Example: SeverityText:"err" => SeverityText:'err'
Ref: HDX-1489
Ref: HDX-1486
Ref: HDX-1267
- search page can search/select json type data
- display page can display json type data
- one line search(display log detail) can display json data detail