Skip to content

🤖 fix: stabilize retry barrier visibility and manual retry feedback#1671

Open
ibetitsmike wants to merge 4 commits intomainfrom
mike/fix-retry-barrier-flicker
Open

🤖 fix: stabilize retry barrier visibility and manual retry feedback#1671
ibetitsmike wants to merge 4 commits intomainfrom
mike/fix-retry-barrier-flicker

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Jan 15, 2026

Summary
This PR stabilizes the bottom-of-chat retry UI by keeping the Retry barrier visible across auto-retry start/fail loops, and adds immediate manual-click feedback for the Retry button so users get instant acknowledgement before stream events arrive.

Background
The retry footer could still visually churn when retry attempts toggled stream-start without visible output yet. Separately, manual Retry clicks had no immediate pending state for non-auto-retryable errors, which made the button feel unresponsive until backend events landed.

After adding manual pending state, we found a remaining UX jump: clicking Retry briefly removed the error-details row because manual retry clears retryState.lastError immediately, shrinking the yellow box before it re-expanded on the next failure.

Implementation

  • ChatPane
    • Reads persisted retry attempt state via getRetryStateKey(...).
    • Computes retry visibility using getInterruptionContext(...) plus shouldKeepRetryBarrierVisibleDuringRetry(...).
    • Keeps retry barrier visible during retry-loop stream starts (before visible token output).
    • Suppresses StreamingBarrier whenever retry barrier UI is active to avoid footer swapping.
  • RetryBarrier
    • Adds a local isManualRetryInFlight state for immediate click feedback.
    • Shows spinner + Retrying... label and temporarily disables the manual Retry button.
    • Keeps the most recent error details visible while manual retry is pending, so the banner height stays stable instead of collapsing/re-expanding.
    • Clears the local pending state when retry transitions into normal auto-retry UI, stream start, or a new error state.
  • retryEligibility
    • Uses the sticky retry predicate to keep the banner stable through retry-loop TTFT gaps.

Validation

  • bun test src/browser/utils/messages/retryEligibility.test.ts
  • make static-check

Risks

  • Low-to-moderate UI-state risk in chat footer transitions.
  • Scope is constrained to retry/stream barrier presentation logic and manual retry button state.
  • Existing retry eligibility tests cover sticky-visibility paths; static checks are green.

Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $11.38

@github-actions github-actions bot added the enhancement New feature or functionality label Jan 15, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11a3acccd0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike
Copy link
Contributor Author

@codex review

Addressed the TTFT regression by restoring the !canInterrupt gate for the hasInterruptedStream(...) branch and expanding the retry-sticky predicate to cover the common case where no assistant DisplayedMessage exists until the first delta.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/fix-retry-barrier-flicker branch from 3bfb874 to 8fae9eb Compare February 10, 2026 20:56
@ibetitsmike ibetitsmike changed the title 🤖 fix: prevent retry banner flicker during auto-retry 🤖 fix: stabilize retry barrier visibility and manual retry feedback Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant