Skip to content

feat(admin-ui): prototype UI5 Component-preload build (puzzles tile) - #2748

Merged
jung-thomas merged 1 commit into
DEVfrom
worktree-admin-preload-prototype
Oct 13, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
worktree-admin-preload-prototype

Conversation

@jung-thomas

@jung-thomas jung-thomas commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Opt-in UI5 Component-preload.js build for admin-shell component tiles. app/admin-shell/scripts/copy-components.js now has a PRELOAD_COMPONENTS set — listed components run through ui5 build (minify + generateComponentPreload) instead of raw cpSync; all others are unchanged. Currently just puzzles, the heaviest tile (43 KB controller + Web Worker + 5 lib modules).

Why

Each headless componentUsage currently loads every module as a separate request, and each request is a full XSUAA-authed approuter hit with no CDN. A preload collapses that.

Measured on puzzles (real build):

Today (raw copy) With preload
Runtime requests on tile open ~10 per-module round-trips ~2 (preload + manifest)
Component JS/XML delivered 77 KB unminified, 10 files 39.6 KB minified, 1 bundle

Why plain ui5 build (not --all / self-contained)

  • --all builds the entire SAPUI5 framework (27 projects incl. theme .less) and fails on missing theme sources — we don't want the framework.
  • self-contained can drop standalone raw files; puzzles loads its Web Worker via new Worker(sap.ui.require.toUrl("...fill-worker.js")), which needs the physical file. Plain ui5 build keeps it.

Verified statically

  • Preload ships at dist/components/puzzles/Component-preload.js; the other 50 components untouched.
  • Worker file stays standalone.
  • Shell manifest resourceRoots/componentUsages (lazy: true) point at the right dir; bootstrap is data-sap-ui-async="true" (required for UI5 to use the preload).

NOT yet verified — this is the point of merging to DEV

  • That the preload actually loads under the deployed approuter CSP. Static checks pass; needs a live DEV deploy.
  • Step 3.5 bundle-gate (scripts/check-shipped-admin-bundle.cjs) diffs shipped files vs source and will flag preloaded output as drift — expect the deploy guard to need updating.
  • Minification now active for puzzles → invalid controller JS would fail at the minify step (previously only caught at deploy).

Follow-up items tracked in #2749.

…nents

Opt-in via PRELOAD_COMPONENTS set in copy-components.js (currently just
'puzzles', the heaviest tile). Listed components run through 'ui5 build'
(emits minified Component-preload.js); all others keep the raw cpSync path.

Proven on puzzles: ~10 per-module round-trips -> ~2 (preload + manifest),
each round-trip being a full XSUAA-authed approuter hit with no CDN.
Worker file (lib/fill-worker.js) stays standalone so new Worker(toUrl())
still resolves. Shell bootstrap is data-sap-ui-async=true, so UI5 uses
the preload.

Prototype only - needs a live DEV deploy to confirm the preload loads
under the approuter CSP before fanning out to the other 13 tiles.
@jung-thomas
jung-thomas merged commit e90dcd2 into DEV Oct 13, 2026
4 checks passed
@jung-thomas
jung-thomas deleted the worktree-admin-preload-prototype branch October 13, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant