Files
cv/src
dong.nguyen 7b4a782f59 feat(edit): keep edit mode across navigation, only Exit leaves
Edit mode is a session, not a URL state. MaybeEditMode mounts the shell on
?edit or on the session flag; while mounted, EditModeShell re-attaches ?edit
after a route change that dropped it (replace navigation, skipped while
authenticating so it never fights a failed auth). The session initializes once
per mount - entry URL from a ref, stripEditQuery reads window.location - so
navigation neither re-authenticates, re-fetches, nor re-restores the draft.

?edit parsing, the session/branch flags and the portfolio-draft key move to a
dependency-free src/i18n/edit-session.ts so App.tsx can read the gate without
pulling the Basic-auth probe (and through it draft.ts) into the entry chunk;
edit-mode.ts is now the auth handshake alone.

Verified: tsc -b, pnpm build (entry chunk carries no probe literal,
EditModeShell stays a separate lazy chunk), pnpm lint (no new warnings),
throwaway smokes for the session semantics (17/17) and the router behaviour
behind the guard (5/5), both deleted after the run.
2026-10-24 13:56:16 +07:00
..
2026-10-06 19:29:13 +07:00