Skip to content

fix(dashboard): Keep composer typeahead open across spaces in a query - #4402

Merged
BYK merged 4 commits into
mainfrom
fix/composer-typeahead-multi-word
Nov 26, 2026
Merged

BYK merged 4 commits into
mainfrom
fix/composer-typeahead-multi-word

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

The $, @, and # menus in the composer stopped matching at the first space, so you could not find @Avery Chen, a Conversation called "Investigate checkout latency", or a PR by its title.

Root cause

The trigger regexes. skillTokenAt, mentionTokenAt, and hashTokenAt each read the query as a run of name characters right before the caret, and a space is not a name character. After @avery , no reference was at the caret, so useLexicalTypeahead closed the menu. The menus and the search APIs already split a query into words: quickOpenMatch and searchSkills split on whitespace, and the people, code change, and Conversation searches match each word.

Fix

The three finders now share composerTokenFinder. It reads words of name characters with one space between them. The regex has a single way to split the words, so a miss does not backtrack.

Closing rule

The menu stays open across one space and searches the words together. It closes when:

  • Escape is pressed. This works as before: the menu stays closed until the caret leaves the reference.
  • A row is selected. After a $skill insert, the words typed after it are text. A @ or # chip already ends the text node.
  • Two spaces are typed in a row, or the query starts with a space (@ , # heading).
  • A query that has a space gets no rows. The menu calls the new ComposerTypeahead.end(), so the words typed after it are text and send no searches. Backspace to a shorter query opens it again. This stops $5 for lunch or #1 priority is… from searching each word, and stops Enter from being held while those searches load.
  • The caret moves out of the query. A caret move into a query that has a space does not open a menu, so a click at the end of ask @casey about it opens nothing. A menu that is already open stays open while the caret moves inside its query.

I picked "a space with no rows ends it" over a word or length limit. It reuses the result the menu already has, and it ends a sentence after the first word that matches nothing.

The mock people search now matches each word, like the API. It used to match only the whole query as one prefix.

Screenshots

Before After
@avery ch before person after person
#link pull before pull request after pull request

via @BYK.

--

View Session [Sentry]

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 26, 2026 3:16pm UTC

Request Review

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 26, 2026 01:00
@sentry-junior
sentry-junior Bot requested a review from BYK November 26, 2026 01:00
@github-actions github-actions Bot added the risk: high PR risk score: high label Nov 26, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e3bf422. Configure here.

@blacksmith-sh

blacksmith-sh Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
money-units/money-units View Logs
provider-state/provider-state View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

1 screenshot change — 1 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Unsent Answers · Desktop
Conversation Unsent Answers · Desktop
Changed

@BYK
BYK enabled auto-merge (squash) November 26, 2026 11:08
…d-multi-word

Co-Authored-By: BYK <[email protected]>

# Conflicts:
#	packages/junior-dashboard/e2e/composer-references.spec.ts
#	packages/junior-dashboard/src/client/conversations/composerReferences.ts
@BYK
BYK merged commit bc7f482 into main Nov 26, 2026
54 of 55 checks passed
@BYK
BYK deleted the fix/composer-typeahead-multi-word branch November 26, 2026 15:25

This branch was successfully deployed

1 active deployment
Preview – junior-docs — e2d42efe Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant