Skip to content

fix(ui): present device pairing retries with Solid actions - #180560

Merged
steipete merged 1 commit into
mainfrom
solid2/pages-c-pairing-actions
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/pages-c-pairing-actions

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: the pairing dialog keeps showing its previous failure while Reload checks whether pairing completed.

User Impact

Reload now shows progress and keeps repeated actions disabled. Closing and reopening the dialog stays responsive while the old request finishes. Pairing expiry, access selection, completion, and recovery retain their existing behavior.

Why This Change Was Made

The pairing owner now enters its existing reconciling state before retrying status. A native Solid action presents the admitted refresh with an optimistic process flag; it retires when the dialog closes or the owner changes its lifecycle. The owner continues to admit requests, reject stale responses, and record their outcomes.

The only shell coupling is that onRefresh returns the existing owner promise instead of discarding it. Its name and arguments are unchanged. The pairing module stays lazy; no receipt registry, duplicate request, or new dependency is introduced.

Evidence

Base: 5b2f0ac681cb9048a9dc7fea4a1db44d5139f44d. Head: c0a03c401fff2744fde26a48745529dd9b3768af. The after build was started before commit while waiting on artifact preparation; all four source hashes were verified identical to the committed head.

Check Result
Regression on base Fails at the missing status-Retry loading indicator
Pairing dialog tests 11/11 pass, including held Retry, close/reopen before completion, creation rejection and recovery
Existing pairing owner tests 27/27 pass
UI typecheck Pass with default tsrs
Typed lint, formatting, controller guard Pass; advisory async event-callback warning in the owner-backed fixture
Production Knip Same two pre-existing heartbeat unused-file findings on base and head
Independent isolated review Clean, no actionable P0–P2 findings
Same-machine production builds and strict performance Both pass, zero strict violations
Startup JS / CSS JS 316,497 → 316,712 B gzip (+215 B); CSS 40,894 B / 1 request unchanged
Built-app visual proof Synthetic Generate, status failure and held Reload; request counts and close/reopen verified

The lazy pairing boundary is preserved. Importing Solid’s native until retirement primitive adds 560 raw bytes to the shared runtime; measured startup gzip grows 215 B and remains below budget.

The capture uses Playwright under Node because it drives a real browser. Unit tests use the pinned Bun runtime. Initial capture attempts exposed a missing Vitest host, capture before build promotion completed, and insufficient fixture request synchronization; retained attempts distinguish those setup failures from product evidence. Broad proof runs in ci:full PR CI.

Solid 2 checklist and size

Counts cover the three touched production modules; tests are excluded.

Item Before → after
Conditional intrinsic handler bugs 0 → 0
Component onCleanup / onSettled registrations 0 → 0 / 2 → 2
Manual async read groups 0 → 0
Manual mutation presentation / native actions / optimistic values 1 → 0 / 0 → 1 / 0 → 1
Manual component loaders 0 → 0
Immutable structured-signal groups 0 → 0
Manual createComponent calls 0 → 0
Throw-only context wrappers 0 → 0
Eligible independent sibling loading regions 0 → 0
Component owner escape APIs 0 → 0

The synchronous owner lifecycle and request token remain authoritative. until() reads the staged lifecycle/open values to release presentation promptly; its observer is aborted after settlement. No affects or refresh is needed because the owner already publishes the accepted result and the view has no cached async read to invalidate.

Production LOC: 1,277 → 1,331 (+54). Test LOC: 109 → 234 (+125). Growth implements the action, explicit rejection handling, and owner-backed behavioral proof.

Before / after

The images below show Generate pending, the preserved status error, and the corrected held Reload state, with each before image followed by its after image.

Generate pending before

Generate pending after

Status error before

Status error after

Held Reload before

Held Reload after

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T11:32:32.346737Z c0a03c4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR shows progress during device pairing retries and retires pending presentation when the dialog closes.

Example: Click Reload after a setup-status request fails with “Synthetic status failure.”

  • Before: The failure and enabled Reload button remain visible during the next request.
  • After: Loading replaces the failure, and Reload is unavailable while the request is pending.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused owner-preserving fix with directly inspected browser proof and distinct lifecycle regression coverage; broad CI is still running.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected built-app before/after screenshots show synthetic Generate pending, preserved status failure, and the corrected held Reload state; the body also records request-count and close/reopen verification against source hashes matching the reviewed head.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Reload leaves the previous pairing failure visible while a status check is already running.
Reason: Clear progress and responsive dismissal improve an existing recovery flow, and the maintainer-authored direction preserves the established pairing contract.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes a verified pairing retry presentation bug while preserving the existing request owner; no actionable introduced defects found, and exact-head CI remains pending.

Priority: P2
Reviewed head: c0a03c401fff2744fde26a48745529dd9b3768af

Before merge

None.

Findings

None.

Agent review details

How this fits together

The shell forwards pairing actions to its overlay owner, which admits Gateway requests and publishes lifecycle snapshots consumed by the lazy Solid pairing dialog.

flowchart LR
  User[Pairing dialog actions] --> Shell[Application shell]
  Shell --> Owner[Overlay pairing owner]
  Owner --> Gateway[Gateway pairing RPC]
  Gateway --> Owner
  Owner --> Snapshot[Lifecycle snapshot]
  Snapshot --> View[Solid action presentation]
Loading

Technical review

Best possible solution:

Use the existing reconciling lifecycle and owner promise with a Solid presentation action that retires on close or lifecycle replacement.

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

Current-main source leaves the lifecycle in status error during its awaited retry, and the inspected before screenshot shows the retained failure; no target code was executed during this review.

Is this the best way to solve the issue?

The change fixes admission feedback at the existing owner and uses Solid only for temporary presentation, preserving request deduplication, late-response rejection, and lazy loading.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7fb4e046d7bf.

Provenance checked

  • Pairing completion and status retry keeps the original intent (3f006ba: Reconcile the exact setup's recorded completion and retire stale credentials without changing approval semantics.)
  • Solid pairing rendering and shell callback keeps the original intent (98a7b4a: Render migrated pages through Solid while leaving domain state and cancellation in plain TypeScript owners and keeping pairing lazy.)
  • Modal footer controls keeps the original intent (7df4181: Place dismissive and secondary actions before primary actions while preserving handlers and native semantics.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned patch and current-main comparison: The introduced patch changes the existing status-error branch to reconciling, forwards the owner promise, and adds lifecycle-scoped optimistic presentation; fetched main retains the original behavior in both pairing modules. (ui/src/lib/device-pair-setup.ts:318, c0a03c401fff)
  • Inspected visual proof: All six linked screenshots were inspected: Generate and failure presentation remain consistent, while held Reload changes from the retained failure to Loading without a Reload button; the final two images were read directly after scratch writes failed because the filesystem is read-only. (c0a03c401fff)
  • Lifecycle ownership and provenance: The overlay publishes synchronous admission before awaiting completion; closing clears the existing request token. The completion contract from fix(ui): complete mobile pairing after code redemption #120933 and lazy-rendering ownership from refactor(ui): render migrated pages through the Solid outlet #170571 remain intact. (ui/src/app/overlays.ts:93, 7fb4e046d7bf)
  • Pinned dependency contract: The changed view imports Solid action, createOptimistic, and until, establishing the dependency contract's relevance. The published rc.16 implementation makes until observe authoritative staged values and disposes its observer on abort, supporting prompt retirement without cancelling the owner request. (packages/signals/src/signals.ts, b0ad1df505b8)
  • Current validation state: The exact-head CI gate remains pending; dependency and security-sensitive statuses passed, and the inspected check runs contain no reported failure. (c0a03c401fff)

PR surface

Source +54, Tests +125. Total +179 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 63 9 +54
Tests 1 129 4 +125
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 192 13 +179

Review metrics

Metric Value Why it matters
Production versus test growth Production +54 LOC; tests +125 LOC Production growth implements scoped presentation and rejection handling; two owner-backed scenarios cover held status retry with close/reopen and creation failure with recovery.

Labels

Label changes:

  • add P2: A limited pairing-dialog feedback bug makes an active retry appear idle but retains an in-product recovery path.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A limited pairing-dialog feedback bug makes an active retry appear idle but retains an in-product recovery path.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 7:44 AM ET / 11:44 UTC.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 11:45
@steipete
steipete merged commit 49c1ab9 into main Oct 22, 2026
109 of 111 checks passed
@steipete
steipete deleted the solid2/pages-c-pairing-actions branch October 22, 2026 11:49
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 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 ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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.

1 participant