Repository navigation
fix: selecting an at-prefixed JSON key no longer breaks row details #3520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kodiakhq
merged 2 commits into
main
from
cursor/fix-at-prefixed-json-key-row-details-4626
Nov 4, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@hyperdx/common-utils': patch | ||
| --- | ||
|
|
||
| fix: keep JSON path segments with special characters quoted in row detail lookups |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
packages/app/tests/e2e/features/search/json-at-prefixed-key-row-details.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| /** | ||
| * Selecting an at-prefixed JSON key breaks row details. | ||
| * | ||
| * When a displayed SELECT column is a JSON subcolumn whose key is not a bare | ||
| * identifier (e.g. `ResourceAttributesJSON.`@request_id``), ClickHouse reports | ||
| * the result column name without backticks (`ResourceAttributesJSON.@request_id`). | ||
| * The row side panel rebuilds a WHERE clause from the displayed columns to fetch | ||
| * the full row; before the fix it used that bare name verbatim, producing | ||
| * invalid SQL that matched no rows, so the panel came up empty. | ||
| * | ||
| * This drives the real UI path against a JSON-column schema: select the | ||
| * at-prefixed key, open the row, and confirm the detail panel is populated with | ||
| * the selected event's values. | ||
| */ | ||
| import { SearchPage } from '../../page-objects/SearchPage'; | ||
| import { | ||
| INTERESTING_FILTER_KEYS_JSON_AT_KEY, | ||
| INTERESTING_FILTER_KEYS_ROWS, | ||
| } from '../../seed-clickhouse'; | ||
| import { expect, test } from '../../utils/base-test'; | ||
| import { INTERESTING_FILTER_KEYS_SOURCE_NAME } from '../../utils/constants'; | ||
|
|
||
| const QUERY_TIMEOUT = 20_000; | ||
|
|
||
| const [ROW1] = INTERESTING_FILTER_KEYS_ROWS; | ||
|
|
||
| test.describe( | ||
| 'Search: at-prefixed JSON key row details', | ||
| { tag: ['@search', '@full-stack'] }, | ||
| () => { | ||
| test('opening a row with an at-prefixed JSON key in SELECT shows the event', async ({ | ||
| page, | ||
| }) => { | ||
| const searchPage = new SearchPage(page); | ||
| await searchPage.goto(); | ||
| await searchPage.selectSource(INTERESTING_FILTER_KEYS_SOURCE_NAME); | ||
| await searchPage.timePicker.selectRelativeTime('Last 1 hour'); | ||
|
|
||
| await test.step('isolate a single row', async () => { | ||
| await searchPage.performSearch(`ServiceName:"${ROW1.serviceName}"`); | ||
| await expect(searchPage.getTableError()).toHaveCount(0); | ||
| await expect(searchPage.table.getRows()).toHaveCount(1, { | ||
| timeout: QUERY_TIMEOUT, | ||
| }); | ||
| }); | ||
|
|
||
| await test.step('select the at-prefixed JSON key as a column', async () => { | ||
| await searchPage.setCustomSELECT( | ||
| `Timestamp, ServiceName, ResourceAttributesJSON.\`${INTERESTING_FILTER_KEYS_JSON_AT_KEY}\``, | ||
| ); | ||
| await searchPage.submitEmptySearch(); | ||
| await expect(searchPage.getTableError()).toHaveCount(0); | ||
| await expect(searchPage.table.getRows()).toHaveCount(1, { | ||
| timeout: QUERY_TIMEOUT, | ||
| }); | ||
| }); | ||
|
|
||
| await test.step('row details load the selected event', async () => { | ||
| await searchPage.table.clickFirstRow(); | ||
| await expect(searchPage.sidePanel.container).toBeVisible(); | ||
| // Before the fix the detail WHERE dropped the key's backticks and | ||
| // matched no rows, so the panel rendered empty with no error. | ||
| await expect(searchPage.sidePanel.errorState).toHaveCount(0); | ||
|
|
||
| await searchPage.sidePanel.openColumnValues(); | ||
| await expect( | ||
| searchPage.sidePanel.columnValue(ROW1.jsonAtKeyValue), | ||
| ).toBeVisible({ timeout: QUERY_TIMEOUT }); | ||
| await expect(searchPage.sidePanel.columnValue(ROW1.body)).toBeVisible(); | ||
| }); | ||
| }); | ||
| }, | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 minor — The
errorStatetoHaveCount(0) check runs before the row query finishes and can't catch the bugDelete the assertion, or move it after the
columnValue(ROW1.jsonAtKeyValue)visibility check. As written it passes as soon as the panel opens, while the detail query is still pending. Before the fix the panel also showed no error, only an empty result, so this line never separates broken from fixed. ThecolumnValueassertion is the one actually testing the fix.Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond