Skip to content

fix(web): usage limit recovery errors no longer crush the composer banner - #17457

Open
patryksztuczka wants to merge 1 commit into
pingdotgg:mainfrom
patryksztuczka:t3/composer-error-layout
Open

patryksztuczka wants to merge 1 commit into
pingdotgg:mainfrom
patryksztuczka:t3/composer-error-layout

Conversation

@patryksztuczka

Copy link
Copy Markdown

Problem

When Resume at reset or Snooze until reset fails on the usage-limit composer notice, the error text appears inside the notice's actions column. That column sizes to its content, so a long message such as "The provider limit changed before recovery could be configured." widens it until the title shrinks to a few characters ("U r"). The reset time disappears behind the details popover, and the notice grows a second line.

Expected: the notice keeps its one-row layout, the title and reset time stay readable, and the failure is still reported.

To reproduce: a thread stops at a provider usage limit and has a known reset time. Click Resume at reset or Snooze until reset, and have the metadata update fail, for example because the limit changed on the server or the remote environment is disconnected.

Change

UsageLimitRecoveryBanner.tsx reports these failures with an error toast instead of inline text. The toast title is "Could not change auto-resume" or "Could not snooze thread", and the server's message is the description. Other composer notice actions already report failures this way, for example the feedback notice's "Could not copy thread ID". The two buttons are now direct children of the actions slot, without a wrapper div, so a narrow composer uses the stack's existing wrap layout, the same as the goal notice.

Mobile's UsageLimitRecoveryCard is a full-width card with the error below the buttons, so it doesn't have this problem and is unchanged.

Scope and approval

This is a small, focused fix for an obvious layout bug, so it uses the no-prior-issue exception. It is one web file and one problem: failure text overflowed an auto-sized column. It adds no workflow or setting and changes no server behavior or contracts. The before screenshots show the defect. The failure is still reported, through the toast mechanism that other notice actions already use. It is not shown inline anymore, which is what caused the overflow.

Verification

  • Reproduced the bug: I rendered the real ComposerBannerStack and usageLimitRecoveryBannerItem in a temporary harness page in the web app's dev server, with an onChange that fails on purpose. The before version shows the title collapsed and the error filling the row. The after version keeps one row and shows the toast.
  • Checked in the full app: I ran the worktree dev server against a copy of real data and temporarily forced the notice onto a real thread with a failing save. The forcing patch was not committed. Before: the inline error crushes the title. After: the notice stays on one row, and the toast appears in the window's top-right corner below the top bar, over the thread details card, away from the composer.
  • Cases checked: the provider-limit-changed message on Resume, a disconnected-environment message on Snooze, a failure with no error message (generic fallback text), and a narrow composer (~380px).
  • Static checks: tsc --noEmit for apps/web and vp lint on the changed file both pass.
  • Not checked: a thread that actually hit a provider usage limit, because that state can't be produced on demand; light theme; mobile, which is unchanged. I added no automated test because the change is presentational, and repo guidance discourages tests that only assert rendered markup.

Full app (1440×900, 2x)

Before After
before after

Provider limit changed (Resume)

Before After
before after

Disconnected environment (Snooze)

Before After
before after

Narrow composer (~380px)

Before After
before after

Failure without a message

after

Made with Claude Opus 5.5 in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

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

macroscopeapp Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 4c6be82

Macroscope's review found this PR approvable — This is a focused one-file UI fix that preserves recovery actions and error reporting while preventing failure text from collapsing the composer banner. It uses existing toast infrastructure and does not alter server behavior, contracts, product defaults, or static-analysis configuration.

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

…nner

Show Resume/Snooze failures as an error toast instead of inline text in the
banner's auto-sized actions column, which widened to fit the message and
squeezed the title down to a few characters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patryksztuczka
patryksztuczka force-pushed the t3/composer-error-layout branch from 4c6be82 to c47f8b6 Compare October 9, 2026 09:20
@coderabbitai

coderabbitai Bot commented Oct 9, 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: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ccb40779-c963-47d9-a861-88d6d5a83515

📥 Commits

Reviewing files that changed from the base of the PR and between 101f8b2 and c47f8b6.


📒 Files selected for processing (1)
  • apps/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.



📝 Walkthrough

Walkthrough

Recovery action errors now appear as toast notifications. A snooze attempt after the reset time has passed shows a specific toast and refreshes the current time. The banner no longer renders inline error text.

Changes

Usage limit recovery notifications

Layer / File(s) Summary
Recovery action error handling
apps/web/src/components/chat/UsageLimitRecoveryBanner.tsx
The component reports failed snooze and auto-resume operations through action-specific error toasts. If the reset time has passed, the snooze handler shows a specific toast, refreshes the current time, and returns. The component removes its inline error state and alert.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: juliusmarminge


Merge Risk: ⚪ Minimal · up to c47f8

Recovery failures now appear as toasts instead of inline errors. The reviewed notification path is wired to the application renderer, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the web fix and its primary effect: usage-limit recovery errors no longer damage the composer banner layout.
Description check Passed The description includes all required sections, explains the problem and solution, documents the no-prior-issue scope exception, and provides detailed verification results, limitations, and before/aft…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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:S 10-29 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.

1 participant