Skip to content

fix(ui): observe provider review callback failures - #180819

Merged
steipete merged 7 commits into
mainfrom
solid2/w-s2-provider-review-errors
Oct 22, 2026
Merged

steipete merged 7 commits into
mainfrom
solid2/w-s2-provider-review-errors

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Provider review converted rejected continuation, status-refresh, and lazy-dialog requests into a local error string. That mixed transport failures with the owner's terminal-run and queue-hold outcomes and bypassed Solid's async error handling.

Each admitted command now has a completion promise observed by narrow Errored slots. The existing optimistic flags own busy feedback and error-slot lifetime. Nonholding latest reads preserve the dialog and its controls during retry; later terminal owner feedback takes precedence over an earlier transport rejection. Admission, permission checks, queue holds, connection/session retirement, and idempotency-key reuse remain with the existing owner.

The modal keeps its existing lazy boundary. Status checks still reconcile through the session owner. A rejected status check now shows its underlying failure; a resolved status: failed outcome keeps the existing explanatory message.

Proof

Check Result
Integrated-head provider controller unit file 27/27 passed in 2.60 s, --project unit --maxWorkers=1
UI types, targeted lint, formatting, diff check Passed after merging current main
Production Knip Passed; no findings
Independent review Scoped-clean; no actionable P0–P2 findings
Full hosted chat/performance/retention proof Exact-head full CI 39849347675 passed: 38 successful jobs, 27 skipped
Paired base/head production builds and strict performance Passed on the final runtime change against integrated base b3005501; no violations
Startup JavaScript gzip 316,255 → 316,240 B (−15 B)
Startup CSS 41,141 B; 1 request, unchanged
Chat / New boot gzip 1,421,388 → 1,421,526 B / 962,874 → 962,850 B
Visual proof Eight inspected synthetic captures below, at 900×800

The tests cover retained dialog/button identity, clearing an error during held retry, uncertain-request key reuse, status retry without replaying acknowledgment, terminal feedback superseding a rejected refresh, permission retirement, and stale connection/session/review requests.

An intermediate strict status read held a later permission publication behind the action that needed it. The existing permission regression reproduced a 60-second timeout. The final implementation uses latest only for the two status observers; all authority reads remain strict. That regression passes in the complete 27-case controller file.

The final runtime change was built against integrated base b3005501a3ab59e7fb37fa1e27fedb150fd06081 on the same machine and installed toolchain, with pinned build identity. Only the changed production source was temporarily replaced with its base blob, then restored byte-for-byte before the head build. Both builds passed strict budgets; Chat grows 138 B within its cap and New shrinks 24 B. The eight inspected screenshots cover original runtime head dde0dc103db44190cf677e43c06679df77654bee; later corrections preserve their layout, classes, text, and lazy boundary. They were not recaptured for close/reopen behavior, which is covered by the new regression tests.

Recipe and refactor counts

Counts cover chat-provider-review-controller.tsx.

Pattern Before After
Raw callback rejection-to-string branches 3 0
Async completion memos 0 2
action / co-written createOptimistic(false) 2 / 2 2 / 2
createMemo / createSignal / createStore 3 / 0 / 1 5 / 2 / 1
Loading / explicit on / Errored 1 / 0 / 0 1 / 0 / 2
latest 0 2
lazy / onCleanup 1 / 1 1 / 1
isPending, affects, Solid refresh, optimistic stores, Reveal 0 0
Effects, render effects, untrack, listeners, queries, flush, owner APIs 0 0
Outside-hold completion reads 0 0

Production LOC: 476 → 536 (+60). Controller test LOC: 415 → 493 (+78). The growth gives raw failures scoped async observers and preserves owner-error precedence in the notice and dialog. Preload and command completions are separate so reopening cannot retire a pending command or erase its error. No new domain owner or request-generation state is introduced. The recipe now explicitly requires independent completion slots when preparation and command retry lifetimes differ.

Review correction

Review found that reopening the modal replaced the shared completion with its preload promise. Both pending and already-rejected command failures disappeared. The intermediate implementation shared one preload/command completion slot; the correction removes that sharing (1 → 0). Two native-click close/reopen cases failed before the correction and pass after it. Preload now has a separate lifetime-scoped completion memo; the existing latest observers consume both, and explicit command retry still clears command feedback.

CI investigation and final scope

Earlier exact-head runs exposed the unrelated Settings catalog Retry failure:

command-palette-catalog.real-gateway.e2e.test.ts > Control UI catalog publication with a real Gateway > opens Settings pickers from publication and acquires only on Refresh or Retry.

Run 39831563422 captured scalar failure diagnostics: the provider page and feedback root existed, but there were zero feedback nodes, alerts, statuses, buttons, and Retry labels. The exact test also failed in completed scheduled-main run 39832966696. Its remaining core-types job was subsequently confirmed successful; no terminal result was assumed.

The catalog's global error was suppressed when a provider row also reported discovery failure, leaving no Retry action. That independent owner fix landed in #180897 as b3005501a3ab59e7fb37fa1e27fedb150fd06081, with full CI 39844087326 green (38 passed, 27 skipped). This PR merges that main commit and removes the completed test-only diagnostic. Its final diff is the provider controller, its tests, and the coordinated recipe note. Final exact-head full CI 39849347675 passed, including all nine UI E2E shards, three UI unit shards, both real-Gateway shards, performance, security, types/lint, and the CI gate. No inherited-failure exception is needed for this replacement.

Screenshots

Each pair uses synthetic provider-review data. The status-error view changes from a generic message to the underlying failure; held retries retain their controls and layout.

Before: continuation failure

After: continuation failure

Before: held continuation retry

After: held continuation retry

Before: status refresh failure

After: status refresh failure

Before: held status retry

After: held status retry

@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-22T20:32:37.827563Z 697a16f New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dde0dc103d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +281 to +285
return observe(
active,
ProviderReviewModal.preload()
.then(() => update(active, { open: true }))
.finally(() => update(active, { loading: false })),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve command failures when reopening the dialog

If the user closes the dialog while a continuation/status request is pending—or after its rejection is displayed—and then clicks “Review findings,” this observe call replaces the shared completion with the modal preload promise. A later request rejection is consequently only swallowed by the catch consumer and never reaches Errored; an already-visible rejection is also cleared merely by reopening the dialog. Keep preload feedback separate from the command completion so recovery errors remain visible until the command is explicitly retried.

AGENTS.md reference: ui/AGENTS.md:L16-L18

Useful? React with 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 17:29
@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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@steipete
steipete disabled auto-merge October 22, 2026 17:39
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR presents provider-review callback failures through scoped Solid error boundaries while preserving retry controls and command feedback across dialog reopening.

Example: A continuation status refresh rejects with “Status refresh unavailable. Try again.”

  • Before: The dialog replaces the underlying failure with a generic status-refresh message.
  • After: The dialog displays the underlying failure beside the retained Check continuation status control.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has no actionable findings; confidence rests on inspected presentation evidence and controller-level coverage.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected screenshots cover synthetic failure and held-retry presentation on the earlier runtime head, while the final reopening correction is supported by the reported controller regressions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Provider-review status failures lose their underlying explanation, and asynchronous failure feedback must survive dialog dismissal and reopening.
Reason: The maintainer-authored direction improves recovery feedback while preserving the existing review workflow and authority owner.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the earlier dialog-reopening finding is fixed, and the focused change has no remaining actionable code findings.

Priority: P2
Reviewed head: 697a16f0fe2ab56923a2dab26ce317d4a300c319

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The final close/reopen correction has reported red-before/green-after mounted-controller coverage rather than a supplied run through the shipped Chat page.
Agent review details

How this fits together

The Chat provider-review presentation receives session-owner facts and user actions, invokes existing continuation and reconciliation operations, and displays their progress and outcomes.

flowchart LR
  A[Chat session facts] --> B[Provider review owner]
  C[Review dialog actions] --> B
  B --> D[Continuation RPC]
  B --> E[Session reconciliation]
  D --> F[Command completion]
  E --> F
  F --> G[Scoped error feedback]
Loading

Technical review

Best possible solution:

Keep separate preparation and command receipts in the existing provider-review owner, with narrow error slots and unchanged admission rules.

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

Current-main source converts a rejected status refresh into generic feedback; supplied screenshots demonstrate that behavior, but no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change follows the existing Solid recipe, removes the superseded rejection-copying branches, and separates preparation from command completion because their retry lifetimes differ.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7492ad6400de.

Provenance checked

  • Callback failure presentation changes intended behavior with a stated reason (48f664c: The original provider-review feature displayed failures while retaining the pause and explicit retry controls; later Solid refactors preserved that contract.)
  • Admission, reconciliation, and terminal outcomes keeps the original intent (1a4ec50: Per-review presentation transactions isolate retired requests while synchronous checks and canonical session receipts retain authority.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1a4ec50 adds ui/src/pages/chat/chat-provider-review-controller.tsx:174 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1a4ec507430e; files: ui/src/pages/chat/chat-provider-review-controller.tsx)

PR surface

Source +60, Tests +78, Docs +5. Total +143 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 89 29 +60
Tests 1 84 6 +78
Docs 1 5 0 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 178 35 +143

Review metrics

Metric Value Why it matters
Production versus test growth Production +60 net lines; tests +78 net lines Growth supplies independent completion lifetimes and focused coverage of retry identity, reopening, and terminal-feedback precedence without adding a domain owner.

Labels

Label changes:

  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded improvement to provider-review error presentation and recovery feedback.
  • 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.
  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-22T17:39:11.217Z sha dde0dc1 :: needs changes before merge. :: [P2] Preserve command failures when reopening the dialog
  • reviewed 2026-10-22T18:12:59.151Z sha 20bb308 :: needs changes before merge. :: [P2] Preserve command failures when reopening the dialog

Reviewed October 22, 2026, 4:35 PM ET / 20:35 UTC (Revision 3).

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. and removed clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Fixed the dialog-reopening finding in 697a16f0fe2ab56923a2dab26ce317d4a300c319. Modal preparation now has its own completion slot, so reopening preserves a pending or rejected command. Both close/reopen cases failed before the fix; all 27 controller cases pass afterward. Current-base/head production builds, strict performance, UI types, lint, formatting, production Knip, and final independent review pass. The PR body includes updated counts and proof limits.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@steipete
steipete merged commit 34cb685 into main Oct 22, 2026
117 of 124 checks passed
@steipete
steipete deleted the solid2/w-s2-provider-review-errors branch October 22, 2026 21:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
* fix(ui): observe provider review callback failures

* test(ui): type provider review buttons precisely

* fix(ui): keep provider review permission updates live

* test(ui): capture catalog retry failure presentation

* test(ui): remove completed catalog failure diagnostic

* fix(ui): retain provider command errors across dialog reopen
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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant