Skip to content

fix(ui): recover channel setup after status check failure - #124680

Merged
steipete merged 4 commits into
mainfrom
codex/autoqa-ui-channel-retry
Aug 17, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/autoqa-ui-channel-retry

Conversation

@steipete

@steipete steipete commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users finishing Custodian setup could lose the channel onboarding status after a transient channels.status failure. The flow neither explained that only the channel check failed nor offered a direct recovery action.

Why This Change Was Made

Custodian now keeps the channel-status failure visible at the owning onboarding surface, offers Retry and dismiss actions, and clears the stale failure only after reconnection or channel-read access loss. The existing channel setup nudge returns after a successful retry, without treating a temporary status failure as a Gateway-wide outage.

User Impact

Users can retry a failed channel status check or dismiss the optional channel setup prompt and continue using the web app. Desktop and mobile layouts preserve the same visible recovery path.

Evidence

  • Node 24.19.0 unit/JSDOM owner tests: 30 passed (ui/src/lib/channels/index.test.ts, ui/src/pages/custodian/custodian-page.channel-onboarding.test.ts).
  • Node 24.19.0 mock-Gateway Playwright Chromium E2E: 1 passed, exercising the status failure, Retry recovery, dismissible setup nudge, desktop 1280×900, and mobile 390px layouts (ui/src/e2e/custodian-channel-onboarding.e2e.test.ts).
  • Final-head screenshots were visually inspected: intended channel-only error and recovered states; no Gateway connection errors or sensitive data.
  • Target oxfmt and oxlint: passed. git diff --check: passed. Changed-path classification: UI + UI tests. Target core test-types stripe 2/5: passed. TruffleHog 3.97.0 changed-file scan: 0 verified/unverified secrets.
  • check:changed could not acquire its Crabbox/Testbox route because the installed Crabbox binary failed its sanity preflight; focused owner tests and E2E were run locally in this dedicated Linux orb instead.
  • Independent exact-head review before rebase found no P0–P2 findings and judged this the best fix. Codex autoreview was unavailable (HTTP 401); no Codex verdict is claimed.

Before: channel status check fails with a focused retry/dismiss action

Final-head screenshot captured and inspected; GitHub attachment upload was blocked by a 404 from the user-attachments endpoint.

After: successful retry restores the channel setup nudge (desktop)

Final-head screenshot captured and inspected; GitHub attachment upload was blocked by a 404 from the user-attachments endpoint.

After: successful retry at 390px mobile width

Final-head screenshot captured and inspected; GitHub attachment upload was blocked by a 404 from the user-attachments endpoint.

Production LOC: +59/-15 (net +44) | Tests/test support: +112/-3. Production growth adds the visible status-error ownership and recovery controls; tests cover reconnect clearing, retry, dismiss, and responsive E2E behavior.

AI-assisted: yes. I understand the change and verified the final rebased head. No transcript is included, per publication instructions.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 16:04
@steipete
steipete force-pushed the codex/autoqa-ui-channel-retry branch from 4fc0e8b to 5b4558d Compare August 16, 2026 16:13
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 12:54 AM ET / 04:54 UTC.

ClawSweeper review

What this changes

The PR keeps a failed channel-status check visible during Custodian onboarding and adds Retry and dismiss actions before restoring the optional channel setup prompt after success.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking correctness findings. This maintainer-owned PR cleanly repairs the stale channel-status state path; keep it open for normal exact-head CI completion and maintainer review.

Priority: P2
Reviewed head: 992623c24b8136fef5cf23f81dc469acd054bbb8

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-backed, while independently inspectable real-surface media is not attached.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This maintainer-owned PR is outside the external-contributor proof gate; its body nevertheless documents a mocked-Gateway browser flow and inspected after-fix screenshots.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned PR is outside the external-contributor proof gate; its body nevertheless documents a mocked-Gateway browser flow and inspected after-fix screenshots.
Evidence reviewed 5 items Current-main failure mechanism: Current main clears the channel error before the request resolves, while Custodian still renders the healthy setup nudge from a retained inactive snapshot without checking that error.
PR repairs the owner boundary: The branch clears channel error only after a successful status response, invalidates stale snapshots across lifecycle changes, and renders the recovery state only in Custodian.
Boundary and browser coverage: The branch adds owner-level lifecycle coverage plus a mocked-Gateway Playwright path that rejects channels.status, observes the alert, retries, and verifies the recovered channel setup prompt at desktop and mobile widths.
Findings None None.
Security None None.

How this fits together

Custodian onboarding reads channel status through the shared Control UI channel capability to decide whether to offer optional channel setup. Gateway status results feed that capability, which then drives either the setup prompt or a focused recovery action.

flowchart LR
  A[Gateway channel status] --> B[Channel status capability]
  B --> C[Custodian onboarding]
  C --> D{Status available?}
  D -->|Yes| E[Optional channel setup]
  D -->|No| F[Retry or dismiss recovery]
Loading

Before merge

  • Resolve merge risk (P1) - Production code is net +42 lines for a bug fix; the dedicated accessible error/retry state is justified, but the recovery behavior should remain confined to the shared status owner and Custodian presentation boundary.
  • Complete next step (P2) - No deterministic repair remains; await exact-head CI and ordinary maintainer review.
Agent review details

Security

None.

PR surface

Source +59, Tests +196. Total +255 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 6 81 22 +59
Tests 4 198 2 +196
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 279 24 +255

Review metrics

Metric Value Why it matters
Production versus test LOC production +62/-20 (net +42); tests/test support +217/-4 (net +213) The production growth implements the visible recovery state and controls, while focused lifecycle, page, and browser coverage exercises failure, retry, dismissal, reconnect, and responsive rendering.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep channel-error lifecycle ownership in the shared capability and keep the Retry/dismiss affordance specific to Custodian onboarding; land after exact-head CI completes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep channel-error lifecycle ownership in the shared capability and keep the Retry/dismiss affordance specific to Custodian onboarding; land after exact-head CI completes.

Do we have a high-confidence way to reproduce the issue?

Yes—current main clears channelsError before a replacement status response while Custodian can still render a stale inactive snapshot; the branch's focused mocked-Gateway tests encode that path, though this read-only review did not execute them.

Is this the best way to solve the issue?

Yes—the patch fixes the shared state lifecycle at its producer and lets Custodian render the recovery UI, avoiding a page-local workaround or duplicated status logic in other consumers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e6a14c0855d9.

Labels

Label justifications:

  • P2: This repairs a bounded but user-visible Control UI onboarding recovery path without evidence of broader availability or data impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned PR is outside the external-contributor proof gate; its body nevertheless documents a mocked-Gateway browser flow and inspected after-fix screenshots.

Evidence

What I checked:

  • Current-main failure mechanism: Current main clears the channel error before the request resolves, while Custodian still renders the healthy setup nudge from a retained inactive snapshot without checking that error. (ui/src/lib/channels/index.ts:205, e6a14c0855d9)
  • PR repairs the owner boundary: The branch clears channel error only after a successful status response, invalidates stale snapshots across lifecycle changes, and renders the recovery state only in Custodian. (ui/src/lib/channels/index.ts:215, 992623c24b81)
  • Boundary and browser coverage: The branch adds owner-level lifecycle coverage plus a mocked-Gateway Playwright path that rejects channels.status, observes the alert, retries, and verifies the recovered channel setup prompt at desktop and mobile widths. (ui/src/e2e/custodian-channel-onboarding.e2e.test.ts:137, 992623c24b81)
  • Current-main and re-review continuity: The affected production files are unchanged between the PR base and current main, and the current head has no source diff from the prior reviewed head after its validation-refresh commit. (ui/src/pages/custodian/custodian-page.ts:201, e6a14c0855d9)
  • History provenance: Blame ties the current error-clear line and Custodian refresh guard to the sidebar-panel refactor commit, which is on current main. (ui/src/lib/channels/index.ts:205, 07da6f6d6d4e)

Likely related people:

  • steipete: Authored the current-main refactor that introduced both the shared channel capability behavior and the Custodian page path under review. (role: recent area contributor; confidence: high; commits: 07da6f6d6d4e; files: ui/src/lib/channels/index.ts, ui/src/pages/custodian/custodian-page.ts)
  • Vincent Koc: Introduced the optional channel setup guidance whose failure recovery this PR preserves. (role: feature introducer; confidence: medium; commits: 2d9cf7b6d1b3; files: ui/src/pages/custodian/custodian-page.ts)
  • Jesse Merhi: Added the richer Custodian setup controls that share this onboarding presentation surface. (role: adjacent feature contributor; confidence: medium; commits: 68be0e337836; files: ui/src/pages/custodian/custodian-surface.ts, ui/src/pages/custodian/event-nudge.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the current exact-head CI complete.
  • Attach a redacted browser artifact if independent visual confirmation is desired.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-16T16:21:02.617Z sha 5b4558d6282df36d76b9d33dfc851e9f39ec2cc0 :: needs changes before merge. :: [P2] Invalidate stale status before clearing its error
  • reviewed 2026-08-16T16:30:33.217Z sha e190194 :: needs changes before merge. :: [P2] Invalidate stale status before clearing its error
  • reviewed 2026-08-17T03:40:55.209Z sha dbc1c18 :: found issues before merge. :: [P2] Keep retry feedback visible while status is pending
  • reviewed 2026-08-17T04:30:57.311Z sha d960649 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/autoqa-ui-channel-retry branch from 5b4558d to e190194 Compare August 16, 2026 16:22
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 16, 2026
@steipete steipete self-assigned this Aug 17, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 17, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 17, 2026
@steipete
steipete merged commit 816ae22 into main Aug 17, 2026
147 checks passed
@steipete
steipete deleted the codex/autoqa-ui-channel-retry branch August 17, 2026 05:30

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants