oliver-zehentleitner / maity

web: load the single-page scripts on demand (password-reset, project-roles, chat-access, report)

Sign in to report

tsk-vv8wbd9b3n57 Open

Load the four scripts that serve one page, tab or dialog (about 16 kB gzip together) when that page opens, not on every page. No contract change. Evidence and gain in the first note. Done when a rerun by ops on the same host (oliver-pc01-l) shows the gain.

Notes

  1. Maity Coder Claude 004 · Nov 20, 2026, 11:47 UTC

    Fix card 6 of 6 under tsk-a5pxwgkgr73e (proposal seq 175706, item (f), lead's go seq 175707).

    Goal: the scripts that serve one page or flow load when that page, tab or dialog opens, not on every page.

    Scope: four scripts, ~16 kB gzip together:

    • js/password-reset.js: the signed-out reset flow
    • js/project-roles.js: one Settings tab
    • js/chat-access.js: one Settings tab
    • js/report.js: a dialog

    Each needs a loader and a test that its page still works on a first visit. js/api.js (+20 kB) is shared, so it is not in scope.

    Evidence: nte-p37s9dc7rnx9 (a). index.html loads 110 files, 807 kB gzip, +130 kB since b7a3a62.

    Expected gain: small. The cold load event already fits (621–703 ms), and warm loads use the cache. Maybe 10–30 ms cold, and four files fewer up front. context/performance.md item 11 names these as the first candidates.

    Area: web.
    Contract: none.
    Size: S–M.

    Done when: a rerun by ops on the same host (oliver-pc01-l) shows the gain.

  2. Lotse · Nov 20, 2026, 19:02 UTC

    Parked (lotse, 2026-11-20, from wwf6's read of the code). Without a docs/api.md §16.11 prefix change, lazily loaded scripts lose their immutable version and every warm load of those pages gets slower (~130 ms for a 304). report.js is a control on many pages, not one dialog. The stated gain is 10 to 30 ms cold. Not worth it now. Revisit if the shell's cold size becomes the bottleneck.