Skip to content

admin-ui preload: finish rollout after DEV deploy test (follow-up to #2748) #2749

Closed

Description

@jung-thomas

Follow-up to the Component-preload prototype in #2748 (branch worktree-admin-preload-prototype), which enables the preload build for one tile (puzzles) only. These items are blocked on first merging #2748 to DEV and doing a real DEV deploy, because the open questions can only be answered on the deployed approuter.

Gate: DEV deploy test of #2748

  • Full npm run deploy -- --env dev (NO --skip-build, NO -m scoping — admin-UI is bundle-gated).
  • On DEV /admin-ui/, open the Puzzles tile and confirm in DevTools Network that it loads Component-preload.js (~1 request) and NOT ~10 per-module requests.
  • Confirm the preload loads under the approuter CSP (no unsafe-eval; sap.ui.require.preload is CSP-safe but verify no console ModuleError).
  • Confirm the crossword builder's Web Worker (lib/fill-worker.js) still starts — new Worker(sap.ui.require.toUrl(...)) resolves the standalone file, not the preload.

Blocked on that gate passing

  • Update Step 3.5 bundle-gate (scripts/check-shipped-admin-bundle.cjs): it diffs shipped admin files against source and will flag preloaded output (minified + Component-preload.js) as drift. Teach it to compare the built output for preload components, or exempt them.
  • Fan out PRELOAD_COMPONENTS to the remaining heavy tiles once the pattern is proven. Candidates by source size: secrets, joule, concepts, homepage, shelf-definitions, verb-definitions, topicClusters, kgCommunities, tags. Add incrementally; each is independently revertible by removing it from the set.
  • Decide whether to ship -dbg sources + .map files (debug fallback, larger approuter footprint) or strip them from the deployed static dir.
  • Note the new failure mode in gotchas: with minification on, syntactically-invalid controller JS now fails at the ui5 build minify step for preload components (previously only at mbt minify during deploy).
  • Commit an e2e spec exercising a preloaded tile (advisory nudge fires on app/** changes; real coverage is the post-DEV-deploy e2e job).

Prototype measurement (puzzles): ~10 authed approuter round-trips → ~2; 77 KB unminified → 39.6 KB minified bundle.

Activity

  1. jung-thomas commented on Oct 13, 2026

    @jung-thomas
    ContributorAuthor

    Update — DEV deploy test passed; bundle-gate item already done

    Tom manually ran the Puzzles tile on DEV and confirmed it's fine. Verified on `origin/DEV` (merge `e90dcd21`):

    • ✅ Preload build — `puzzles` runs through `ui5 build` in `copy-components.js`; allowlist extracted to `app/admin-shell/scripts/preload-components.cjs` (still `['puzzles']`).
    • ✅ Step 3.5 bundle-gate fix shipped too — commit `b4df6b744` teaches `scripts/check-shipped-admin-bundle.cjs` to import the allowlist and treat preload-built components as presence-only (not byte-compared vs unminified source), so it no longer false-drifts. (Prior: `a22796c13` added the gate.)

    Caveat on verification: `/admin-ui/` is XSUAA-gated and `cf ssh` to `tutorials-dev-approuter` is denied, so the deployed-artifact half rests on Tom's manual confirmation; the source half is confirmed on the DEV branch.

    Remaining (now building out the full solution):

    • Fan out `PRELOAD_COMPONENTS` to the remaining heavy tiles.
    • Decide on shipping `-dbg` + `.map` files vs stripping them.
    • Document the minify-at-build failure mode in gotchas.
    • e2e spec exercising a preloaded tile.
  2. jung-thomas commented on Oct 13, 2026

    @jung-thomas
    ContributorAuthor

    Full fan-out built out in #2754 (branch worktree-admin-preload-fanout), targeting DEV:

    • ✅ Fan out to all tiles — allowlist now derived from discoverComponents(); full build = 51/51 preload, 0 fallbacks.
    • ✅ Strip -dbg + .map — pruned in build-component.cjs; 0 shipped. Worker file kept.
    • ✅ Document the minify-at-build failure mode — gotchas.md 'Admin-UI preload build' section.
    • ✅ e2e spec — test/e2e/admin-preload.test.js asserts #puzzles fetches Component-preload.js (200), no module error.

    Plus hardening not in the original list: silent-but-logged fault isolation (one bad tile → raw-copy fallback, build stays green), and the 40 config files (20 ui5.yaml + 20 package.json + 16 camelCase name fixes) tiles needed to build standalone.

    Open item for post-merge DEV deploy: run the e2e spec against DEV to confirm the preload loads under the approuter CSP (the one thing not verifiable pre-deploy). Once that passes, #2749 can close.

  3. added a commit that references this issue on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions