Repository navigation
fix: selecting an at-prefixed JSON key no longer breaks row details - #3520
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: f2f940c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
PR Review
1 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 1 minor 1 posted as inline comment(s) on the changed lines. Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep ReviewScope: Intent: Quote non-bare JSON path segments when rebuilding the row-detail WHERE clause so selecting a key like ✅ No critical issues found. The change is tight and well-constrained. The new segmentation correctly preserves the prior verbatim behavior for the cases that mattered (bare paths like 🟡 P2 — recommended
🔵 P3 nitpicks (1)
Reviewers (10): correctness, security, adversarial, testing, maintainability, kieran-typescript, project-standards, previous-comments, agent-native, learnings-researcher. Testing gaps: E2E coverage is limited to the row-detail path; the click-to-filter and filter-key consumers of the changed helper are exercised only indirectly through the unit tests. No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
E2E Test Results✅ All tests passed • 462 passed • 1 skipped • 1416s
Tests ran across 4 shards in parallel. |
63143db to
7d1b838
Compare
jordan-simonovski
left a comment
There was a problem hiding this comment.
Absolute cinema. No notes.
| 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); |
There was a problem hiding this comment.
🔵 minor — The errorState toHaveCount(0) check runs before the row query finishes and can't catch the bug
Delete 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. The columnValue assertion 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
Summary
Fixes #3519
Selecting a JSON subcolumn whose key is not a bare identifier — e.g.
event.`@request_id`— made the row side panel come up blank.ClickHouse reports the result column name for such a select without backticks (
event.@request_id). The row side panel rebuilds a WHERE clause from the displayed result columns to fetch the full row (useRowWhere→quoteResultColumnNameIfNeeded). That helper left any dotted name untouched, so the detail query referencedevent.@request_idraw — where@request_idis not a valid bare identifier — which matched zero rows and left the panel empty.The helper now splits a plain dotted result-column name on . and quotes each segment that isn't a bare identifier (event.
@request_id, event.200). Valid paths like json.a.b are unchanged. JSON type casts and sub-object accessors, which ClickHouse already reports backticked (col.path.:String, col.^sub), are kept as is. Names that aren't plain paths, like function calls and literals, are still left verbatim.Screenshots or video
The change is in the row detail side panel. "Before" is the empty panel the broken detail query produces; "After" is the same panel populated with the selected event (verified by the E2E test below — it fails on
mainand passes on this branch).json-at-prefixed-key-row-details.spec.tsHow to reproduce
Starting point: full-stack
yarn dev(needs a JSON-column table), or the E2EE2E Interesting Filter Keyssource seeded by this PR.Schema/seed:
On
main:timestamp.timestamp, event.`@request_id`.rows: 0).On this branch:
How to test on Vercel preview
N/A — the fix needs a JSON-column schema with a seeded row, which the demo server does not provide. Covered by the full-stack E2E test instead.
References