Repository navigation
[HDX-5307] Drop the search bar WHERE label and / keycap - #3168
Conversation
The label repeated the SQL placeholder, and the overlay clipped long queries. Keyboard shortcuts still focus the input. Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 0f5dd8e 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 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
|
|
| it('renders the SQL editor when whereLanguage is sql', () => { | ||
| renderWithMantine(<TestWrapper defaultLanguage="sql" />); | ||
|
|
||
| expect(screen.getByText('WHERE')).toBeInTheDocument(); | ||
| expect( | ||
| screen.getByRole('combobox', { name: 'Query language' }), | ||
| ).toHaveValue('SQL'); | ||
| expect( | ||
| screen.queryByPlaceholderText(/Search your events w\/ Lucene/i), | ||
| ).not.toBeInTheDocument(); |
There was a problem hiding this comment.
Missing label regression check
The rewritten SQL-mode test confirms that the SQL editor renders, but it no longer checks the behavior this PR changes: that the WHERE label is absent. Add a negative assertion for the label so a future regression cannot reintroduce it unnoticed.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
|
||
| describe('SQL Mode', () => { | ||
| it('renders SQL input with WHERE label when whereLanguage is sql', () => { | ||
| it('renders the SQL editor when whereLanguage is sql', () => { |
There was a problem hiding this comment.
🔵 minor — The renamed SQL-mode test no longer pins the removal of the WHERE label
The two assertions that covered the label (getByText('WHERE') here, and the deleted hides label when showLabel is false case) were replaced with checks on the language select's value and the absence of the Lucene placeholder — neither relates to this change, and the next test (renders SQL placeholder) already proves the SQL editor rendered. Restoring label="WHERE" on the SQLInlineEditorControlled in SearchWhereInput.tsx:229 would keep every test green, because the only new assertion about removed chrome (container.querySelector('kbd'), line 92) lives in the Lucene test while the label was SQL-only. Add expect(screen.queryByText('WHERE')).not.toBeInTheDocument() to this SQL-mode test, and move (or duplicate) the kbd assertion into SQL mode as well since the keycap rendered in both languages.
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
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 ReviewThis PR removes the 🟡 P2 -- recommended
🔵 P3 nitpicks (1)
Reviewers (9): ce-correctness-reviewer, ce-testing-reviewer, ce-maintainability-reviewer, ce-project-standards-reviewer, ce-kieran-typescript-reviewer, ce-api-contract-reviewer, ce-agent-native-reviewer, ce-learnings-researcher, ce-previous-comments-reviewer. Testing gaps: The keycap-absence check runs only with 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 • 377 passed • 1 skipped • 1154s
Tests ran across 4 shards in parallel. |
| ); | ||
| expect(input).toBeInTheDocument(); | ||
| // `/` and `s` still focus the input; the overlay keycap is gone. | ||
| expect(container.querySelector('kbd')).not.toBeInTheDocument(); |
There was a problem hiding this comment.
🔵 minor — The new assertion pins the keycap's absence, not the hotkey the PR claims still works
expect(container.querySelector('kbd')).not.toBeInTheDocument() is an absence proxy, and the comment beside it ("/ and s still focus the input") is the one thing nothing checks — a grep for press('/')/keyboard('/')/hotkey across packages/app/tests and the jest suites returns nothing, so deleting the useHotkeys(['/', 's'], …) call in SearchInputV2.tsx:128 or SQLEditor/SQLInlineEditor.tsx:228 keeps every test green while breaking the behaviour the changeset promises. Add a case that renders with enableHotkey, fires / on document.body, and asserts the Lucene textarea (and the SQL .cm-content) has focus.
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
WHERElabel and the/keycap overlay from the search bar./andsstill focus the input.mainafter [HDX-5307] Drop the search bar WHERE label and / keycap #3152 merged into the stacked base branch instead ofmain([HDX-5307] Keep multi-line query fields visible when unfocused #3150 had already landed).Test plan
WHERElabel./andsstill focus the input with no keycap overlay.