Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 39998be The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
| setValue('orderBy', nextOrderBy); | ||
| setSearchedConfig({ select, orderBy: nextOrderBy }); | ||
| } else { | ||
| setSearchedConfig({ select }); |
There was a problem hiding this comment.
🔴 P1 — Toggling a column now throws away the user's unsubmitted where text and filters
setSearchedConfig({ select }) changes searchedConfig, which fires the URL→form sync effect (DBSearchPage.tsx:1321-1334). That effect calls reset() with the searched where/filters/orderBy. Before this PR, onSubmit() submitted the draft where/filters along with the column. Now any typed but unsubmitted query is silently reset. A filter click still waiting in the 1s debouncedSubmit (handleSetFilters, :1469) also gets reset before it fires. Fix: when only select changes, skip the reset, or set select without the reset, or have onSubmit take a skipTimeResolve flag instead of bypassing it.
Nothing blocks merge automatically, but a maintainer will expect this fixed if it is a real defect in code this PR changes. If it is about surrounding code, reply and say so instead of patching. Do not widen the PR. How to respond
PR Review
2 finding(s): 🔴 0 P0/P1 · 🟡 1 P2 · 🔵 1 P3 1 posted as inline comment(s) on the changed lines. 1 P3 folded at the bottom. 🔵 1 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
E2E Test Results✅ All tests passed • 474 passed • 1 skipped • 1187s
Tests ran across 4 shards in parallel. |
| onSubmit(); | ||
| // Keep the current time range: re-resolving a relative range would | ||
| // refetch the histogram for a column change. | ||
| onSubmit({ resolveTimeRange: false }); |
There was a problem hiding this comment.
🟡 P2 — Toggling a column now submits the drafted query but not the drafted time range
toggleColumn still runs handleSubmit, so any unsubmitted edits to the where/filters fields get applied. With resolveTimeRange: false, a range the user typed into the time input does not get applied. The result is a half-applied search: the time input shows a range that doesn't match the table or histogram. One fix is to skip onSearch only when displayedTimeInputValue still matches the searched range. The other is to also skip the draft where/filters in this path, setting only select/orderBy via setSearchedConfig.
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
Deep Review✅ No critical issues found. The three core mechanisms were verified against the actual code by the correctness and adversarial reviewers: dropping 🟡 P2 — recommended
🔵 P3 nitpicks (2)
Reviewers (11): correctness, adversarial, kieran-typescript, julik-frontend-races, performance, testing, maintainability, project-standards, previous-comments, agent-native, learnings-researcher. Testing gaps:
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 |
| // Everything but the table's select and sort can reference an alias, | ||
| // including the body, timestamp and sample-weight expressions. | ||
| with: getReferencedWithClauses(aliasWith, [ | ||
| JSON.stringify({ ...chartConfig, select: '', orderBy: '' }), |
There was a problem hiding this comment.
🟡 P2 — Alias matching runs over the whole config JSON, so many aliases are always kept and the histogram still refetches
getReferencedWithClauses checks whether an alias name appears anywhere in JSON.stringify({...chartConfig, select:'', orderBy:''}) (packages/common-utils/src/core/searchChartConfig.ts). That string always contains the field names (timestampValueExpression, databaseName/tableName, displayType, source, connection, where, select, orderBy, and bodyExpression on log sources) plus the hex ids for the source and connection. So an alias named time, name, type, table, source, body, value or search, or any one-letter alias such as c or a, is always kept. Toggling that column still changes the query key, and the histogram refetches anyway. Fix: build the text only from the parts that can actually reference an alias (where, filters, groupBy, implicitColumnExpression, bodyExpression, timestampValueExpression, the sample-weight expression), and match on identifier boundaries (e.g. (?<![\w.])name(?!\w)) instead of includes.
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
The search histogram was rerendering on unnecessary operations, like adding a column or adding an alias. This fixes that.
Screenshots or video
Before
export-1795209359104.mp4
After
export-1795209486556.mp4
References