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'" }));