Skip to content

fix(quick-switcher): highlight the selected Open Quickly row after a search - #3789

Merged
datlechin merged 2 commits into
mainfrom
fix/3785-open-quickly-selection-highlight
Oct 22, 2026
Merged

datlechin merged 2 commits into
mainfrom
fix/3785-open-quickly-selection-highlight

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Open Quickly draws its results with one flat ForEach and no .id on a row. The nested ForEach(groups) { ForEach(items) } in a LazyVStack kept a row realized under a removed group (Tables, Recent) on screen once a search moved its item into the results, and never updated it: no highlight, no bold match, and a stale second highlight.
  • New QuickSwitcherList owns that rule and the scrolling for Open Quickly, Jump to Column and the recent-tab switcher.
  • A section header draws inside its group's first row, so arrowing back up shows it again.
  • The list scrolls to the selection on each new search. A query whose best match was the scrolled-away selection left it off screen (Open Quickly, Jump to Column).
  • An arrow pressed before a new query's results land is replayed on those results, in order. It moved in the old list and was then reset.
  • The two filter functions are @concurrent. Under approachable concurrency they ran on the main actor: 100 to 400 ms per keystroke in the Connections scope with 5 to 10 connections of 2,000 tables.
  • Completion list: a click selects at once instead of after the double-click interval (about 350 ms), and the list scrolls only as far as the row needs, so a double click stays on its row.
Light Dark
Before Before, light Before, dark
After After, light After, dark

Test plan

  • QuickSwitcherSelectionRenderingTests renders the real panel and reads the drawn selection: highlight after a query, scroll back to a kept selection, header on arrow up. All three fail on main.
  • QuickSwitcherViewModelTests: rows, arrows replayed in order with clamping, a keystroke drops a pending arrow, same-search refilter, search generation. ColumnJumpViewModelTests: search generation.
  • verify: build, test (Quick Switcher, Jump to Column, recent tabs, completion suites), lint, l10n. OpenQuicklyCommandUITests runs on CI only, since Automation Mode is off on this Mac.

Fixes #3785

@datlechin datlechin added bug Something isn't working platform-macos About the macOS app backport release/0.82 Merged into main; pick onto release/0.82 backport release/0.83 Merged into main; pick onto release/0.83 labels Oct 22, 2026
@datlechin
datlechin enabled auto-merge (squash) October 22, 2026 14:18
@datlechin
datlechin merged commit 3aa30d6 into main Oct 22, 2026
8 checks passed
@datlechin
datlechin deleted the fix/3785-open-quickly-selection-highlight branch October 22, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/0.82 Merged into main; pick onto release/0.82 backport release/0.83 Merged into main; pick onto release/0.83 bug Something isn't working platform-macos About the macOS app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rendering issue in Open Quickly navigation

1 participant