fix(search): prioritize actions and prevent palette clipping - #6816
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Layout and polish on narrow viewports: the search dialog width uses Vitest coverage extends to input classes, workflow Reviewed by Cursor Bugbot for commit ba8d027. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR adjusts command-palette ranking to prioritize primary actions for exact module and block searches.
Confidence Score: 5/5The PR appears safe to merge, with the intended command-palette ordering covered by focused tests. Exact chat and block queries are promoted through the existing ranking tiers, and the resulting stable ordering puts the intended primary actions ahead of related records and pages without changing unrelated search paths.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx | Adds the “chats” exact query and promotes exact block-name matches using the established ranking tiers without exposing a concrete regression. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.test.tsx | Adds focused coverage confirming that New chat and exact block actions precede their associated entity results. |
Reviews (1): Last reviewed commit: "fix(search): prioritize exact blocks on ..." | Re-trigger Greptile
The palette dialog was a fixed 500px box centered over the content area (offset right by the sidebar, and the panel on the canvas), so narrow windows pushed it past the right edge — clipping the Ask Sim adornment and the empty state. Its 448px list could also extend below the fold on short windows, where cmdk aligns the selected row against the off-screen bottom edge: the selection parked below the viewport and held arrow keys juddered rows against an edge the user could not see. Clamp the centered left position to a 16px gutter, shrink the width once the viewport is narrower than the dialog plus gutters, and cap the list height so the whole dialog stays on-screen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Inputs clip glyph ink at their padding box, and the palette input had no left padding, so a leading glyph whose ink reaches its pen origin (the brand font's j) lost its left edge — worst at low browser zoom, where the clip boundary snaps to whole device pixels and eats up to 2 CSS px of the first letter. Give the input 3px of left ink clearance with a compensating negative margin so the text keeps its exact alignment with the result-row titles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chrome clips input text at the content box, not the padding box, so the previous padding-based clearance was dead space — glyph ink still started exactly at the clip edge, and the first letter kept losing its left edge under low browser zoom. text-indent starts the text 3px inside the clip region, which is clearance the renderer can actually paint into; the compensating negative margin keeps the text aligned with the result-row titles as before. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
chatsqueryType of Change
Testing
bun run type-checkinapps/simbun run lint:checkbun run check:audits(29 audits)Checklist
Screenshots/Videos
Not included; the rendering regression depended on low browser zoom and was verified in the affected browser environment.