Skip to content

refactor(ui): use native async state for agent skills reads - #179353

Merged
steipete merged 8 commits into
mainfrom
solid2/w-s2-agent-catalogs
Oct 21, 2026
Merged

steipete merged 8 commits into
mainfrom
solid2/w-s2-agent-catalogs

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Family Files Production LOC 1 handlers 2 lifecycle 3 reads C/E/U/N 4 commands C/E/U/N 5 lazy 6 collections 7 JSX 8 context 9 Reveal 10 owner APIs
Agents editor / non-memory 22 5,371 → 5,438 0 0 11C/0E/0U/1N → 10C/0E/0U/2N 7C/0E/0U/0N 0 0 0 0 0 0
Agents memory 12 2,734 0 0 4C/0E/0U/1N 2C/0E/0U/0N 0 0 0 0 0 0
Config Appearance / shared 14 4,121 0 0 2C/1E/0U/5N 2C/1E/0U/1N 0 0 0 0 0 0
Config other 31 5,305 0 0 4C/0E/0U/0N 4C/1E/0U/0N 0 0 0 0 0 0
Config health 3 1,301 0 0 1C/0E/0U/0N 1C/0E/0U/0N 0 0 0 0 0 0
Config memory 5 1,279 0 0 0C/1E/0U/1N 2C/0E/0U/0N 0 0 0 0 0 0
Config Talk 4 1,471 0 0 1C/0E/0U/2N 2C/0E/0U/0N 0 0 0 0 0 0
Sessions 22 3,982 0 0 2C/0E/0U/2N 8C/0E/0U/0N 0 0 0 0 0 0
Total 113 25,564 → 25,631 0 0 25C/2E/0U/12N → 24C/2E/0U/13N 28C/2E/0U/1N 0 0 0 0 0 0

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 at c7f6887953ee; 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 main 79ab1c490784224dc38d6d0e409a2e2da105fdf2 integrated 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.

Check Result
Frozen install / UI typecheck Passed on this integrated source
Focused tests Skills browser 10/10 passed once after the lifetime refactor (22.63 s file wall time); deferred explicit-refresh, receipt-driven retries, held-agent replacement, and held reconnect replacement are covered
Independent review Original migration, deferred-retry correction, and the final two-file read-lifetime correction scoped-clean P0–P2; final source verification passed
Production Knip Final read-lifetime head passed with no diagnostics and no new ignores
Paired production budget Startup 325,179 → 325,165 B (−14); Chat 1,497,060 → 1,497,035 B (−25); New Session 1,019,997 → 1,019,976 B (−21); CSS 40,780 B / 1 request unchanged; final strict checker passed, maximum locale growth +4 B
Full CI Exact-head ci:full run 39655081993 completed with ten failing test names; all ten match exact names and assertion signatures on completed scheduled main 39654415683. All UI unit, real-Gateway, performance, i18n, and security checks passed
Synthetic visual proof Inspected before/after synthetic captures below; this main integration adds no visual behavior

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.

State Before After
Settled Before: settled Skills panel After: settled Skills panel
Failed refresh Before: failed refresh retains cached Skills After: failed refresh retains cached Skills

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.

Before: retry keeps the old Skills error

After: retry clears the Skills error while loading

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

clawsweeper Bot commented Oct 21, 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 21, 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-21T18:45:50.902939Z ce8d94f 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: Both rows and Refresh remain visible alongside the manually stored read error.
  • After: Both rows and Refresh remain visible through the native error boundary.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-consistent refactor with inspected visual evidence and useful boundary tests; required CI remains failed without established attribution.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected synthetic Control UI captures show settled and failed-refresh states with cached rows and Refresh intact, supported by focused owner and browser tests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Skills reads should retain cached content, retry controls, and correct scope retirement while the UI adopts native async presentation.
Reason: The maintainer-authored direction matches the repository's Solid guidance, preserves existing owners, and explicitly accepts the small disclosure-state tradeoff.

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
Reviewed head: 69b710b31f09e0dfe9cc7c9d5298e39f54051ee0

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The inspected screenshots establish settled and failed-refresh presentation; retry, reconnect retirement, and pending-reset behavior are supported by the reported focused tests rather than recorded browser interaction.
Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +68, Tests +117. Total +185 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 131 63 +68
Tests 4 140 23 +117
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 271 86 +185

Review metrics

Metric Value Why it matters
Production versus test growth Production +68 net lines; tests/helpers +117 net lines Production growth implements localized boundaries and shared content while removing manual read presentation; added tests protect distinct rendering, admission, reconnect, undefined-result, and mutation-error cases.

Labels

Label changes:

  • add P3: This is a focused internal UI refactor with preserved user behavior and an explicitly accepted recoverable disclosure reset.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused internal UI refactor with preserved user behavior and an explicitly accepted recoverable disclosure reset.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Establish whether the chat-table, HTML-publication, and automation-delivery failures also occur on the base before assigning repair work.

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 21, 2026, 6:43 AM ET / 10:43 UTC.

@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: 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".

Comment thread ui/src/pages/agents/panels-skills.tsx Outdated
Comment on lines +56 to +59
onRefresh={() => {
params.onRefresh();
reset();
}}

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 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 👍 / 👎.

@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: 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}

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 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 👍 / 👎.

@steipete
steipete merged commit 3333c58 into main Oct 21, 2026
124 of 138 checks passed
@steipete
steipete deleted the solid2/w-s2-agent-catalogs branch October 21, 2026 20:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…#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
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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