Skip to content

fix(web): right-panel launcher letters work while a closed menu stays mounted - #15960

Open
macodev00 wants to merge 1 commit into
pingdotgg:mainfrom
macodev00:cursor/composer-type-to-focus-d87c
Open

macodev00 wants to merge 1 commit into
pingdotgg:mainfrom
macodev00:cursor/composer-type-to-focus-d87c

Conversation

@macodev00

@macodev00 macodev00 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Right-panel launcher letters ignore popups that stay mounted while closed. Each overlay selector matches only while open or animating closed, through launcherShortcutBlockedByOverlay. The Mod+T tab menu uses the same helper and still skips the check while its own menu is open.

Why

Fixes #13403. A closed keepMounted popup matched by slot alone, so launcher letters (T, B, F, M, …) never opened a surface. The composer caret half of the original change landed upstream in #14595.

Verification

Base: upstream/main 73e097b8c86000ddc4b38926ba86e1595109d78e
Head: e48b5d1a9b6500d22e36b69af58e0a875da33a4b
Node v24.13.1, Linux 6.12.94+ x86_64.

  • vp test run apps/web/src/components/RightPanelTabs.launcherShortcuts.test.ts — 1 file, 3 tests passed.
  • vp test run apps/web/src/components/RightPanelTabs.keyboard.test.tsx apps/web/src/components/RightPanelTabs.launcherShortcuts.test.ts — 2 files, 12 tests passed.
  • vp run --filter @t3tools/web test — 468 files, 6493 tests passed.
  • vp run --filter @t3tools/web typecheck — passed.
  • vp run knip:check — passed.
  • vp check — 0 errors, 893 warnings in 4928 files.

Manual check: with a thread open, the right-panel launcher visible, nothing focused, and a closed menu-popup in the DOM, pressing F on upstream 73e097b8c leaves “Open a surface” up and types f into the composer. On this commit, F opens Files (README.md, VISIBLE-FILE.txt) and the composer stays empty.

Limitations: the old chat-header actions menu is no longer rendered, so a fresh thread does not contain that node by itself. The capture mounts a hidden closed menu-popup to exercise the selector that upstream still leaves unguarded. Mobile was not exercised.

UI Changes

Before

before: 01-thread-open-nothing-focused

before: 02-pressed-f-for-files

before recording

[before.mp4 (download)](https://raw.githubusercontent.com/macodev00/t3code/6b86579ad064c0da40f5b60204ea0d815f859c9a/issue-13403/before/recording.mp4)

After

after: 01-thread-open-nothing-focused

after: 02-pressed-f-for-files

after recording

[after.mp4 (download)](https://raw.githubusercontent.com/macodev00/t3code/6b86579ad064c0da40f5b60204ea0d815f859c9a/issue-13403/after/recording.mp4)

Checklist

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 5, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 2106c6c

Macroscope's review found this PR approvable — This is a focused web bug fix that corrects composer caret placement and prevents only closed mounted overlays from suppressing launcher shortcuts. Production changes are small, localized, and accompanied by targeted regression tests.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 419d3de7-6533-460a-aca9-8718afaf8c4e
📥 Commits

Reviewing files that changed from the base of the PR and between cf3e714 and 2106c6c.

📒 Files selected for processing (4)
  • apps/web/src/components/ComposerPromptEditorTiptap.focus.test.tsx
  • apps/web/src/components/ComposerPromptEditorTiptap.tsx
  • apps/web/src/components/RightPanelTabs.launcherShortcuts.test.ts
  • apps/web/src/components/RightPanelTabs.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The changes update launcher shortcut detection so closed mounted popups do not block shortcuts. The composer now focuses through the ProseMirror view, with a test for caret placement after text insertion.

Changes

Composer input and launcher shortcuts

Layer / File(s) Summary
Open-overlay shortcut gating
apps/web/src/components/RightPanelTabs.tsx, apps/web/src/components/RightPanelTabs.launcherShortcuts.test.ts
Overlay detection now matches listed popup types only when open or ending. The shortcut handler uses the root-scoped helper. Tests cover closed, open, and ending states, including a closed menu mounted beside an open menu.
Composer focus and caret placement
apps/web/src/components/ComposerPromptEditorTiptap.tsx, apps/web/src/components/ComposerPromptEditorTiptap.focus.test.tsx
focusAt now focuses the editor through editor.view.focus(). The test checks that focus places the caret after the existing text.

Priority: ⬆️ High

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix · Severity of issue fixed: High

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 2106c

This change stops closed popups from blocking launcher letter shortcuts and keeps the caret at the right position when typing into an unfocused composer. No merge-blocking risk was found.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, change, issue reference, verification results, limitations, and UI evidence. It does not explicitly document maintainer approval or explain why the focused fix qu… Add a Scope and approval section that links the triaged issue with the approval comment, or explain why this focused, obvious bug fix qualifies without prior approval.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #13403 requires type-to-focus to preserve typed text and right-panel letter shortcuts to work when closed popups remain mounted. The PR uses ProseMirror editor.view.focus() to place the stored…
Out of Scope Changes check ✅ Passed All changes support issue #13403. The focus and launcher tests cover the reported behavior. The selector helper is used by the launcher shortcut handler and has no unrelated changes in the reviewed di…
Docstring Coverage ✅ Passed Docstring coverage is 90.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files.
Title check ✅ Passed The title clearly describes the main launcher-shortcut fix for closed mounted menus and follows conventional commit style.
Full details: Description check

Explanation

The description explains the problem, change, issue reference, verification results, limitations, and UI evidence. It does not explicitly document maintainer approval or explain why the focused fix qualifies without prior approval.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

… mounted

Closed keepMounted popups matched by slot alone, so the chat header
actions menu blocked every launcher letter on an open thread. Popup
selectors now match only while open or animating closed.
@cursor
cursor Bot force-pushed the cursor/composer-type-to-focus-d87c branch from 2106c6c to e48b5d1 Compare October 8, 2026 06:54
@macodev00 macodev00 changed the title fix(web): typing with the composer unfocused reaches the composer fix(web): right-panel launcher letters work while a closed menu stays mounted Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Typing with the composer unfocused no longer goes to the composer

1 participant