Skip to content

fix(app): keep the @ menu open while it searches - #59424

Closed
kitlangton wants to merge 3 commits into
devfrom
at-popup-flicker
Closed

kitlangton wants to merge 3 commits into
devfrom
at-popup-flicker

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closing: beta is gone, and dev already has this change as .

@opencode-agent opencode-agent Bot 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.

Verified with the new component test. On the base branch the file rows vanish while the next search is pending (the menu drops to just @review). With this change the previous rows stay until the new results replace them (5/5 runs). tsc -b passes. The rest of composer.spec.ts passes except "pins history search above the scrolling prompts", which you note also fails on the base branch.

Public API is unchanged: only the composer's internal state, a story and a test change.

One small edge case is noted inline: a failed file search now leaves the previous search's files in the menu.

Before

After

void Promise.resolve(input.searchContextFiles(query, controller.signal)).then(
(files) => !controller.signal.aborted && setFound({ query, files }),
(files) => !controller.signal.aborted && setFound("files", files),
() => undefined,

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.

Now that results aren't tagged with their query, a rejected search leaves the previous search's files listed under the new query. Non-recent files skip the label filter, so they show unfiltered until the next keystroke. Before this change a failure meant no file rows. Clearing found.files here when !controller.signal.aborted would keep "No matching items" or an empty list on errors instead of showing stale files.

@opencode-agent opencode-agent Bot 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.

The new commit only adds a blank line in the story, so earlier verification still holds and nothing new needs flagging. The open point about a failed search leaving the previous query's files listed is not addressed yet. Public API is unchanged.

@opencode-agent opencode-agent Bot 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.

The new commit works as described. Unit tests (test-browser/composer-file-search.test.ts, src/composer), the composer component tests and tsc -b pass; the one component failure is the same "pins history search…" test as before, which you note also fails on the base branch. Leftover files from the previous search can't be highlighted or picked any more, and Enter with no highlighted row does nothing rather than sending the prompt. The new rule that the highlight follows the first row until you pick one also applies to the slash menus, which looks consistent. The earlier point about a failed search leaving the previous search's files on screen is narrowed (they can't be picked now) but they still show, so that thread stays open. Public API is unchanged.

@thdxr
thdxr changed the base branch from beta to dev October 27, 2026 16:37
@kitlangton kitlangton closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant