You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): clicking the Tab hint inserts short prompt suggestions again - #40841
Clicking the ⇥ Tab badge on a one- or two-line prompt suggestion does nothing: the click lands in the editor instead of inserting the suggestion (#39488). This regressed in #40654, which made the placeholder a static grid item. The editor is position: relative, so it paints over the placeholder and its button.
To reproduce: enable Settings → Labs → Suggest next prompt, get a short suggestion in an empty composer, and click its Tab badge.
Change
Add relative to the placeholder. It paints above the editor again and stays in the grid cell, so the input still grows for wrapped suggestions (#40650). The placeholder keeps pointer-events-none, so clicks outside the button still focus the editor.
The fix is on the placeholder rather than on the button because that is where the stacking changed.
Scope
Fixes#40836. One class and its regression test, in the web editor that desktop also uses. Mobile has a separate composer.
#40836 was closed as not reproducible, but the test described in the closing comment fails with the same intercepted click and passes with #40654 reverted. This PR keeps #40654's layout and adds the end-to-end reproduction that comment didn't have.
Verification
Browser test: clicks a one-line placeholder's button and the text beside it in the real editor. It failed before the fix with subtree intercepts pointer events and passes after it.
Real app: a throwaway scenario on an isolated T3 home with the Replay provider, clicking at the badge's coordinates in headless Chromium at 1280×800. Without the fix the five-line suggestion inserts and the one-line one does not; with it both insert. The suggestion text was injected by an uncommitted override, so live Claude or Codex suggestion generation was not exercised.
Checks:vp run check:changed passes, and both editor browser suites pass (75 tests) on e31c569.
Not checked: the Electron app, Firefox and Safari. The scenario ran on Windows with local environment workarounds, so it is not committed and scenarios:prove was not used.
Local install: my pnpm release-age policy rejects agent-device@0.21.41 for now, so checks ran with 0.21.36 installed. No dependency change is committed.
Hovering the badge on a one-line suggestion. On main the editor covers it, so the cursor stays a text I-beam instead of the pointer hand:
Pointer is over the editor, and clicking does nothing
Pointer is over the button, and clicking inserts the suggestion
Real system cursor, not drawn in: headed Chromium 158 on a Linux X11 virtual display, running the real app with the Replay provider and injected suggestion text. Cropped and enlarged 3×.
One-line suggestion, after clicking the badge:
Before
After
The wrapped-suggestion layout from #40654 is unchanged (top: before, bottom: after)
Making the placeholder a static grid item let the positioned editor paint
over it and take the button's clicks. Position the placeholder so it stays
above the editor while keeping its place in the grid.
Fixespingdotgg#40836
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewing files that changed from the base of the PR and between e31c569 and 2fc7adc.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The placeholder overlay gains the relative class. Browser tests can set placeholder content and a suffix button, and check editor focus and suffix button handling.
Changes: Composer placeholder interaction
Layer / File(s)
Summary
Placeholder overlay and browser coverage apps/web/src/components/ComposerPromptEditorTiptap.tsx, apps/web/src/components/ComposerPromptEditorTiptap.input.browser.test.tsx
The placeholder overlay gains the relative class. The test helper accepts and forwards placeholder props. A browser test checks editor focus and verifies that clicking the suffix button invokes its handler once.
This fixes clicks on the Tab badge for short prompt suggestions in the composer. The change is small and covered by a browser test, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the fix and its subject: clicks on the Tab hint for short prompt suggestions insert them again. The changeset adds relative to the placeholder overlay in ComposerPromptEditorTiptap.t…
Linked Issues check
The only linked issue, #40836, is closed as not reproducible and is marked as historical context only. Under the assessment rules, its acceptance criteria are not PR objectives, and no active directly…
Out of Scope Changes check
The change set consists of one class addition ('relative') to the placeholder overlay in apps/web/src/components/ComposerPromptEditorTiptap.tsx and a browser test in ComposerPromptEditorTiptap.input.b…
Description check
The description follows the repository template and covers the main sections. The Problem section explains the regression and reproduction steps. The Change section explains the one-class fix and why …
Full details: Title check
Explanation
The title names the fix and its subject: clicks on the Tab hint for short prompt suggestions insert them again. The changeset adds relative to the placeholder overlay in ComposerPromptEditorTiptap.tsx, which restores that click behavior, and adds a browser test for it. The title matches the main change and is specific enough to scan in history.
Full details: Linked Issues check
Explanation
The only linked issue, #40836, is closed as not reproducible and is marked as historical context only. Under the assessment rules, its acceptance criteria are not PR objectives, and no active directly linked coding requirement applies. The PR also states a fix for #40836 that is consistent with the issue's root cause: the placeholder in ComposerPromptEditorTiptap lost stacking context after #40654. The reviewed head's ComposerPromptEditorTiptap.tsx was readable only in truncated form, and the whole-PR diff could not be read. The PASS therefore rests on the change summary (one added class, 'relative', on the placeholder overlay) and the PR's stated browser test, not on a verified line-level diff. This does not change the outcome because no active requirement applies.
Full details: Out of Scope Changes check
Explanation
The change set consists of one class addition ('relative') to the placeholder overlay in apps/web/src/components/ComposerPromptEditorTiptap.tsx and a browser test in ComposerPromptEditorTiptap.input.browser.test.tsx. The test adds optional placeholder and placeholderSuffix props to its Composer helper and checks that clicking the editor focuses it and clicking the suffix button invokes its handler. These support the stacking fix described in the PR, so no concrete unrelated change was found. The whole-PR diff was unavailable, so this relies on the change summary. Mobile composer changes are absent from the stated scope.
Full details: Description check
Explanation
The description follows the repository template and covers the main sections. The Problem section explains the regression and reproduction steps. The Change section explains the one-class fix and why it is placed on the placeholder. The Scope section links #40836 and states the fix covers the web editor only. The Verification section lists a browser test, a real-app scenario, checks run, and items not checked. The template's Scope section asks for a bug fix with a linked issue, and the PR links #40836. The description also includes before/after screenshots for the UI change, as the template requires. The one template item to note is the AI-attribution line at the end, which the template asks for when an agent was used; the description includes a generated-by line naming a model and harness. The description is thorough and mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Enable Suggest next prompt, open a completed replay thread with an empty composer showing Thanks!, then pointer-click the centre of its Tab badge. Real web app, Chromium, 1280×800, light theme, fresh isolated state on each commit. The transient suggestion is supplied at the RPC boundary; composer rendering and pointer handling are unchanged.
scenarios:prove exited 0: base failed with composer text empty; head passed with composer text Thanks!.
Not shown:
Live Claude/Codex suggestion generation was not exercised; replay ACP lacks this event, so the transient suggestion was supplied through the RPC subscription.
Surrounding-placeholder focus, keyboard Tab acceptance, wrapped suggestions, and narrowed panes were not exercised by this scenario.
…122.5098 + pingdotgg#40909)
Resolved 8 conflicts by intent, ported pingdotgg#40841 placeholder relative class into custom composer, refreshed lockfile, and verified full web+server build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Clicking the
⇥ Tabbadge on a one- or two-line prompt suggestion does nothing: the click lands in the editor instead of inserting the suggestion (#39488). This regressed in #40654, which made the placeholder a static grid item. The editor isposition: relative, so it paints over the placeholder and its button.To reproduce: enable Settings → Labs → Suggest next prompt, get a short suggestion in an empty composer, and click its Tab badge.
Change
Add
relativeto the placeholder. It paints above the editor again and stays in the grid cell, so the input still grows for wrapped suggestions (#40650). The placeholder keepspointer-events-none, so clicks outside the button still focus the editor.The fix is on the placeholder rather than on the button because that is where the stacking changed.
Scope
Fixes #40836. One class and its regression test, in the web editor that desktop also uses. Mobile has a separate composer.
#40836 was closed as not reproducible, but the test described in the closing comment fails with the same intercepted click and passes with #40654 reverted. This PR keeps #40654's layout and adds the end-to-end reproduction that comment didn't have.
Verification
subtree intercepts pointer eventsand passes after it.vp run check:changedpasses, and both editor browser suites pass (75 tests) on e31c569.scenarios:provewas not used.agent-device@0.21.41for now, so checks ran with 0.21.36 installed. No dependency change is committed.Hovering the badge on a one-line suggestion. On main the editor covers it, so the cursor stays a text I-beam instead of the pointer hand:
Real system cursor, not drawn in: headed Chromium 158 on a Linux X11 virtual display, running the real app with the Replay provider and injected suggestion text. Cropped and enlarged 3×.
One-line suggestion, after clicking the badge:
The wrapped-suggestion layout from #40654 is unchanged (top: before, bottom: after)
Written by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code