Repository navigation
refactor(ui): consolidate page reads and canonical display facts - #175698
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. |
Share replaceable page requests, consume canonical Gateway update/question facts, and reuse the Workshop text diff owner. Preserve display and security boundaries while avoiding repeated internal normalization. Prevent retired Library and Workshop reads from publishing errors into the current scope.
38b0d6c to
c19fc17
Compare
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR shares replaceable page requests, consumes canonical Gateway display records, and prevents retired Skills reads from changing the current view. Example: Switch Workshop from research to scout while research's list request is pending.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed refactor consolidates request ownership and fixes stale Skills errors; no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherControl UI pages receive Gateway RPC results and events, retain connection-scoped request ownership, and publish current results into their display state. flowchart LR
A[Control UI pages] --> B[Shared page request owner]
B --> C[Gateway RPC client]
C --> D[Canonical Gateway producers]
D --> E[Results and events]
E --> F[Scoped display projections]
F --> A
Technical reviewBest possible solution: Retain the shared request owner and canonical producer contracts with the existing scoped publication and effect-admission checks. Do we have a high-confidence way to reproduce the issue? Current-main Library and Workshop failure paths lack the scope checks already used for successful results; the added deferred-request regressions exercise that mismatch, but no target code was run during this review. Is this the best way to solve the issue? The patch reuses the existing Usage invocation model, removes competing implementations, and preserves caller-owned mutation admission; producer and settings-writer inspection supports the explicitly accepted normalization removals. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 53829f9e6a00. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -502, Tests -11. Total -513 across 34 files. Added test files: 2. 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 Reviewed October 17, 2026, 1:11 PM ET / 17:11 UTC. |
|
Merged via squash.
|
…nclaw#175698) Share replaceable page requests, consume canonical Gateway update/question facts, and reuse the Workshop text diff owner. Preserve display and security boundaries while avoiding repeated internal normalization. Prevent retired Library and Workshop reads from publishing errors into the current scope.
What Problem This Solves
Control UI pages independently implement replaceable reads and reconstruct already-canonical Gateway records, leaving several competing owners for the same work.
User Impact
Rendering and supported workflows are unchanged. Skills Library and Workshop now also keep a retired scope's failed read from publishing an error or clearing the current scope's loading state.
Why This Change Was Made
Relocate Usage's request executor into one small page-request owner and adopt it in Plugins, Providers, Worktrees, New Session remote search, Meetings, Memory Import, and Skills. Retain ordinary scope cancellation and caller-owned mutation/security admission. The executor releases before completion callbacks so existing refresh policies can start a successor; publication failures still propagate.
Consume typed update and question records from their Gateway producers instead of maintaining parallel structural decoders. Keep display normalization, URL/media/secret-store checks, omitted-versus-null update semantics, hydration and resolution authority. Reuse the existing text-diff traversal in Workshop and avoid re-normalizing already-normalized theme/settings facts.
Net production reduction: 502 lines against the branch base (tests and proof artifacts excluded). No schema, config, protocol, dependency, or changelog change.
Best-effort tradeoffs accepted
Evidence
Focused owner suites passed, including regressions that failed before the Library/Workshop scope fixes; the latest question/shared-request run passed 91 tests across five files in 27.28 seconds. Earlier unaffected owner runs passed 263 tests. Tests run serially with one worker under isolated HOME/OpenClaw/XDG state. No retries, skips, timeout increases, or weakened retained assertions were introduced.
Targeted production types and all three touched-test graphs passed, extending the canonical UI app/pages/other test configs. Formatting passed all 31 extant changed/new files. Independent review completed scoped-clean P0–P2 against the complete source, with final source verification. Targeted lint passed (two unchanged Meetings stable-callback warnings); lint-suppressions passed 14 tests on both Node and pinned Bun. Runtime cycle check passed with zero cycles. The whole-UI import graph check was stopped after ten minutes of compiler work without a result under shared-host load; no passing result is claimed, and exact-head hosted CI must provide that gate. Exact-head PR CI is the broad proof; no local full suite/build/E2E was run under the shared-host budget.
Inspected before/after synthetic captures cover the update prompt, question card, and Workshop saved-version diff. Layout, labels and ordering match; elapsed live counters in the surrounding mock UI differ. Captures use isolated synthetic fixtures, not a real Gateway or personal state.
Conflict-only rebase: preserved both main's disconnected-import policy regression and this branch's retired-list regression. Production patch is unchanged; only adjacent test placement changed. Rebased Library suite passed 12/12; targeted conflict-test types and lint passed. The suppression replay passed 13/14 on Node and pinned Bun, failing on the inherited
src/infra/database-engine/admission-role.test-support.ts|unicorn/require-post-message-target-origin|1inventory entry absent from its allowlist. Both that source andtest/scripts/lint-suppressions.test.tsare byte-identical to main basea0d2f6e24de16310dbb5a82bf2dc3693f6e8a1b5; this diff adds no suppressions or baseline exceptions. Earlier full proof above is pre-rebase evidence, not new-head hosted success. Exact-head hosted CI remains required.