Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep usage-limit snooze actions available #21952

Closedln-bodicherla(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/21952/headopened View on GitHub

When a usage-limited thread has both snooze and auto-resume armed, the web banner only shows "Cancel auto-resume". There is no way to wake the thread from the banner, even though mobile already offers "Wake now".

Keep the snooze button visible and show "Wake now" while the snooze is active. Waking changes only snooze, leaving auto-resume armed. Once the reset passes, show a disabled "Snooze until reset" button so stale snooze metadata does not keep the banner in its active state.

Fixes #21397. This is a small fix to the existing web control and its expiry check.

Five Chromium browser tests pass, covering wake, independent snooze and auto-resume controls, expiry while mounted, expired state on mount, and recovery from a different run. Three fail against the original component. Scoped lint and web typecheck also pass.

Browser test command, from apps/web:

../../node_modules/.bin/vp test run --project browser src/components/chat/UsageLimitRecoveryBanner.browser.test.tsx

Before · After

Screenshots use the real banner components and application CSS with controlled test props. Full app, provider, and native client flows were not exercised.

Implemented with GPT-6 through the Codex harness.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. 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: 418b4384-4a7d-46b4-90fd-5ca03eaa929a
      📥 Commits

      Reviewing files that changed from the base of the PR and between 54983e3f458871dffe755ea908ffe0d60cea101b and b6d611ac356c7c21b9ffd694a3c1130920368714.

      📒 Files selected for processing: 2
      • apps/web/src/components/chat/UsageLimitRecoveryBanner.browser.test.tsx
      • 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

      The usage-limit banner now recognizes snoozes only when they match the reset time and remain active. It always renders the snooze control, changing its label to “Wake now” when snoozed. Browser tests cover snooze actions, auto-resume independence, reset expiry, and recovery for another run.

      Changes: Usage-limit recovery banner

      Layer / File(s)Summary
      Snooze state and banner actions
      apps/web/src/components/chat/UsageLimitRecoveryBanner.tsx, apps/web/src/components/chat/UsageLimitRecoveryBanner.browser.test.tsx
      The banner treats a snooze as active only when it matches the reset time and has not expired. It renders “Wake now” when snoozed. Browser tests cover snooze and auto-resume actions, reset expiry, and run matching.

      Priority: ⬇️ Low

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

      Change: Bug fix · Severity of issue fixed: Low

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to b6d61

      The banner change is ready to merge after normal checks; no outstanding behavior issue is established.

      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Title checkPassedThe title is concise, uses the required conventional format, and clearly describes the main web change: keeping usage-limit snooze actions available.
      Description checkPassedThe description explains the problem, change, linked issue, focused verification, test results, screenshots, limitations, and implementation details. It does not reproduce the template headings, but i…
      Linked Issues checkPassedIssue #21397 requires a web action for the snoozed state and expiry handling. UsageLimitRecoveryBanner.tsx now keeps the snooze button rendered, labels it Wake now while the matching snooze is act…
      Out of Scope Changes checkPassedThe pull request changes only UsageLimitRecoveryBanner.tsx and its focused browser test. The implementation directly addresses issue #21397. The tests support the changed banner behavior. No unrelat…
      Full details: Description check

      Explanation

      The description explains the problem, change, linked issue, focused verification, test results, screenshots, limitations, and implementation details. It does not reproduce the template headings, but it contains the required information and is sufficiently complete.

      Full details: Linked Issues check

      Explanation

      Issue #21397 requires a web action for the snoozed state and expiry handling. UsageLimitRecoveryBanner.tsx now keeps the snooze button rendered, labels it Wake now while the matching snooze is active, and sends only snooze: false, so auto-resume remains armed. The snoozed state also requires snoozedUntil to be later than nowMs. The reset timer updates nowMs, which changes the control to a disabled Snooze until reset action after expiry. The five browser tests cover wake behavior, independent controls, mounted expiry, expired mount state, and run matching.

      Full details: Out of Scope Changes check

      Explanation

      The pull request changes only UsageLimitRecoveryBanner.tsx and its focused browser test. The implementation directly addresses issue #21397. The tests support the changed banner behavior. No unrelated production behavior or files are present in the reviewed diff.

      ✨ 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.
    3. Closing: current main already covers this as of f416175804. If you still see it on a build that includes that commit, reply and we'll reopen.

    4. juliusmarminge closed this

Sign in to join this conversation.