Skip to content

Open pages from search by keyboard once the palette is final - #365

Merged
kalvinnchau merged 1 commit into
mainfrom
larry/search-choices-settle
Sep 28, 2026
Merged

kalvinnchau merged 1 commit into
mainfrom
larry/search-choices-settle

Conversation

@loganj

@loganj loganj commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Many browser tests open a page through the Search Buzz dialog ("Messages", "Projects" and so on) with a shared helper, openPage. It clicked the action by its position on screen. Sometimes the click missed, the dialog stayed open, and the test failed. CI recently showed this in thread-unread.spec.mjs on WebKit.
  • Why it missed: after a reload that restores a conversation, the dialog opens before the channel list has loaded. When the list arrives, "This conversation" and "Recent activity" rows appear above Actions and push every action down about 190px. A click at the old position lands between rows.
  • Now the helper selects the action with the keyboard and presses Enter. The dialog tracks the selected action by its identity, not its position, so rows arriving later cannot move the selection. Keyboard users already navigate this way.
  • Test-only change. No app code changes.

Details

  • The dialog also starts as a placeholder ("Connecting to this community…") until the community connects, then the full dialog replaces it. That swap resets the selection, so the helper waits for the full dialog first. Two tests hold or fail the relay connection on purpose, so the placeholder stays. They pass openPage(page, name, { connected: false }), and the helper checks that the placeholder is showing.
  • The old helper waited for the dialog's opening animation before clicking. The keyboard path does not depend on hit targets, so that wait is removed.
  • New test in global-search.spec.mjs: it holds the channel-membership read (the relay query that lists your channels) across a reload so the rows arrive after an action is selected. It checks that the action moved and is still selected, then presses Enter and checks that the page opened.
  • Product note, not changed here: a mouse user can hit the same miss if they click just as the rows arrive. Reserving space for those sections, or not moving existing rows, would fix it for users too. That is a design decision, so it is left for a separate change.

openPage clicked a Search Buzz action by position. After a reload that
restores a conversation, the channel list arrives after the palette opens
and adds rows above Actions, so the target moves about 190px. A click at
the old position lands between rows and the dialog stays open
(thread-unread.spec.mjs:45 on webkit in CI).

The palette also starts as a placeholder until the community connects.
The connected palette replaces it, which resets selection and option ids.

openPage now waits for the connected palette, selects the action with
the keyboard, and presses Enter. Selection follows the action's key, so
rows that arrive later cannot move it. Tests that hold or fail the relay
session pass connected: false, and openPage checks that the placeholder
is showing.

A new global-search test holds the membership read so the rows arrive
after selection, and checks that the action moved and stays selected.

Signed-off-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
@loganj
loganj force-pushed the larry/search-choices-settle branch from b210909 to ef2d98d Compare September 28, 2026 21:17
@loganj
loganj marked this pull request as ready for review September 28, 2026 21:47
@loganj
loganj requested review from a team, comp615 and wesbillman as code owners September 28, 2026 21:47

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Reviewed the test-only change at ef2d98d against 3a19fa4; no findings. Review performed by am using Kalvin’s GitHub credentials at his explicit request.

@kalvinnchau
kalvinnchau merged commit 61aca61 into main Sep 28, 2026
23 of 25 checks passed
@kalvinnchau
kalvinnchau deleted the larry/search-choices-settle branch September 28, 2026 21:58
cynfria pushed a commit that referenced this pull request Sep 28, 2026
…sh-followup

* origin/main:
  Open pages from search by keyboard once the palette is final (#365)
  feat(agents): one-click Pi install and provider setup (slice 5/5) (#330)

Signed-off-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants