Skip to content

refactor(ui): use native readiness for plugin details - #180231

Closed
steipete wants to merge 6 commits into
mainfrom
solid2/w-s2-plugin-detail-readiness
Closed

steipete wants to merge 6 commits into
mainfrom
solid2/w-s2-plugin-detail-readiness

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope production census at integrated base f25a10e929c2c0875b6d3a6f6e6a2936726af520 → current focus- and refresh-repaired production candidate. Counts are AST syntax, not defect counts; each cell is before → after. Semantic candidates and exceptions are named below.

Family LOC 1 Handler expressions 2 Cleanup 3 Async memos / Loading / Errored 4 Actions / optimistic 5 Imports / lazy 6 Structured / stores / projections 7 Factories 8 Contexts 9 Reveal 10 Owner APIs
solid 7931 → 7931 3 → 3 6 → 6 0/3/1 → 0/3/1 2/1/1 → 2/1/1 3/2 → 3/2 0/1/0 → 0/1/0 0 → 0 0 → 0 0 → 0 1/1/1 → 1/1/1
config 4962 → 4962 0 → 0 0 → 0 0/0/0 → 0/0/0 0/0/0 → 0/0/0 0/0 → 0/0 1/1/0 → 1/1/0 0 → 0 0 → 0 0 → 0 0/0/0 → 0/0/0
menus 8289 → 8289 0 → 0 2 → 2 0/2/2 → 0/2/2 1/1/0 → 1/1/0 3/1 → 3/1 1/1/0 → 1/1/0 2 → 2 0 → 0 0 → 0 0/0/0 → 0/0/0
rest 20087 → 20087 4 → 4 16 → 16 2/7/3 → 2/7/3 2/2/0 → 2/2/0 6/1 → 6/1 1/2/0 → 1/2/0 0 → 0 2 → 2 0 → 0 0/1/0 → 0/1/0
pagesA 26649 → 26649 3 → 3 3 → 3 13/30/29 → 13/30/29 15/20/0 → 15/20/0 6/0 → 6/0 1/3/1 → 1/3/1 0 → 0 0 → 0 0 → 0 0/0/0 → 0/0/0
pagesB 43633 → 43633 1 → 1 9 → 9 2/30/21 → 2/30/21 8/8/3 → 8/8/3 22/4 → 22/4 3/7/1 → 3/7/1 0 → 0 1 → 1 1 → 1 0/0/0 → 0/0/0
pagesC 54836 → 54977 4 → 4 27 → 27 1/17/14 → 2/19/16 3/5/0 → 3/5/0 43/4 → 43/4 10/10/0 → 10/10/0 20 → 20 0 → 0 0 → 0 0/0/0 → 0/0/0
app 31666 → 31666 2 → 2 3 → 3 0/9/8 → 0/9/8 0/0/0 → 0/0/0 68/7 → 68/7 0/2/0 → 0/2/0 0 → 0 1 → 1 0 → 0 0/0/0 → 0/0/0
lib 54725 → 54725 0 → 0 5 → 5 0/2/2 → 0/2/2 1/1/0 → 1/1/0 15/1 → 15/1 1/2/0 → 1/2/0 0 → 0 1 → 1 0 → 0 2/2/0 → 2/2/0
plugins 4024 → 4024 0 → 0 3 → 3 0/4/4 → 0/4/4 1/1/0 → 1/1/0 13/1 → 13/1 1/2/0 → 1/2/0 0 → 0 0 → 0 0 → 0 2/3/2 → 2/3/2
api 2104 → 2104 0 → 0 0 → 0 0/0/0 → 0/0/0 0/0/0 → 0/0/0 2/0 → 2/0 0/0/0 → 0/0/0 0 → 0 0 → 0 0 → 0 0/0/0 → 0/0/0
total 258906 → 259046 17 → 17 74 → 74 18/104/84 → 19/106/86 33/39/4 → 33/39/4 181/21 → 181/21 19/31/2 → 19/31/2 22 → 22 5 → 5 1 → 1 5/7/3 → 5/7/3

What Problem This Solves

Installed-plugin inspection and selected catalog details now consume the completion of their existing admitted requests through Solid async reads under Loading and Errored. Loaders remain the sole owners of current selection, Gateway authority, and accepted snapshots. Optional tools/catalog enrichment still cannot block installed controls.

The completion slot is separate from accepted editable content. Closing a detail, switching identity, or losing the connection retires its presentation immediately without waiting for transport. The two loader-owned error copies are removed; visible retry actions retry the request and reset the native error boundary. No new RPC, dependency, host, route, or eager import is introduced.

The selected full CI exposed a removal-focus ordering regression: the inventory refresh starts a separate catalog read, so its heading may not exist at the first settled callback. Removal now awaits the current admitted detail receipt before restoring focus; navigating away retires that wait and preserves the new selection. The regression failed on the real focus assertion before the repair and now passes for both completion and navigation. The final review also caught a same-plugin refresh replacing accepted controls with a loading skeleton: the loading key now follows accepted plugin identity, retaining the same live controls during revalidation. The new control-identity regression passes and fails with the original receipt-only key.

Touched-family checklist Before → after
1 Native handler binding defects 0 → 0
2 Component-only cleanup debt 0 → 0; synchronous request/authentication custody retained in the page owner
3 Manual primary read presentations 2 → 0; installed inspection and selected catalog detail
4 Mutations Unchanged existing consent/config settlement owners
5 Lazy boundaries Unchanged plugin route boundary
6 Structured edit copies 0 → 0; accepted snapshots are plain-owner publications
7 Handwritten component factories 0 → 0
8 Redundant context wrappers 0 → 0
9 Sibling reveals needing coordination 0 → 0; details are alternative selections
10 Foreign owner APIs added 0 → 0

Two silent-sample exceptions remain: optional installed tools metadata and remote catalog enrichment. Consent inspection and config/schema are separate assigned PRs. No isPending or latest probe is needed for a slot whose resolved value is only null; accepted content already lives outside it.

Evidence

Check Result
Focused tests 23/23 Plugins tests before integration; removal-focus regression 2/2 (settled and navigated read); final same-plugin refresh regression passed and failed on the old key; previous chat output-intent 5/5 pass was superseded by main's version during conflict resolution. The integrated output-intent replay ended with a no-output watchdog and no assertion result; default pinned Bun, one worker
Types / lint / formatting UI tsrs, focused typed lint, formatting and diff check pass
Regression contracts Retained accepted inspection after failed refresh; visible retry; inspection before optional enrichment; close held installed/catalog details without waiting for transport
Independent review Final review found only the unstaged copy of the already-proven same-plugin refresh repair; staged the repaired source and regression. No additional P0–P2 defects found
Production builds Both exact-base and final-head production builds pass
Strict paired performance Zero violations: startup 316,257 → 316,237 B gzip (−20 B); CSS 40,894 B / 1 request unchanged; Chat 1,436,994 → 1,436,981 B (-13 B); New Session 1,014,737 → 1,014,720 B (-17 B). All over-cap surfaces remain within the 64 B comparison allowance.
Production Knip Exact base and final head report the same 13 unused heartbeat files; no UI findings or new ignores
Visual Eight synthetic 1000×700 screenshots inspected; both detail families in loading/error states; browser page errors []
Broad CI ci:full requested for all UI, Control UI E2E, browser-extension, and real-Gateway shards

Production touched-file LOC: 2,238 → 2,376 (+138). The extra production code expresses two native boundaries and one shared presentation adapter while deleting both copied loader errors; request admission and accepted snapshots stay in the existing plain owner.

Synthetic before / after

Installed loading

Before After
Before installed loading After installed loading

Installed error

Before After
Before installed error After installed error

Catalog loading

Before After
Before catalog loading After catalog loading

Catalog error

Before After
Before catalog error After catalog error

Same-plugin refresh regression repair

Full CI exposed plugin install button progress > keeps truthful progress through the final finalization-failure response: replacing the result object re-armed Loading even though its returned plugin ID stayed the same, which unmounted the progress view. The boundary now reads a memo of that ID. The existing regression fixture replaces the result object during the pending receipt.

The strengthened unit test failed against the previous head and all nine catalog-detail tests pass with the fix. The exact failed E2E case also passes (one selected case; four unrelated cases filtered), and UI tsrs, typed lint, formatting, and independent P0–P2 review pass. This was a PR regression, not an inherited failure. A fresh production build's source map matches the repaired source.

Fresh paired performance against f25a10e929c2c0875b6d3a6f6e6a2936726af520: startup 316,257 → 316,237 B gzip; one CSS request at 40,894 B. All strict budget checks pass with no warnings. The existing synthetic screenshots remain representative; this repair preserves retained progress. Production nonblank LOC across touched files: 2,238 → 2,376.

@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-22T05:52:40.789286Z c48896a 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: 31aaa61ce8

ℹ️ 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/plugins/catalog-detail.tsx Outdated
<div class="plugin-catalog-detail__main" aria-hidden="true">
<div class="plugin-catalog-detail__loading-card skeleton" />
<div class="plugin-catalog-detail__loading-card skeleton" />
<Loading on={receipt()} fallback={<CatalogDetailLoading />}>

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 catalog content during same-plugin refreshes

When plugins.list refreshes while a catalog detail remains selected, replaceResult() calls refreshDiscovery(), and showCatalogDetail() creates a new receipt even though it retains the existing result. Using that receipt object as the Loading reset identity re-arms the full-page fallback on every such background refresh, replacing the accepted detail with a skeleton until the catalog request settles; on a slow or unavailable catalog service this causes prolonged flicker despite usable cached content. Key on to the stable catalog identity, or omit it for same-plugin revalidation so only initial loads show this fallback.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR presents installed-plugin inspection and catalog-detail request readiness through Solid loading and error boundaries.

Example: The initial catalog request for /plugins/catalog-workboard fails.

  • Before: The loader stores an error string that the detail view displays with Try again.
  • After: The admitted request rejects into Solid’s error boundary, and Try again starts another request and resets the boundary.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful owner-backed refactor with inspected visual evidence, but the catalog refresh regression blocks merge and some failing CI remains unattributed.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; all eight synthetic browser screenshots were inspected and support initial loading/error visual parity, while owner-level tests exercise retry, optional enrichment, and retirement.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Plugin detail loading and failure presentation should remain consistent while accepted content and installed controls stay available.
Reason: The maintainer-authored direction follows the repository’s Solid migration contract and retains the existing request owners, routes, and mutation boundaries.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep open: this maintainer-authored refactor has a clear ownership goal, but its catalog loading boundary hides accepted details during background refreshes.

Priority: P2
Reviewed head: 31aaa61ce8a6d4df7405b2f84552f42325f50975

Before merge

  • Preserve accepted catalog details during background refreshes (P2) - When inventory refreshes while /plugins/catalog-workboard remains selected, replaceResult() calls refreshDiscovery(), and showCatalogDetail() admits another catalog request while retaining the accepted result. That request creates a fresh receipt, so on={receipt()} re-arms Loading and replaces the usable detail page with its skeleton until the request settles. This changes the base behavior and hides controls and README content whenever the catalog is slow. Reset loading from stable selection/connection identity instead of each request receipt, and cover a held same-plugin refresh.
  • Complete next step - Have the CI owner classify the remaining core test-type and plugin post-removal focus failures against the base; repair only failures attributable to this diff.
  • Explain or restore the original intent of Accepted catalog content during revalidation - feat: unify installed and catalog plugin overviews #149216: The existing loader retains the previous same-identity result and the base renderer continues displaying it while a replacement request runs.

Findings

  • [P2] Preserve accepted catalog details during background refreshes — ui/src/pages/plugins/catalog-detail.tsx:180

Provenance

  • Accepted catalog content during revalidation changes intended behavior without addressing why it exists (feat: unify installed and catalog plugin overviews #149216: The existing loader retains the previous same-identity result and the base renderer continues displaying it while a replacement request runs.)

Tests

  • Missing end-to-end proof: The supplied scenarios do not cover accepted catalog content during a held same-plugin refresh or demonstrate a base-red/head-green regression for that behavior.
Agent review details

How this fits together

The Plugins page admits Gateway inspection and catalog requests, retains accepted snapshots, and supplies their completion receipts to Solid views that display loading, errors, and plugin controls.

flowchart TD
  A[Plugin route and inventory events] --> B[Plugins page owner]
  B --> C[Detail loaders]
  C --> D[Gateway client]
  C --> E[Accepted detail snapshots]
  C --> F[Read receipt adapter]
  E --> G[Solid detail views]
  F --> G
Loading

Technical review

Best possible solution:

Keep the existing loaders and native readiness adapter, but reset catalog loading only when selection or connection identity changes.

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

Source shows a reproducible path: keep /plugins/catalog-workboard selected, publish updated inventory, and hold the resulting plugins.catalog.get request; the new receipt re-arms the full detail skeleton despite an accepted result.

Is this the best way to solve the issue?

Observing admitted requests is consistent with the existing ownership model, but request completion identity must remain separate from the selection identity that resets presentation.

Full review comments:

  • [P2] Preserve accepted catalog details during background refreshes — ui/src/pages/plugins/catalog-detail.tsx:180
    When inventory refreshes while /plugins/catalog-workboard remains selected, replaceResult() calls refreshDiscovery(), and showCatalogDetail() admits another catalog request while retaining the accepted result. That request creates a fresh receipt, so on={receipt()} re-arms Loading and replaces the usable detail page with its skeleton until the request settles. This changes the base behavior and hides controls and README content whenever the catalog is slow. Reset loading from stable selection/connection identity instead of each request receipt, and cover a held same-plugin refresh.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 317f9399d9b0.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/pages/plugins/plugins-page.generations.test.ts ui/src/pages/plugins/catalog-detail.test.tsx ui/src/pages/plugins/settings-lifecycle.test.tsx --maxWorkers=1
  • pnpm test:ui:e2e ui/src/pages/plugins/plugins-lifecycle.e2e.test.ts
  • pnpm tsgo:ui
  • git diff --check
  • Demonstrate that the focused held-refresh regression fails on the reviewed head and passes after repair.

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit e4ab2d3 adds ui/src/pages/plugins/plugins-detail-loader.ts:36 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e4ab2d382cb9; files: ui/src/pages/plugins/plugins-detail-loader.ts)

PR surface

Source +135, Tests +74. Total +209 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 222 87 +135
Tests 3 77 3 +74
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 299 90 +209

Review metrics

Metric Value Why it matters
Production versus test growth Production +135 net lines; tests +74 net lines Growth supplies two native boundaries and a shared receipt-retirement adapter while removing copied loader errors; the adapter preserves the existing request and snapshot owners.

Labels

Label changes:

  • add P2: This is a focused UI refactor with an introduced, recoverable catalog-detail presentation regression.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is a focused UI refactor with an introduced, recoverable catalog-detail presentation regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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.

Reviewed October 21, 2026, 11:31 PM ET / October 22, 2026, 03:31 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: c48896a734

ℹ️ 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 +686 to +689
const detailRead = surface === "discovery" && details.catalog.receipt();
if (detailRead) {
// The inventory refresh starts a separate catalog read. Its heading must exist first.
await detailRead.result.catch(() => {});

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 Do not block uninstall completion on catalog detail

When uninstalling an installed plugin from its discovery detail, refreshCatalog() starts a new optional plugins.catalog.get read and this await keeps runMutation() from reaching its finally block. If ClawHub is slow or unavailable, the already-successful uninstall remains marked busy for up to the Gateway request timeout (30 seconds), delaying completion solely to restore focus; focus restoration should follow the receipt asynchronously rather than hold mutation settlement.

AGENTS.md reference: AGENTS.md:L74-L77

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #180389, which carries the reviewed native detail-read implementation and same-plugin progress fix on current main. Its native workflow reads the current landing-state schema; no retained workflow binding was changed.

@steipete steipete closed this Oct 22, 2026
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. 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: L 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