fix(web): keep usage-limit banner actions and one info icon in a narrow pane #48249
main fromrefs/pull/48249/head·opened View on GitHubProblem#
In a narrow thread pane, when a usage-limit warning is shown with auto-resume enabled and at least one stashed prompt (so the Stash shoulder tab sits beside the banner), the docked banner breaks in two ways:
- The action labels (
Cancel auto-resume,Snooze until reset) can extend past the left edge of the amber card and over the transcript. - The title collapses to
Us...and two identical(i)info buttons appear side by side.
Expected: the actions stay inside the banner, and the title and description share at most one details button.
Change#
- Let the recovery action cluster shrink and wrap (
min-w-0 max-w-full, and the existing--inline-button-white-spacehook soInlineButtontext can wrap) so the labels stay inside the banner. - Give wrap-action rows
min-w-0 max-w-fullinstead ofmin-w-14, which could not hold the nowrap labels. - Measure the title and description together in a single
NoticeHeadingand show one details button whose popover includes both texts. A description hidden with@max-[400px]:sr-onlyno longer spawns a second icon that crushes the title.
The Stash tab / Dock width split is unchanged. That layout is one reason the column gets narrow, but the banner should still keep its own content inside the card at that width.
Scope#
Bug fix. Fixes #48101.
Verification#
Branch tip 0c26df2b48 on top of pingdotgg/t3code main at 7b6a2c96f6. Playwright Chromium v1248 was installed to run the existing browser test project.
On unfixed main, a 200px pane with --chat-composer-drawer-inset:1.375rem, a Stash tab, and a usage-limit banner measured:
- banner width ≈ 49.2px, left edge 22.0, right edge 71.2
- two
InlineButtons at left −36.7 (widths 114.7 and 102.7), past the left edge of the card - two details buttons:
Show full title: Usage limit reachedandShow details: Usage limit reached
After the fix, the same layout is locked by a new case in ComposerBannerStack.browser.test.tsx (keeps usage-limit actions inside a narrow banner and shows one details button).
Commands and results:
cd apps/web && ./node_modules/.bin/vp test run --project browser src/components/chat/ComposerBannerStack.browser.test.tsx— 1 file, 6 passed (including the new case)../node_modules/.bin/vp test run --project unit src/components/chat/UsageLimitRecoveryBanner.test.tsx— 1 file, 5 passed../node_modules/.bin/vp linton the 4 changed files — 0 errors. Ajustify-[safe_end]class was tried and rejected by the repo's Tailwind lint rules; the passing layout usesjustify-endwithmin-w-0../node_modules/.bin/vp fmton those files — formatted.- Pre-commit hooks also ran
vp fmt,vp lint, andvp run knip:checksuccessfully.
I did not run the full apps/web or repo-wide test suites. This is a UI layout change; I could not capture desktop before/after screenshots in this headless environment. The evidence above is from the browser test's layout measurements of the same 200px + Stash arrangement described in the issue.
This change was written by Grok Bot in the Grok Bot / Cursor harness.
- 1
markjoin123(GitHub profile, opens in a new tab) linked this to fix #48101
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
No actionable comments were generated in the recent review.
Walkthrough
-
The composer banner constrains action widths and combines title and description overflow into one details control. A browser test covers recovery actions and the details control in a narrow banner.
Changes: Composer Banner Layout
Layer / File(s) Summary Constrain banner action widths
apps/web/src/components/chat/ComposerBanner.tsx,apps/web/src/components/chat/UsageLimitRecoveryBanner.tsxThe banner action containers use min-w-0 max-w-full. Usage-limit recovery actions use the exportedLIMIT_RECOVERY_ACTIONS_CLASSNAMEfor their layout rules.Combine notice overflow details
apps/web/src/components/chat/ComposerBannerStack.tsx,apps/web/src/components/chat/ComposerBannerStack.browser.test.tsxTitle and description overflow are measured together and use one details button. The browser test checks that recovery actions stay within the banner bounds and that only one full-title-or-details button appears. Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
chenxin-yan
Merge Risk:
Minimal · up to0c26d-
This change keeps usage-limit banner actions inside a narrow pane and shows a single details button. No merge-blocking risk was found, and the change is low-risk and easy to revert.
Pre-merge checks:
4-
Check name Status Explanation Title check The title names the main change: a fix to keep usage-limit banner actions and a single info icon inside a narrow pane. It matches the raw summary, which covers the action cluster wrapping and the merg… Description check The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives reproduction context (narrow pane, auto-resume, stashed prompt) and… Linked Issues check [ #48101] The issue requires two things in a narrow pane with auto-resume and a Stash tab: (a) usage-limit actions stay inside the banner, and (b) title and description show at most one details icon.
…Out of Scope Changes check All changed files map to the objectives of #48101. The changes in ComposerBanner.tsx (Actionsmin-width and max-width classes), UsageLimitRecoveryBanner.tsx (LIMIT_RECOVERY_ACTIONS_CLASSNAME), and…Full details: Title check
-
Explanation
The title names the main change: a fix to keep usage-limit banner actions and a single info icon inside a narrow pane. It matches the raw summary, which covers the action cluster wrapping and the merged NoticeHeading details button. It is specific, under the conventional commit format, and a bit long at 76 characters.
Full details: Description check
-
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The Problem section gives reproduction context (narrow pane, auto-resume, stashed prompt) and expected behavior. The Change section explains each fix. Scope states it is a bug fix and links
#48101. Verification lists focused test commands, measured results, and states what was not checked (full suites, desktop screenshots). The description does not include before/after screenshots, which the template asks for in UI changes, but it explains why they could not be captured. It also ends with the model and harness line, as the template asks.
Full details: Linked Issues check
-
Explanation
[
#48101] The issue requires two things in a narrow pane with auto-resume and a Stash tab: (a) usage-limit actions stay inside the banner, and (b) title and description show at most one details icon.(a) Actions: The diff adds
min-w-0 max-w-fulltoComposerBanner.Actions(ComposerBanner.tsx) and replaces themin-w-14 sm:min-w-12class on the actions in ComposerBannerStack.tsx withmin-w-0 max-w-full.LIMIT_RECOVERY_ACTIONS_CLASSNAMEin UsageLimitRecoveryBanner.tsx addsmin-w-0 max-w-fullto the action row span, sets--inline-button-white-space:normal, and makes the inline buttonsmin-w-0 shrink. This removes the nowrap min-width clamp that the issue identifies as the cause of the left-edge overflow. The mechanism matches the diagnosis. The PR reports a browser test that measures the labels inside the card, but I did not rerun it.(b) Details icon:
NoticeHeadingin ComposerBannerStack.tsx replaces the two separateNoticeTextwrappers. It renders onePopoverand one details button, shown when the title or the description overflows. The popover contains both texts when a description exists. This matches the requirement of one details icon.The Stash tab and Dock width split are unchanged, as the issue scope requires. Widening the pane is not used as the fix.
Full details: Out of Scope Changes check
-
Explanation
All changed files map to the objectives of
#48101. The changes in ComposerBanner.tsx (Actionsmin-width and max-width classes), UsageLimitRecoveryBanner.tsx (LIMIT_RECOVERY_ACTIONS_CLASSNAME), and ComposerBannerStack.tsx (NoticeHeading,textOverflows, and the actions class) address the overflow and duplicate-icon layout defects. ThetextOverflowsextraction in ComposerBannerStack.tsx is a refactor that supportsNoticeHeading. The browser test file ComposerBannerStack.browser.test.tsx adds regression coverage for the same layout. TheActionsclass change in ComposerBanner.tsx applies to all composer banners, but it only removes a width constraint and it serves the same layout fix. No unrelated feature or behavior change appears in the diff.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 7b6a2c9
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b0f0d6a8-7876-4ad8-a79b-abb6806a54c8
Commits-
Reviewing files that changed from the base of the PR and between 7b6a2c96f646830f10183339c2031141dd2801ca and 0c26df2b482fd7e415d87b4ee0731c7af82570e4.
Files selected for processing: 4-
apps/web/src/components/chat/ComposerBanner.tsxapps/web/src/components/chat/ComposerBannerStack.browser.test.tsxapps/web/src/components/chat/ComposerBannerStack.tsxapps/web/src/components/chat/UsageLimitRecoveryBanner.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
-
Sign in to join this conversation.
Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — The change improves narrow-pane banner wrapping and consolidates overflow details into one information popover. It also adds a lint-suppression directive, which requires human review under the configured approval requirements.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).