From 6b1dcf5801ca4f9435d8d3d17621a0c720ba5d0c Mon Sep 17 00:00:00 2001 From: Drew Davis Date: Mon, 28 Sep 2026 09:07:27 -0400 Subject: [PATCH] fix: Apply source query settings to the row side panel's row lookup --- .changeset/row-panel-source-query-settings.md | 5 +++++ packages/app/src/components/DBRowDataPanel.tsx | 1 + .../components/__tests__/DBRowDataPanel.test.ts | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 .changeset/row-panel-source-query-settings.md diff --git a/.changeset/row-panel-source-query-settings.md b/.changeset/row-panel-source-query-settings.md new file mode 100644 index 0000000000..e25444dc9d --- /dev/null +++ b/.changeset/row-panel-source-query-settings.md @@ -0,0 +1,5 @@ +--- +'@hyperdx/app': patch +--- + +fix: Apply source query settings to the row side panel's row lookup diff --git a/packages/app/src/components/DBRowDataPanel.tsx b/packages/app/src/components/DBRowDataPanel.tsx index d57c6c1a20..6a60cf5c0d 100644 --- a/packages/app/src/components/DBRowDataPanel.tsx +++ b/packages/app/src/components/DBRowDataPanel.tsx @@ -96,6 +96,7 @@ export function useRowData({ : undefined; const baseConfig = { + source: source.id, connection: source.connection, select: [ { diff --git a/packages/app/src/components/__tests__/DBRowDataPanel.test.ts b/packages/app/src/components/__tests__/DBRowDataPanel.test.ts index 211a0f4a4c..66152de309 100644 --- a/packages/app/src/components/__tests__/DBRowDataPanel.test.ts +++ b/packages/app/src/components/__tests__/DBRowDataPanel.test.ts @@ -53,6 +53,22 @@ describe('DBRowDataPanel', () => { }); }); + // useQueriedChartConfig resolves the source's querySettings from config.source + it('passes the source id on both the bounded and fallback lookups', () => { + renderHook(() => + useRowData({ + source, + rowId: "id='abc123'", + dateRange: [new Date(0), new Date(1000)], + }), + ); + + expect(mockUseQueriedChartConfig).toHaveBeenCalledTimes(2); + for (const [config] of mockUseQueriedChartConfig.mock.calls) { + expect(config.source).toBe('source-id'); + } + }); + it('selects `*` when the source has no Known Columns List', () => { renderHook(() => useRowData({ source, rowId: "id='abc123'" }));