Skip to content

fix(ui): load plugin catalog home from one snapshot - #144569

Merged
Patrick-Erichsen merged 5 commits into
mainfrom
codex/plugin-catalog-bounded-loading-v2
Sep 11, 2026
Merged

Patrick-Erichsen merged 5 commits into
mainfrom
codex/plugin-catalog-bounded-loading-v2

Conversation

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor

Summary

  • render the plugin marketplace home from one bounded ClawHub overview snapshot
  • merge Gateway-owned installed/bundled state into that snapshot
  • keep search and explicit category browsing bounded to one page
  • delete the UI cursor drain, per-category hydration fanout, and exhaustive official-catalog preload

Depends on openclaw/clawhub#3664.

Root cause and repair

The marketplace controller serially traversed every ClawHub cursor before exposing ordinary shelves, then issued separate requests for categories, Featured, Trending, and category hydration. Unified search also downloaded every official plugin page just to classify local bundled entries.

ClawHub is the owner of the marketplace home projection, so the canonical repair is one cacheable, bounded overview endpoint. The Gateway joins that response with authoritative local state; the UI builds every shelf from the one existing browse result. Search and View all remain bounded paginated reads.

Removed paths: catalog cursor draining, per-shelf Task fanout, category hydration, the complete-official-catalog cache, and its separate categories result type.

Production/test LOC delta: 149 additions / 420 deletions in production; 85 additions / 360 deletions in tests. Net total: 234 additions / 780 deletions.

Performance proof

Fresh isolated browser contexts, unchanged main and candidate against the exact same local ClawHub backend:

Build Median until ordinary categories render Initial catalog RPCs
unchanged main 1,479 ms 8+
candidate 509 ms 1

This is 65.6% lower latency / 2.91x faster. The original production-backed reproduction took 110.108 s and 20 cursor requests before the first ordinary category appeared; the candidate renders all ordinary shelves from one RPC.

Unified cold search also improved from a 5.628 s median / 3 HTTP calls / 195 entries to 2.267 s / 1 call / 90 bounded entries (59.7% lower, 2.48x faster).

Validation

  • focused Vitest: 53 passed
  • pnpm check:changed: all code/type/dead-code/core lint gates passed; app lint initially lacked the pinned SwiftLint binary in the clean clone
  • PATH=$PWD/.build/swift-tools:$PATH pnpm lint:swift: 0 violations
  • pnpm protocol:check
  • live candidate page: ordinary category shelves render after one plugins.catalog.browse RPC
  • structured review: clean

Production-after timing against deployed ClawHub can only be measured after the dependency endpoint lands; the controlled same-backend benchmark above isolates the code-path improvement.

@clawsweeper

clawsweeper Bot commented Sep 11, 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 10:59 PM ET / September 11, 2026, 02:59 UTC (Revision 5).

ClawSweeper review

What this changes

Loads the plugin marketplace home from one ClawHub snapshot joined with local installation state, while preserving explicit pagination for expanded views.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main still drains catalog cursors before displaying results. The prior findings are resolved, the ClawHub dependency is merged and deployed, and no remaining blocking defect was found.

Priority: P2
Reviewed head: f2b57e9a3bdba0018174020a17e4f51fd9ad5f00

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused performance repair with relevant browser measurements, resolved prior findings, and no remaining blocking defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The recorded real-browser comparison exercises marketplace loading through the Gateway against a local ClawHub backend and observes ordinary shelves after one RPC with lower latency; deployment evidence resolves the external endpoint prerequisite.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The recorded real-browser comparison exercises marketplace loading through the Gateway against a local ClawHub backend and observes ordinary shelves after one RPC with lower latency; deployment evidence resolves the external endpoint prerequisite.
Evidence reviewed 8 items Current main still has the loading problem: The pinned main controller loops through nextCursor before returning its accumulated results and separately hydrates category shelves. The branch therefore retains a distinct useful repair.
Prior functional findings resolved: The controller preserves continuation cursors, sorts Featured and Trending by independent ranks, replaces local placeholders with later catalog entries, and retains categories across filtered reconnects. Focused regression tests cover these behaviors.
Latest revision preserves reviewed production behavior: The latest commit changes only browser-test variable names and fixture construction for lint compliance; it does not alter production behavior since the completed prior review.
Findings None None.
Security None None.

How this fits together

The Control UI plugin marketplace receives catalog metadata from ClawHub through the Gateway. The Gateway combines it with local plugin state, and the UI presents category shelves, search results, and installation actions.

flowchart LR
  A[Marketplace request] --> B{Home or filtered view}
  B -->|Home| C[ClawHub overview]
  B -->|Search or expansion| D[Bounded catalog page]
  C --> E[Gateway catalog join]
  D --> E
  F[Local plugin state] --> E
  E --> G[UI shelves and results]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -177, Tests -127, Other +20. Total -284 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 11 276 453 -177
Tests 8 300 427 -127
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 20 0 +20
Total 20 596 880 -284

Review metrics

Metric Value Why it matters
Recorded marketplace loading Median 1,479 ms → 509 ms; initial catalog RPCs 8+ → 1 The same-backend browser comparison directly measures the intended reduction in marketplace loading work.

Technical review

Best possible solution:

Keep ClawHub responsible for the bounded home projection, the Gateway responsible for local state, and explicit pagination responsible for expanded browsing.

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

Yes: current-main source drains every catalog cursor before returning results, matching the recorded slow marketplace load. This review verified the mechanism without executing it.

Is this the best way to solve the issue?

Yes: the snapshot removes redundant client traversal while retaining the existing Gateway state owner and paginated catalog endpoint; the required dependency is deployed.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This improves plugin marketplace loading latency within a bounded discovery surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The recorded real-browser comparison exercises marketplace loading through the Gateway against a local ClawHub backend and observes ordinary shelves after one RPC with lower latency; deployment evidence resolves the external endpoint prerequisite.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded real-browser comparison exercises marketplace loading through the Gateway against a local ClawHub backend and observes ordinary shelves after one RPC with lower latency; deployment evidence resolves the external endpoint prerequisite.

Evidence

What I checked:

  • Current main still has the loading problem: The pinned main controller loops through nextCursor before returning its accumulated results and separately hydrates category shelves. The branch therefore retains a distinct useful repair. (ui/src/pages/plugins/plugin-discovery-controller.ts:224, e62272f04a3e)
  • Prior functional findings resolved: The controller preserves continuation cursors, sorts Featured and Trending by independent ranks, replaces local placeholders with later catalog entries, and retains categories across filtered reconnects. Focused regression tests cover these behaviors. (ui/src/pages/plugins/plugin-discovery-controller.ts:38, f2b57e9a3bdb)
  • Latest revision preserves reviewed production behavior: The latest commit changes only browser-test variable names and fixture construction for lint compliance; it does not alter production behavior since the completed prior review. (ui/src/pages/plugins/plugins.e2e.test.ts:661, f2b57e9a3bdb)
  • Required external contract verified: The PR explicitly depends on feat(api): add plugin marketplace overview snapshot clawhub#3664, and its client requests /api/v1/plugins/overview. The merged dependency implements that endpoint with canonical categories, deduplicated shelf entries, independent ranks, and cache headers. (convex/httpApiV1/packagesV1.ts:2529, cbfee7343ddc)
  • Dependency rollout completed: GitHub confirms the dependency merged at cbfee7343ddc867316dd9b3de6fa8856730f9f41, and its production deployment completed successfully at that exact SHA. The supplied rollout comment additionally records HTTP 200 with 22 categories and 177 deduplicated items. (cbfee7343ddc)
  • Recorded real browser performance proof: The supplied complete PR body records fresh browser contexts against the same local ClawHub backend: ordinary shelves rendered in a median 509 ms on the candidate versus 1,479 ms on unchanged main, using one initial catalog RPC instead of eight or more. This directly exercises the changed marketplace loading path; it is contributor-recorded evidence, not a reviewer execution.

Likely related people:

  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-09-11T01:49:45.331Z sha 0ed669e :: blocked before merge. :: [P2] Preserve access to subsequent category pages | [P2] Preserve independent Featured and Trending ordering
  • reviewed 2026-09-11T02:23:29.132Z sha 390c77f :: blocked before merge. :: [P2] Replace local placeholders when published entries arrive
  • reviewed 2026-09-11T02:34:15.662Z sha 4ff4e59 :: blocked before merge. :: [P2] Restore category navigation when a filtered view reconnects | [P2] Migrate browser fixtures to the overview response contract
  • reviewed 2026-09-11T02:51:06.334Z sha 6a983af :: needs maintainer review before merge. :: none

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Addressed the latest ClawSweeper findings at 390c77fe3709:

  • Expanded category/Featured/Trending views preserve nextCursor and expose bounded one-page-at-a-time continuation; the marketplace home remains one overview RPC.
  • Overview shelves use zero-based featuredRank / trendingRank while retaining boolean membership for unranked entries.
  • Accumulated category pages are re-sorted official-first, then downloads.
  • Search never exposes continuation because the Gateway contract rejects query+cursor requests.

Validation: 67 focused tests plus the added controller regressions, check:changed code/type/format/i18n/core gates, SwiftLint (0 violations), git diff --check, and structured autoreview clean through P2.

The external endpoint dependency remains intentionally ordered: ClawHub PR #3664 must merge and be deployed before this consumer merges.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Addressed the latest ClawSweeper finding and exact-head CI type failure at 4ff4e59649f6: later published catalog entries now replace incomplete first-page local placeholders, with a failing-before/passing-after regression; strict test typing is clean. Exact affected validation: controller 9/9, hosted core test-type stripe 2/5, assertion safety, and diff check.

@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Addressed the latest ClawSweeper and browser-CI findings at 6a983af17a52: migrated fixtures to the single overview RPC, retained categories across filtered reconnects, and collapsed obsolete per-shelf outage state into one visible overview error. Exact local proof: plugin E2E 17/17, controller/results 23/23, UI production/test types, assertion safety, and diff check.

@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 11, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Dependency rollout is complete: ClawHub #3664 merged at cbfee7343d, exact-SHA Deploy Test passed (https://github.com/openclaw/clawhub/actions/runs/34555865423), backend production deploy passed (https://github.com/openclaw/clawhub/actions/runs/34556238780), and https://clawhub.ai/api/v1/plugins/overview now returns HTTP 200 with 22 categories, 177 bounded deduplicated items, 7 Featured ranks, and 8 Trending ranks. Latest OpenClaw head f2b57e9a3bdb also fixes the exact lint findings; its fresh CI is running.

@Patrick-Erichsen
Patrick-Erichsen merged commit 2e939d9 into main Sep 11, 2026
319 of 321 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the codex/plugin-catalog-bounded-loading-v2 branch September 11, 2026 03:17
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 11, 2026
* fix(ui): load plugin catalog home from one snapshot

* fix(ui): preserve bounded plugin catalog browsing

* fix(ui): reconcile plugin catalog continuation

* fix(ui): align plugin overview lifecycle tests

* test(ui): satisfy plugin overview lint rules
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 gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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