oliver-zehentleitner / maity

web: the dashboard boot reads GET /bootstrap in one call instead of three waves, with the 404 fallback (tsk-x4z69ff785y6 web part)

Sign in to report

tsk-j591fzgnmspf Done An agent

Web part of tsk-x4z69ff785y6. The hub side (GET /api/v1/bootstrap?project=…, §5.4) is on main since #1656 (d2c717be).

  • The dashboard boot reads /bootstrap once instead of its three waves of single reads; on 404 (an older hub) it falls back to the waves.
  • web/context/views.md entry 63c48583: needs-review → resolved in this PR.
  • User docs per the owner rule (2026-11-11) only if a person sees a difference; say so in the PR body either way.
  • Smoke and e2e with LANGUAGE=en_US.

Shape and context step: eyq5's message 112714.

Notes

  1. An agent · Nov 11, 2026, 16:43 UTC

    Plan from unr9, written before any code. Branch claude/bootstrap-boot, cut from main at d2c717be.

    How: where render() now starts its early session read (when the drawing reuses nothing and is not on the invitation or registration page), it first sends GET /bootstrap. On a project view it adds ?project=<owner>/<slug>. js/api.js remembers the bundle's parts as one-shot answers for exactly the boot's own reads:

    • /maintenance
    • /auth/session
    • /me
    • on a project view also the project's base path, its /members and its /events?after=latest&wait=0

    The existing calls stay where they are (maintenance.fresh, early, /me, loadContext). Each takes its answer from the part instead of the network, through requestOnce's usual handling: the session language and CSRF, a 401 ending the session, the 503 maintenance notice (retry_after derived from details.until), and the /me time zone. A part's error becomes the same ApiError a single call would have thrown.

    Fallback: if the bundle answers 404 (an older hub), or anything else without parts (a limit, a refusal, no answer), it sets nothing, and every read goes to its single route as now.

    Expiry: the parts are cleared when the drawing's boot is done, when a new drawing starts, and after at most 15 s. So a poll never gets an old part, and a part nobody asked for (the window still fresh, a visitor's page) is simply dropped.

    /bootstrap joins PUBLIC_PATH, since it needs no sign-in.

    Fixture hub: it answers /bootstrap by calling its own single handlers per part, so smoke runs the bundled boot everywhere. Smoke also:

    • counts what the fixture hub was asked on a cold project load: one call, not six;
    • checks the 404 fallback;
    • checks a 503 part, a signed-out boot (the 401 parts) and a second-factor session.

    e2e records the browser's requests on a project load (one /bootstrap?project=…, none of the six single reads) and the fallback with /bootstrap routed to 404.

    Context: web/context/views.md 63c48583 goes to needs-review because its trigger has come. In the same PR it is superseded by a new entry: the boot reads one bundle, the order of handling unchanged, the single routes as fallback. The rejected alternative is replacing the calls with a new boot path, which would be a second client.

    User docs: nothing a person sees changes except speed. I'll say so in the PR body. The changelog is a web line.