Skip to content

[Bugfix #451] Replace intrusive reconnect overlay with status dot + fix premature give-up#452

Merged
waleedkadous merged 1 commit intomainfrom
builder/bugfix-451-terminal-reconnect-replace-inl
Feb 19, 2026
Merged

[Bugfix #451] Replace intrusive reconnect overlay with status dot + fix premature give-up#452
waleedkadous merged 1 commit intomainfrom
builder/bugfix-451-terminal-reconnect-replace-inl

Conversation

@waleedkadous
Copy link
Contributor

Summary

Fixes two issues with the terminal reconnect feature (PR #445):

  1. UX: Replaced the yellow "Reconnecting..." overlay (which covered terminal content) with a small status dot indicator in the terminal controls area
  2. Bug: Fixed premature reconnect give-up caused by a flawed rapid failure detection mechanism

Fixes #451

Root Cause

UX issue: The terminal-reconnecting-overlay div was positioned absolutely over the terminal content, obscuring output during reconnection attempts.

Premature give-up: The rapidFailures counter counted WebSocket connections that closed within 2 seconds of creation. When the server was temporarily unreachable, each failed connection attempt (which fails in <2s by definition) was counted as a "rapid failure" — regardless of the backoff delay between attempts. After just 5 such failures (~15 seconds), the reconnect permanently gave up, even though the session was still alive on the server (page reload would succeed).

Fix

  1. Status dot: Added a small colored dot to the TerminalControls component:

    • No dot when connected (clean state)
    • Yellow pulsing dot when reconnecting
    • Red dot when disconnected
  2. Reconnect logic: Removed the flawed rapidFailures mechanism entirely. Increased MAX_ATTEMPTS from 15 to 50 (with 30s backoff cap, gives ~20 minutes of retry). Exponential backoff alone is sufficient for graceful degradation.

Test Plan

  • Regression test added (verifies 10+ rapid failures don't cause premature give-up)
  • Status dot tests (reconnecting dot shown/hidden, disconnected dot after max attempts)
  • Build passes
  • All reconnect tests pass (11/11)
  • All backend tests pass (1798/1798)
  • Pre-existing failures in fit-scroll and ime-dedup tests confirmed on main

…t + fix premature give-up

Two fixes:

1. UX: Replace the yellow "Reconnecting..." overlay (which covered terminal
   content) with a small status dot in the terminal controls area.
   Yellow pulsing = reconnecting, red = disconnected. No dot when connected.

2. Bug: Remove the flawed rapidFailures mechanism that caused premature
   reconnect give-up. When the server was temporarily unreachable, each
   failed WebSocket connection (which fails in <2s) was counted as a "rapid
   failure" regardless of backoff delay. After just 5 such failures (~15s),
   reconnect gave up permanently — even though a page reload would succeed.
   Now uses only MAX_ATTEMPTS (increased from 15 to 50, giving ~20 minutes
   of retry with 30s backoff cap).
@waleedkadous waleedkadous merged commit 965c2d4 into main Feb 19, 2026
6 checks passed
@waleedkadous waleedkadous deleted the builder/bugfix-451-terminal-reconnect-replace-inl branch February 19, 2026 19:21
waleedkadous added a commit that referenced this pull request Feb 20, 2026
Includes:
- #447: Dashboard hostname display
- #448: Spawn improvements (no-spec + GitHub naming)
- #449: codev update --agent
- #452: Reconnect status dot + give-up fix
- #453: af send composing state
- #455: ASPIR progress calculator fix
- CI cron false alert fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal reconnect: replace inline overlay with status dot + fix premature give-up

1 participant