Skip to content

fix(ui): preserve structured login error codes - #120069

Merged
fuller-stack-dev merged 1 commit into
openclaw:mainfrom
fuller-stack-dev:fix/control-ui-structured-login-errors
Aug 7, 2026
Merged

fuller-stack-dev merged 1 commit into
openclaw:mainfrom
fuller-stack-dev:fix/control-ui-structured-login-errors

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • preserve structured Gateway connect-error detail codes in the Control UI application snapshot
  • retain the outer error code as the fallback when a failure has no structured detail
  • cover missing-token, pairing-required, and generic transport behavior from the store through the rendered login gate

Root cause

The browser client delivered both the outer protocol code and the more specific details.code, but the application store retained only the outer code. Login classification treats a present unknown outer code as authoritative, so AUTH_TOKEN_MISSING could be rendered as a generic transport failure.

Verification

  • focused UI/API suite: 4 files, 124 tests passed
  • browser E2E: 7/7 passed on Blacksmith Testbox
  • source-blind behavior validation: 7/7 passed on Blacksmith Testbox
  • changed-file gate: passed on Blacksmith Testbox
  • dead-export scan: 0 findings on both untouched base and proposed head
  • autoreview: clean, no accepted/actionable findings

Screenshots

Before

final

After

final

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 6, 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. P2 Normal backlog priority with limited blast radius. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

The PR preserves a Gateway connection error’s structured detail code in the Control UI snapshot so the login gate can show correct authentication, pairing, or transport guidance.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking code finding: this is the correct snapshot-boundary repair for a current Control UI login-guidance bug. It remains open for maintainer review because it is maintainer-protected and the exact-head failed-check logs could not be inspected.

Priority: P2
Reviewed head: 78c4405f60a1a079c4690c9a37f1353355b0ad5a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-correct repair with strong targeted coverage; only exact-head check status remains to be resolved by maintainers.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the supplied mock-backed browser E2E and screenshots remain supplemental evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the supplied mock-backed browser E2E and screenshots remain supplemental evidence.
Evidence reviewed 5 items Current-main defect: Current main stores only the outer Gateway error code, discarding the structured detail code before the login gate reads the snapshot.
Protocol and UI contract: The browser client preserves error details and the canonical resolver extracts normalized details.code; the login classifier treats an unknown present outer code as authoritative.
Visible-path coverage: The added store tests cover detail precedence and outer-code fallback, while the E2E test sends deferred connect failures through the browser app to the rendered login gate.
Findings None None.
Security None None.

How this fits together

The browser Gateway client receives protocol connection errors and projects them into the Control UI application snapshot. The login gate consumes that snapshot to select a recovery message for the operator.

flowchart LR
  A[Gateway connection] --> B[Browser client error]
  B --> C[Application snapshot]
  C --> D[Login guidance classifier]
  D --> E[Authentication or pairing guidance]
  E --> F[Operator recovery action]
Loading

Decision needed

Question Recommendation
Should the failed exact-head checks be repaired or rerun before this maintainer-authored UI fix is merged? Resolve or rerun checks: Inspect the failed exact-head jobs and repair or rerun any failure that is attributable to this branch.

Why: The patch is source-correct, but unavailable check logs prevent determining whether the recorded failures are patch-caused.

Before merge

  • Resolve merge risk (P1) - The exact-head check rollup has failures whose logs could not be retrieved, so a maintainer must establish whether they need repair or a clean rerun before merge.
Agent review details

Security

None.

PR surface

Source +1, Tests +98. Total +99 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 2 98 0 +98
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 100 1 +99

Review metrics

Metric Value Why it matters
Production vs test LOC production +2/-1 (net +1), tests +98/-0 The sole production change reuses the existing canonical detail-code resolver; the remainder is focused regression coverage.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the canonical structured-code resolver at the UI snapshot boundary, retain the outer code as fallback, and merge after exact-head checks are understood or green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the canonical structured-code resolver at the UI snapshot boundary, retain the outer code as fallback, and merge after exact-head checks are understood or green.

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

Yes, from source: a connect error with an unknown outer code and AUTH_TOKEN_MISSING or PAIRING_REQUIRED in details.code reaches the snapshot, where current main loses the detail before classification. The added browser E2E exercises that path with a protocol-shaped mock transport.

Is this the best way to solve the issue?

Yes. Preserving the canonical detail code in the application snapshot fixes the owner boundary without conflating wire-level Gateway codes or duplicating the parser in the login gate.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Incorrect login recovery guidance affects a bounded Control UI path without evidence of data loss, security bypass, or runtime unavailability.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the supplied mock-backed browser E2E and screenshots remain supplemental evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Current-line blame assigns the snapshot projection, UI resolver, and protocol detail parser to the same commit by Peter Steinberger. (role: introduced current error-projection and detail-code path; confidence: high; commits: 65d2222a6e84; files: ui/src/app/gateway-store.ts, ui/src/api/gateway.ts, packages/gateway-protocol/src/connect-error-details.ts)

Rank-up moves

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

  • Inspect or rerun the failed exact-head jobs before merge.

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 (1 earlier review cycle)
  • reviewed 2026-08-07T00:36:38.729Z sha 78c4405 :: needs maintainer review before merge. :: none

@fuller-stack-dev fuller-stack-dev self-assigned this Aug 7, 2026
@fuller-stack-dev
fuller-stack-dev merged commit ab4761f into openclaw:main Aug 7, 2026
113 of 118 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 8, 2026
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

1 participant