Skip to content

fix(ui): keep file preview copy out of the startup bundle - #150424

Closed
steipete wants to merge 3 commits into
mainfrom
upd/red-main-control-ui-startup-budget
Closed

steipete wants to merge 3 commits into
mainfrom
upd/red-main-control-ui-startup-budget

Conversation

@steipete

@steipete steipete commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Related: #149287, #150414

What Problem This Solves

Fixes the Control UI startup JavaScript budget failure blocking main and PR validation after #149287 added bundle-preview messages to the eager English catalog.

User Impact

Preview labels, translations, rendering, and interactions are unchanged. Preview-only English loads with the existing lazy preview component, reducing startup JavaScript. No configuration, dependency, data migration, budget, baseline, or suppression changes.

Why This Change Was Made

Move the complete filePreview namespace to the existing lazy English registrar pattern, owned by the shared preview component. Both plugin skill bundles and Skill Workshop use that component. The host catalog retains all strings and source-hash inputs; an empty startup anchor preserves translation-memory ordering.

The refreshed branch incorporates current main and its canonical bounded-read fixture correction (#150419) and wrapper extraction repair (#150453). Its only additional change supplies bundled-plugin-source-utils.mts to the cold-worktree test fixture, repairing an inherited missing dependency without changing assertions. The five original UI files remain byte-identical to 0c4b3a0ea282d95a6824b80c1ef5d3818b3f6b5c.

Evidence

On Node 24.21.0, production UI builds with the CI comparison identity measure startup JavaScript at 362,452 B gzip, under the unchanged 362,588 B budget, with seven requests. This removes 254 B gzip from the failing main measurement. Headroom remains small.

  • 140 tests passed: 37 cold-worktree tests, 81 UI/Vite/catalog tests, 17 real Chromium component tests, and five production-bundle routes using a synthetic Gateway.
  • UI, script, root-test, and UI-test typechecks; i18n verification; formatting; targeted lints; stylesheet checks; and whitespace checks passed. The original implementation also passed the full changed-file workflow; unrelated core test types were not repeated for this refresh.
  • Fresh independent Codex P0–P2 review is scoped-clean. The deferred-loading regression fails on the original eager code and passes after the change; it also covers English fallback for an already-created foreign-locale manager.
  • The complete ordered English catalog is unchanged. Inspected before/after preview PNGs are byte-identical at 1440, 1174, 768, and 390 pixels. Rendered screenshots and browser evidence are attached in the originating task and in this PR.
  • The inherited cold-wrapper failure reproduced locally before fix: restore initialization in fresh PR wrappers #150453's canonical manifest repair. All 36 selected freshness, admission, provisioning, and extracted-tooling cases passed afterward. The six-file UI/fixture patch remains unchanged after incorporating that upstream repair.

Production/tooling: +19 lines; tests: +31 lines. Reviewed candidate: aedbcd8c140c1499a02245353bbf5cd3035d5898. Hosted CI must pass before native landing.

Move the unchanged filePreview English namespace to the lazy preview component and retain complete ordered host-side catalogs. Fix the startup gzip regression from #149287 without changing preview behavior or performance budgets.
@clawsweeper

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

@steipete
steipete marked this pull request as ready for review September 17, 2026 00:54
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 17, 2026
@fuller-stack-dev

fuller-stack-dev commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

I am carrying the existing #91245 repair through native landing. Its exact-head control-ui-performance job fails on the same main baseline, 362,706 B against 362,588 B, before candidate validation (job).

I am reviewing this narrow existing fix as the prerequisite, preserving its current head and attribution; no duplicate implementation or branch edits. Please flag an active landing operation so I can avoid colliding. I will require the existing exact-head CI/review gates before landing either change.

Coordination update: the existing #150026 owner has already integrated #150424 and #150419 with the missing native extraction dependencies and is validating that integration. I am not starting a competing branch or landing operation; #91245 will consume the live-verified main result.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Coordinating required-CI repair for #150026: this exact prerequisite fix (0c4b3a0ea282d95a6824b80c1ef5d3818b3f6b5c) matches its failing gate. I am consuming the existing change unchanged in the #150026 integration candidate, preserving its commit ancestry and running delta qualification. I will not edit this branch or duplicate its source repair. The separate native-wrapper extraction-manifest omission is being repaired in #150026.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 10:36 PM ET / September 17, 2026, 02:36 UTC (Revision 3).

ClawSweeper review

What this changes

The PR defers file-preview English text until the preview component loads, preserves the complete translation catalog, and adds a missing dependency to the cold-worktree test fixture.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still eagerly loads the preview strings, and no merged replacement establishes completion. The focused patch has adequate behavior evidence and no actionable correctness findings; maintainer protection also precludes automatic closure.

Priority: P2
Reviewed head: aedbcd8c140c1499a02245353bbf5cd3035d5898

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported repair using established ownership boundaries, with no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Recorded production-build measurements demonstrate reduced startup bytes, and the production-bundle browser scenarios plus inspected identical preview screenshots support preserved rendering. The changed source files remain identical to the previously qualified revision; screenshots alone are not being used to prove loading behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded production-build measurements demonstrate reduced startup bytes, and the production-bundle browser scenarios plus inspected identical preview screenshots support preserved rendering. The changed source files remain identical to the previously qualified revision; screenshots alone are not being used to prove loading behavior.
Evidence reviewed 8 items Applicable policy: Read the full root, UI, scripts, and test AGENTS.md files. UI policy explicitly prescribes synchronous lazy English registration, shared-object preservation, empty ordering anchors, and host-only catalog composition. No maintainer-notes directory exists in this checkout.
Introduced patch and review continuity: The local pinned-base diff matches the supplied introduced patch. Comparing the previous reviewed head with this head yields no changes in the six reviewed files; the earlier review listed no findings. Whitespace validation passes.
Runtime and catalog ownership: The component registers English before rendering. Both production consumers import its registration module before translating preview messages. The translation manager retains the shared English object, so already-created foreign-locale managers receive fallback text. Host tooling includes both the fragment data and its source-hash input.
Findings None None.
Security None None.

How this fits together

The Control UI uses a shared file viewer for plugin skill bundles and Skill Workshop support files. Its translation manager supplies localized text or English fallback, while separate tooling assembles the complete catalog for translation generation.

flowchart TD
  A[Control UI startup] --> B[Shared English catalog]
  C[Plugin skills or Skill Workshop] --> D[Lazy file viewer]
  D --> E[Register preview English]
  E --> B
  B --> F[Localized preview rendering]
  E --> G[Complete translation tooling catalog]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +16, Tests +31, Other +3. Total +50 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 42 26 +16
Tests 2 31 0 +31
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 3 0 +3
Total 6 76 26 +50

Review metrics

Metric Value Why it matters
Startup budget Reported savings: 254 B gzip; remaining headroom: 136 B; requests: 7 The repair clears the existing enforcement limit without increasing its allowances, although headroom remains narrow.
Production versus tests Production/tooling net +19 lines; tests net +31 lines Production growth supplies the established lazy registrar boundary and complete catalog wiring rather than new product capability.

Root-cause cluster

Relationship: canonical
Canonical: #150424
Summary: This remains the focused preview-catalog repair; related open branches overlap or consume it without establishing merged completion.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep preview-only English with the existing lazy viewer while retaining unchanged fallback behavior, complete translation catalogs, and the existing startup budget.

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

Yes: current-main source exposes the eager catalog path, and the supplied production-build comparison identifies the failing budget and improved result. This read-only review did not execute builds or tests.

Is this the best way to solve the issue?

Yes: the patch uses the documented lazy registrar pattern, covers both viewer consumers, and preserves catalog ordering without changing budgets or stored preferences.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Control UI startup-size repair with preserved visible behavior and no urgent user-facing outage established.
  • 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. Sufficient (live_output): Recorded production-build measurements demonstrate reduced startup bytes, and the production-bundle browser scenarios plus inspected identical preview screenshots support preserved rendering. The changed source files remain identical to the previously qualified revision; screenshots alone are not being used to prove loading behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded production-build measurements demonstrate reduced startup bytes, and the production-bundle browser scenarios plus inspected identical preview screenshots support preserved rendering. The changed source files remain identical to the previously qualified revision; screenshots alone are not being used to prove loading behavior.

Evidence

What I checked:

  • Applicable policy: Read the full root, UI, scripts, and test AGENTS.md files. UI policy explicitly prescribes synchronous lazy English registration, shared-object preservation, empty ordering anchors, and host-only catalog composition. No maintainer-notes directory exists in this checkout. (ui/AGENTS.md:33, aedbcd8c140c)
  • Introduced patch and review continuity: The local pinned-base diff matches the supplied introduced patch. Comparing the previous reviewed head with this head yields no changes in the six reviewed files; the earlier review listed no findings. Whitespace validation passes. (aedbcd8c140c)
  • Runtime and catalog ownership: The component registers English before rendering. Both production consumers import its registration module before translating preview messages. The translation manager retains the shared English object, so already-created foreign-locale managers receive fallback text. Host tooling includes both the fragment data and its source-hash input. (ui/src/components/file-preview-modal.ts:16, aedbcd8c140c)
  • Current-main necessity: Fetched main still contains the complete filePreview namespace in eager en.ts. Live GitHub reads confirm this PR and the overlapping integration test(ui): protect lazy file-preview translations and active-language preservation #150465 remain open and unmerged. The latter explicitly leaves this PR's later fixture correction to be accounted for. (ui/src/i18n/locales/en.ts:252, c7436e77ca81)
  • Behavior proof and measured result: The captured body and fix(ui): keep file preview copy out of the startup bundle #150424 (comment) report a Node 24.21.0 production build at 362,452 B startup gzip versus the unchanged 362,588 B enforcement limit, seven requests, real Chromium component coverage, and five production-bundle routes using a synthetic Gateway. Both downloaded before/after PNGs were inspected and have identical SHA-256 73794cd6dd417086d57c235cab7a1a967130b387753dd29aac715d5f28dee7c4. Screenshots establish rendering parity; the recorded build measurement establishes the size improvement. (aedbcd8c140c)
  • Focused regression and fixture repair: The new test checks absence before component loading and English fallback afterward while preserving active German text. The cold fixture copies real source modules; its added helper is directly imported by static-extension-assets.mts. Existing assertions and production tooling behavior remain unchanged. (test/scripts/worktree-setup.test.ts:25, aedbcd8c140c)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick-Erichsen: 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 (2 earlier review cycles)
  • reviewed 2026-09-17T01:04:04.554Z sha 0c4b3a0 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T02:13:21.211Z sha 08a17fa :: needs maintainer review before merge. :: none

fuller-stack-dev added a commit to LiuwqGit/openclaw that referenced this pull request Sep 17, 2026
Integrate current main and the unchanged lazy-preview and bounded-read fixes from openclaw#150424 and openclaw#150419. Complete the native wrapper extraction manifest with its existing validation and plugin availability dependencies. Preserve contributor ancestry and keep openclaw#149672 open.
@steipete

Copy link
Copy Markdown
Contributor Author

Coordinating the shared CI blocker from #150414: I am preparing this existing focused startup repair against current main, including the already-landed #150419 bounded-read fixture correction and the missing cold-worktree helper input where needed. The UI implementation remains the reviewed change here.

The #150026 integration already contains these five UI files unchanged; preparing this prerequisite separately lets it and the other blocked PRs converge on green main. I will check for concurrent head changes before publishing any update to this branch. The filesystem refactor itself has zero UI byte delta against its CI parent.

Preserve the reviewed lazy file-preview catalog change while incorporating current main and its canonical fs-safe test-hook repair. Include the missing real static-asset helper in the cold-worktree fixture without changing its assertions.
@steipete

Copy link
Copy Markdown
Contributor Author

Validated the prepared candidate against main 13c6d9e16c1eb7a62fc5d8f529f61c9fb7a68742, retaining this PR's five UI files unchanged and adding the missing cold-worktree fixture input.

The production UI build measures 362,452 B startup JavaScript gzip, under the unchanged 362,588 B budget, with seven startup requests. The targeted suite passed 140 tests, including real Chromium component coverage and five production-bundle routes backed by a synthetic Gateway. Independent Codex review found no actionable P0–P2 findings. Hosted CI remains required before landing.

These inspected before/after captures show the same synthetic Calendar guide preview. PNG bytes match at all four tested widths: 1440, 1174, 768, and 390 pixels. The 1440-pixel captures are attached below. Translation text and rendering are unchanged; only loading moves behind the existing lazy component boundary.

Before: synthetic file preview

After: unchanged preview with lazy English loading

@clawsweeper clawsweeper Bot added 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. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
Refresh onto main carrying #150453 to clear inherited cold-wrapper CI failures. Preserve the six-file lazy-preview and cold-worktree fixture patch unchanged; its qualified source, review, build, and screenshot evidence remains valid.
fuller-stack-dev added a commit to 849261680/openclaw that referenced this pull request Sep 17, 2026
Consume the reviewed file-preview lazy-English extraction from openclaw#150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from openclaw#150026. Native manifest closure is now also present on main via
openclaw#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>
@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #150491, which landed the narrower lazy bundle-preview catalog fix and the current-main check blockers in one exact-green repair.

@steipete steipete closed this Sep 17, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #150491, merged as 90b421ae252ceaea5bf5a9f106eab51bf384431b. Current main loads the four bundle-preview messages from the existing plugin-management catalog; its hosted performance check passed, with reported startup gzip of 362,561 B under the unchanged 362,588 B budget. The wrapper manifest repair (#150453) and cold-worktree helper input (#109506) are also present on main.

The full filePreview extraction here now overlaps the canonical bundle catalog and is no longer needed to unblock CI. Closing this prerequisite in favor of the merged repair; #150414 will proceed directly against current main. The existing source review, browser proof, and before/after captures remain available in this PR.

fuller-stack-dev added a commit that referenced this pull request Sep 17, 2026
* fix(plugin-runtime): restore channel turn alias

* test(plugin-sdk): type channel turn alias override

* fix(plugin-sdk): preserve legacy turn mock overrides

* test(plugin-sdk): refresh channel turn alias gates

* Align legacy channel compatibility paths for current-main repair

Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence.

* fix: preserve complete legacy channel runtime alias

Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned.

Closes #91122

Co-authored-by: Yzx <[email protected]>

* fix(ci): integrate canonical channel alias prerequisites

Consume the reviewed file-preview lazy-English extraction from #150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from #150026. Native manifest closure is now also present on main via
#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical UI startup repair

Replace the temporary file-preview extraction with the current-main implementation from #150491 before merging main. Preserve the channel alias repair and existing contributor ancestry.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical Qwen fixture

Use the current-main Qwen fixture from #150523 and #82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history.

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Yzx <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
* fix(plugin-runtime): restore channel turn alias

* test(plugin-sdk): type channel turn alias override

* fix(plugin-sdk): preserve legacy turn mock overrides

* test(plugin-sdk): refresh channel turn alias gates

* Align legacy channel compatibility paths for current-main repair

Preserve the original contributor ancestry while resolving stale paths before the current-source alias repair. Intermediate branch preparation; not acceptance evidence.

* fix: preserve complete legacy channel runtime alias

Restore the complete five-member alias, including exact runtime-bound dispatch and scoped context construction. Preserve lazy loading, generic signatures and canonical override precedence. Keep deprecated compatibility metadata and current documentation aligned.

Closes openclaw#91122

Co-authored-by: Yzx <[email protected]>

* fix(ci): integrate canonical channel alias prerequisites

Consume the reviewed file-preview lazy-English extraction from openclaw#150424,
the cold worktree input closure, and the Qwen initial-deadline fixture
from openclaw#150026. Native manifest closure is now also present on main via
openclaw#150453. Keep the original channel alias implementation and accepted
built-runtime proof unchanged.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical UI startup repair

Replace the temporary file-preview extraction with the current-main implementation from openclaw#150491 before merging main. Preserve the channel alias repair and existing contributor ancestry.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(ci): consume landed canonical Qwen fixture

Use the current-main Qwen fixture from openclaw#150523 and openclaw#82290 unchanged. Remove the final temporary prerequisite delta while preserving the eleven-file alias repair and original contributor history.

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Yzx <[email protected]>
@RomneyDa
RomneyDa deleted the upd/red-main-control-ui-startup-budget branch October 22, 2026 00:26
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 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. scripts Repository scripts size: S 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.

2 participants