Skip to content

perf(ui): defer plugin-management copy from chat boot - #174939

Merged
steipete merged 1 commit into
mainfrom
solid2/w-perf-clawhub-locale
Oct 17, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-perf-clawhub-locale

Conversation

@steipete

@steipete steipete commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem and change

ClawHub transcript cards use three plugin labels but registered the full plugin-management English catalog at import time. Keep those labels in shared English, reuse them in the lazy catalog, and remove the card's eager catalog registration. The host-side catalog composer retains the exact original flattened key order. Refresh the generated boot capture so the cold catalog no longer joins chat boot.

No tags, CSS, visible text, foreign translation keys, or interaction timing change. No screenshots are needed because rendering is unchanged.

Measured proof

Same machine and toolchain, fixed build timestamp/identity. Base: 343fb38d08cd7d6159405247c0df93b219839f73. Route totals include startup once.

Metric Base Head Change
Startup JS gzip 340,562 B 340,614 B +52 B
Chat boot JS gzip 1,623,633 B 1,618,866 B -4,767 B
New Session JS gzip 1,312,283 B 1,312,361 B +78 B
Startup / chat / new JS requests 7 / 30 / 27 7 / 30 / 27 0
Startup CSS requests 1 1 0

Both production builds and strict checks pass with zero violations. The small increases buy three synchronous shared labels; no budget increases. An initial head build confirmed that removing only the import saved nothing while the stale generated capture still grouped the catalog into boot; the final measurement includes the canonical regenerated capture.

  • UI typecheck, scoped lint/format, and git diff --check: pass. The typecheck caught a missing explicit shared-label type; adding it is type-only and the next check passes.
  • Loading-boundary regression: 1 test passes, covering the real card import, eager labels, deferred management copy, and preserved active-language fallback.
  • Complete flattened English catalog is byte-identical to base, including key order; keyless i18n baseline and verify pass. No translation-memory or foreign metadata changes.
  • Production Knip: pass.
  • Independent P0–P2 review: scoped-clean; final type annotation and generated capture resolution manually inspected.
  • Full UI CI requested with ci:full.
Scoped checklist Before After
Effects 1 1
Controllers / render effects / untrack 0 / 0 / 0 0 / 0 / 0
Native listeners / DOM queries / manual classes 0 / 0 / 0 0 / 0 / 0
Flush / owner capture 0 / 0 0 / 0
Production TS/TSX LOC 5816 5819
Generated boot manifest 2662 2660

The existing effect synchronizes catalog status through the Gateway, documented at its owner. The three production lines added provide the shared catalog shape and exact-order composition; no new abstraction or state. The generated capture removes two entries, including one deleted chat module.

CI attribution

Full run 38991642040 passes every UI unit/E2E, browser-extension, and real-Gateway job. The only failed root job is the mock-export ratchet for src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52, mocking ./update-command-database-context.js. The update-cli tree, checker, and mock-export baseline are identical in the tested merge and its actual main parent. Native admin admission uses the operator-authorized unrelated-failure route, not a green-CI claim. A combined run of the existing ClawHub tests and new loading test also passes (27 tests); no registry guard or production change was needed.

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

clawsweeper Bot commented Oct 17, 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 17, 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-17T01:39:44.705343Z b2fd464 PR opened
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XS labels Oct 17, 2026
@steipete
steipete enabled auto-merge (squash) October 17, 2026 01:49
@steipete
steipete disabled auto-merge October 17, 2026 01:50
@clawsweeper

clawsweeper Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR keeps three ClawHub labels eager while deferring the remaining plugin-management English catalog.

Example: Open Chat with a ClawHub recommendation card.

  • Before: The card imports the full plugin-management catalog to display Official, Install, and Installed.
  • After: Those labels remain available synchronously without importing the full catalog.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and source-consistent; reported measurements and integration coverage support it, while required CI remains unresolved.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored optimization is outside the ordinary contributor proof gate; the body supplies matched production-build measurements and a cold-import regression, without a browser runtime trace.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Opening Chat downloads plugin-management copy that its recommendation cards do not need.
Reason: Maintainer direction is established, and the small change follows the existing lazy-catalog architecture with a reported measurable payload reduction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed optimization removes unnecessary chat boot copy without changing labels or interactions; no introduced correctness defect was found.

Priority: P3
Reviewed head: b2fd4642e6aaa8842ef9138291639cb6611053ce

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The new loading regression is reported passing on head, but a corresponding base-failure run is not supplied.
Agent review details

How this fits together

The Control UI loads shared English during startup and registers larger catalogs at their consuming surfaces; host tooling composes the complete translation catalog and generates route boot groups.

flowchart TD
  A[Chat boot] --> B[ClawHub card]
  B --> C[Shared English labels]
  D[Plugin management surface] --> E[Lazy English catalog]
  E --> C
  C --> F[Host catalog composer]
  E --> F
Loading

Technical review

Best possible solution:

Retain this focused catalog split and generated boot capture while resolving the existing required-check failures through the normal landing workflow.

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

Current main directly imports and registers the full plugin-management catalog from the chat card, establishing the unnecessary eager dependency without executing target code.

Is this the best way to solve the issue?

The patch uses the existing shared-English owner, preserves lazy consumer registration and translation order, and removes the eager dependency without adding another loading mechanism.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced patch: The pinned introduction diff removes the card's eager registrar, shares exactly three unchanged labels, preserves host catalog ordering, and refreshes the generated boot capture. (ui/src/pages/chat/components/chat-clawhub-card.tsx:8, b2fd4642e6aa)
  • Current main still loads the catalog: Current-main blame confirms that the card still imports and registers plugin-management English; the optimization remains distinct work. (ui/src/pages/chat/components/chat-clawhub-card.tsx:21, acd27635ccdc)
  • Consumer and fallback contracts: Plugin-management consumers retain their registrars, the lazy catalog retains all three shared labels, and translation lookup continues to prefer the active locale before English fallback. (ui/src/i18n/locales/en-plugin-management.ts:426, b2fd4642e6aa)
  • Reported performance evidence: The complete PR body reports matched production builds reducing Chat boot gzip from 1,623,633 to 1,618,866 bytes, with unchanged request counts and no budget increases; these measurements were not independently rerun. (b2fd4642e6aa)
  • Required checks remain unresolved: The reviewed head has failed context, baseline-ratchet, and aggregate checks. Context annotations request headings despite substantive problem and evidence sections; ratchet annotations name untouched baseline paths and a mock-export failure. Full logs redirect to a blocked storage host, so the remaining failure cannot be attributed to this patch. (b2fd4642e6aa)
  • Policy and inspection limits: Root, UI, and scripts guidance were applied; no scoped maintainer-notes directory exists. The installed Solid cheatsheet is absent, and older-history traversal encountered unavailable promisor objects. The patch changes no Solid primitive or rendering logic, and the available source establishes its behavior. (ui/AGENTS.md, b2fd4642e6aa)

PR surface

Source 0, Tests +23, Other +1. Total +24 across 6 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 4 10 10 0
Tests 1 23 0 +23
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 6 34 10 +24

Review metrics

Metric Value Why it matters
Production versus test growth Production net +3 lines; tests +23 lines Small production growth provides shared-label typing and ordered catalog composition; the test protects the cold import and fallback contract.

Labels

Label changes:

  • add P3: This is a small boot-payload optimization with unchanged visible behavior and no demonstrated urgent user failure.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 small boot-payload optimization with unchanged visible behavior and no demonstrated urgent user failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 16, 2026, 9:53 PM ET / October 17, 2026, 01:53 UTC.

@steipete
steipete merged commit 3415f6a into main Oct 17, 2026
120 of 127 checks passed
@steipete
steipete deleted the solid2/w-perf-clawhub-locale branch October 17, 2026 02:08
@steipete

Copy link
Copy Markdown
Contributor Author

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

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. scripts Repository scripts size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant