Skip to content

fix(web): a reconnecting environment can be retried at once - #667

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/desktop-retry-connection
Oct 19, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/desktop-retry-connection

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Problem

When an environment fails to connect, the client waits longer and longer between attempts, up to five minutes. On web and desktop, the chat view's banner hid its Reconnect button while the environment was "reconnecting", and Settings › Connections had no retry at all. So a server that came back could sit unused for minutes with nothing to press. The mobile app already offers "Retry now" in that state.

What changed

  • The chat view's unavailable banner keeps Reconnect for every phase except a first connect (connecting). Before, it showed only for offline and error.
  • A saved environment's ⋯ menu in Settings › Connections offers Reconnect now while the environment is switched on and reconnecting or failed.

Both call upstream's existing environmentCatalog.retryNow, which mobile's button already uses. During an attempt it starts that attempt over; between attempts it skips the rest of the wait. No new state or machinery.

UI changes

Before After
The chat view while Remote is reconnecting The chat view while Remote is reconnecting, before The chat view while Remote is reconnecting, after
Remote's menu in Settings › Connections while reconnecting Remote's menu in Settings › Connections while reconnecting, before Remote's menu in Settings › Connections while reconnecting, after
Remote's menu after its credential is revoked (failed) Remote's menu after its credential is revoked (failed), before Remote's menu after its credential is revoked (failed), after
Remote's menu while connected (unchanged) Remote's menu while connected (unchanged), before Remote's menu while connected (unchanged), after
Remote's menu while switched off (unchanged) Remote's menu while switched off (unchanged), before Remote's menu while switched off (unchanged), after
The offline banner after the credential is revoked (unchanged) The offline banner after the credential is revoked (unchanged), before The offline banner after the credential is revoked (unchanged), after
A connected chat has no banner (unchanged) A connected chat has no banner (unchanged), before A connected chat has no banner (unchanged), after

Before: the banner says Remote is reconnecting and the person can only wait for the next automatic attempt.

before-banner-waits-for-retry.mp4

After: Reconnect connects at once and the banner clears.

after-banner-reconnect.mp4

Before: Remote's menu in Settings › Connections has no retry while it is reconnecting.

before-settings-no-reconnect-action.mp4

After: Reconnect now connects, then leaves the menu.

after-settings-reconnect-now.mp4

Live testing

Pass. Tested commit dffde69ecc, which is the head, against base a2ab050af2 (origin/j5/main). Tested by a GPT-6 Astra peer agent in its own worktree, through the Browser panel. Report: artifacts/test-reports/j5code-live-test-667/dffde69ecc.md.

  • Banner: with Remote's server stopped, head kept Reconnect on "Remote is reconnecting" and base showed no button. After Remote came back, following six failed attempts, pressing Reconnect connected in 601 ms and cleared the banner, about 29 s ahead of the scheduled retry. Base waited out its timer.
  • Settings › Connections: head offered Reconnect now while reconnecting and while failed (revoked credential), and not while connected or switched off. After a separate outage it connected in 385 ms, about 6 s ahead of the timer, and the item left the menu. On a revoked credential it made a real new attempt and returned the same authentication error rather than claiming success. Base offered neither.
  • One real turn: a new thread in the test project on Claude Haiku 5.5 completed through the UI.
  • Rig: --base and --peer can't be combined, so the tester ran a separate --peer setup whose Remote both the base and head tabs paired with. Before and after show the same data. Stopping and starting that Remote made the outages.

My testing decisions:

  • No Codex turn: the change doesn't touch the turn path, providers or MCP.
  • No restart, upgrade or --fresh run: there is no stored state, migration or startup change.
  • No agent-in-plain-words check: nothing agent-facing changed.

Not exercised live: the Electron shell and packaged desktop build (it renders this same web UI), relay and tunnel connections, a second machine, and mobile (unchanged). Pressing Reconnect during an attempt that is already in flight, and waiting for the full five-minute cap, were not exercised separately: both use upstream's unchanged retryNow. Nothing needs testing by hand.

Upstream impact

Two upstream-owned files, recorded as a temporary patch in FORK.md ("A reconnecting environment can be retried at once on web and desktop"), to be dropped when upstream ships an equivalent:

  • apps/web/src/components/ChatView.tsx: one condition.
  • apps/web/src/components/settings/ConnectionsSettings.tsx: one menu item.

This changes what upstream's product does (it shows a control upstream hides), so it is register entry D37 in docs/j5/product/upstream.md. Jackson approved it on 2026-10-19 in conversation, on the plan to build it in J5 first and then evaluate it as a giveback. Upstream main still has the same gap as of 2026-10-19.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior: no new test. The change is display conditions on an existing command whose behavior the supervisor tests already cover; a render test would only mirror the condition.
  • UI changes: before/after screenshots above, and a video for motion or interaction
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md in this PR (temporary patches section; there is no case number)
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md
  • Surfaces: chat banner and Settings › Connections are the web/desktop entry points; mobile already had this; no command palette or keybinding retry exists upstream; no contract, provider or reverse-state change; works the same in every connection mode, since it only calls the client's own retry
  • Docs: no user doc describes connection retry

Claude Opus 5.5 in Claude Code (J5 Code).

🤖 Generated with Claude Code

The chat banner hid Reconnect while an environment was reconnecting, and
the retry wait grows to five minutes, so web and desktop had nothing to
press until the timer ran out. Keep the button for every phase but a first
connect, and add Reconnect now to the environment's menu in Settings ›
Connections. Both call upstream's retryNow, as mobile's Retry now does.
Recorded as register D37 and a FORK.md temporary patch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 19, 2026 7:25pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 10 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 35 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f427796e-a0ad-4320-8bd0-3b957e450feb
📥 Commits

Reviewing files that changed from the base of the PR and between a2ab050 and dffde69.

📒 Files selected for processing: 4
  • FORK.md
  • apps/web/src/components/ChatView.tsx
  • apps/web/src/components/settings/ConnectionsSettings.tsx
  • docs/j5/product/upstream.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Oct 19, 2026
@github-actions github-actions Bot added the size:S 10-29 effective changed lines (test files excluded in mixed PRs). label Oct 19, 2026
Jacksondr5 added a commit that referenced this pull request Oct 19, 2026
Jacksondr5 added a commit that referenced this pull request Oct 19, 2026
Jacksondr5 added a commit that referenced this pull request Oct 19, 2026
@Jacksondr5
Jacksondr5 merged commit 48431ab into j5/main Oct 19, 2026
32 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/desktop-retry-connection branch October 19, 2026 19:44
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026
Jacksondr5 added a commit that referenced this pull request Nov 23, 2026

This branch was successfully deployed

1 active deployment
Preview — dffde69e Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant