Repository navigation
refactor(ui): use native async state for agent skills reads - #179353
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. |
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces manual Skills read loading and error presentation with Solid async computations and localized boundaries. Example: Refresh fails while Sample Notes and Sample Weather are cached.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the maintainer-directed refactor preserves the existing request owner, and no actionable introduced bug was found; failing required CI still needs attribution. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Agents settings page admits agent-scoped skills.status requests through its synchronous owner, caches accepted reports, and supplies report promises to the Solid Skills panel. flowchart LR
A[Agent selection and Refresh] --> B[Agents page owner]
B --> C[Skills reader]
C --> D[Gateway skills status]
D --> C
C --> E[Scoped report cache and promise]
E --> F[Solid loading and error boundaries]
F --> G[Skills rows and controls]
Technical reviewBest possible solution: Retain the native presentation boundaries and existing synchronous request/cache owner while settling the required CI failures before landing. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor, so there is no reported product defect to reproduce; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? The patch follows the documented Solid read-presentation pattern without transferring admission, cache publication, or mutation authority into reactive state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 01dfb1dca0c8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +68, Tests +117. Total +185 across 7 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 21, 2026, 6:43 AM ET / 10:43 UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7fa3e94c2
ℹ️ 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".
| onRefresh={() => { | ||
| params.onRefresh(); | ||
| reset(); | ||
| }} |
There was a problem hiding this comment.
Reset the error boundary for every replacement read
After a skills.status rejection, only the Refresh button invokes this wrapper and calls reset(). Other paths can issue a replacement read without changing scope()—notably a successful allowlist Reset calls skills.refresh(agentId) directly—so the Errored boundary remains on its fallback and continues displaying the stale read error even after the new request succeeds. Route all admitted retries through a boundary reset or key the boundary by the issued read.
Useful? React with 👍 / 👎.
# Conflicts: # ui/src/pages/agents/agents-page-state.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce8d94f152
ℹ️ 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".
| <div class="callout danger">{params.readData().agentSkillsError}</div> | ||
| {params.readError || params.readData().agentSkillsUpdateError ? ( | ||
| <div class="callout danger"> | ||
| {params.readError || params.readData().agentSkillsUpdateError} |
There was a problem hiding this comment.
Show the Reset failure instead of the stale read error
When skills.status has already failed and the user then clicks Reset, a rejected config.patch sets agentSkillsUpdateError, but the still-truthy readError wins this ||. The panel therefore continues showing the old read failure and hides the actual Reset failure; render the mutation error separately or prioritize the newer update outcome.
AGENTS.md reference: AGENTS.md:L75-L75
Useful? React with 👍 / 👎.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#179353) * refactor(ui): use native async state for agent skills reads * refactor(ui): keep agent skills read receipt private * test(ui): await HTML preview counter outcome * fix(ui): clear stale skill errors during retries * refactor(ui): keep skill reads at page lifetime
Whole-scope census is pinned to main
79ab1c490784224dc38d6d0e409a2e2da105fdf2; this PR's delta is shown explicitly. C/E/U/N = candidate / allowed exception / unresolved / native group. No pending lane receives credit. Items 1, 2 and 5–10 have zero eligible candidates. Read exceptions are policy-only system information and advisory memory schema support; command exceptions are synchronous preferences/theme writes and native OS permission handoff. The async/actions recipe landed later atc7f6887953ee; it was read before admission. The Skills async read now lives at page lifetime, while the receipt-keyed presentation still clears failed retries. Held-agent and reconnect scope tests prove the next scope can resolve while a retired read stays pending. The authoritative cached report remains necessary for cross-panel counts and reset operations; no second cache is introduced.What Problem This Solves
The Agents Skills panel kept manual loading and error fields beside the admitted read. Its promise now feeds an async memo under localized Loading/Errored boundaries, with pending presentation derived by isPending. The plain owner retains synchronous admission, request retirement, the accepted report, and reset authority. Switching agents or reconnecting retires old reads; cached rows and the filter survive refresh, failure, and retry. A receipt-keyed boundary clears the previous failure as soon as a retry starts.
A manually changed group disclosure can reset after failure/retry because report content remounts; this visible, recoverable edge is accepted instead of adding another disclosure owner. Reset errors remain a separate mutation outcome until the action follow-up.
Current source and proof
This head is
ce8d94f1525a7ac5f111d0c0b217ce97e15a1958, with main79ab1c490784224dc38d6d0e409a2e2da105fdf2integrated by merge. The merge was automatic. The final recipe follow-up moves the async read memo to page lifetime; request admission and receipt-keyed retry boundaries are unchanged.Latest completed scheduled main run 39654415683, exact
2a597857a05582b3ff3d5deaa19de080746746b5, passes every UI unit, real-Gateway, performance, and i18n job. Its eleven failing UI names include all ten failures in this PR: nine offline-recovery cases and the mixed-attachment layout case at line 462 (−875.6875 > 4). The remaining main-only failure is ClawHub mobile gutter restoration. All 69 PR jobs and 165 main jobs were inspected and bound to their exact heads. This qualification uses the latest completed scheduled main; the prior compact-identity and native-titlebar failures no longer qualify. The native inherited-failure route retains the failed CI result and the actual CI checkout evidence; it does not claim green CI. No old-head CI waiver is carried forward.Physical LOC
Production: 1,339 → 1,406 (+67). Tests/helpers: 2,289 → 2,454 (+165). Growth pays for explicit async boundaries and behavior coverage while obsolete read-state machinery is removed.
Before and after
Synthetic Skills data, 1440 × 1000 dark viewport. The failed-refresh state retains both cached rows and the Refresh action.
Deferred retry
Synthetic Sample Agent, 1440×1100 dark viewport. Filter and cached rows remain visible; Refresh changes to Loading while the previous failure clears. All six captures were inspected; three skills.status RPCs and zero page errors on each side.