Repository navigation
fix(ui): observe provider review callback failures - #180819
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| return observe( | ||
| active, | ||
| ProviderReviewModal.preload() | ||
| .then(() => update(active, { open: true })) | ||
| .finally(() => update(active, { loading: false })), |
There was a problem hiding this comment.
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 👍 / 👎.
|
Codex review: needs maintainer review before merge. What this changesThis 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.”
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +60, Tests +78, Docs +5. Total +143 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)Reviewed October 22, 2026, 4:35 PM ET / 20:35 UTC (Revision 3). |
|
Fixed the dialog-reopening finding in @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* 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
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
Erroredslots. The existing optimistic flags own busy feedback and error-slot lifetime. Nonholdinglatestreads 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: failedoutcome keeps the existing explanatory message.Proof
--project unit --maxWorkers=1b3005501; no violationsThe 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
latestonly 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
b3005501a3ab59e7fb37fa1e27fedb150fd06081on 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 headdde0dc103db44190cf677e43c06679df77654bee; 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.action/ co-writtencreateOptimistic(false)createMemo/createSignal/createStoreLoading/ expliciton/Erroredlatestlazy/onCleanupisPending,affects, Solidrefresh, optimistic stores,Revealuntrack, listeners, queries, flush, owner APIsProduction 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
latestobservers 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
39831563422captured 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 run39832966696. 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 CI39844087326green (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 CI39849347675passed, 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.