Files
jobtrackingapp/docs/redesign/phase-3/ROUTE_PLAN.md
T
2026-09-10 18:15:05 +02:00

8.3 KiB
Raw Blame History

Route plan

ARC-02. This is a future migration plan, not live route configuration. Preserve the SPA/static deployment and current React Router authority. Most current URLs stay canonical: meaningful labels do not require renaming stable paths.

All existing route patterns

“Keep” includes refresh, direct entry, back/forward and owner/role behavior. No existing public or callback URL is removed.

Current pattern Target and disposition Navigation owner PRES contracts
/ Keep public landing and authenticated redirect behavior Public PRES-E01
/login Keep Public/account entry PRES-E02, PRES-E03, PRES-E04
/register Keep configured registration Public PRES-E02
/forgot-password Keep Public PRES-E02
/reset-password Keep token query contract Public PRES-E02
/verify-email Keep token query contract Public PRES-E02
/confirm-email-change Keep pending identity confirmation Public PRES-E06
/microsoft-legacy-relink Keep recovery/relink Public/account PRES-E03
/cv/:slug Keep published-only page/PDF; never redirect to numeric ID Public share PRES-C05, PRES-C12
/dashboard Keep personal dashboard Dashboard PRES-S01, PRES-S02
/discover Keep, present as Jobs → Discover Jobs PRES-J01, PRES-J02
/jobs Keep; add presentation query view=table or view=board Jobs → Tracked PRES-J03, PRES-J05, PRES-J06, PRES-J07
/jobs/:id Keep; staged section plan below Jobs → job PRES-W01–PRES-W12, PRES-M01, PRES-M02
/reminders Keep as Jobs → Follow-ups Jobs PRES-W11
/operations Keep progress/retry/cancel; utility link Notifications / user activity PRES-W12
/kanban Future replace redirect to /jobs?view=board after unified board parity Jobs → Tracked PRES-J07
/companies Keep including ?edit=id Jobs → Companies PRES-J08, PRES-E07
/offers Keep Jobs → Offers PRES-J09
/correspondence Keep inbox/drafts/review workspace Correspondence PRES-M01–PRES-M06
/correspondence/review Keep existing alias to /correspondence?view=review Correspondence PRES-M05
/profile Keep account identity/security under Settings; no rename to Career Profile Settings → Account/Security PRES-E04, PRES-E05, PRES-E06
/applications/:id Keep existing alias to /jobs/:id with query and router state Jobs → job PRES-W01
/career Keep Career Profile PRES-C01–PRES-C04
/career/builder Keep; label CVs CVs PRES-C05
/career/builder/:id Keep identified CV editor CVs → CV PRES-C06–PRES-C12
/admin/audit Keep privileged audit/undo Admin → Audit PRES-A02
/admin/users Keep privileged user management Admin → Users PRES-A01
/admin/system Keep operational diagnostics, configuration and maintenance Admin → System PRES-A03
/trash Keep deleted-only semantics as Jobs utility Jobs → Trash PRES-J06
/settings Keep; later add validated section query for shared account navigation Settings PRES-S03, PRES-S04, PRES-S05, PRES-J10
/settings/connected-accounts Keep; separate login identity from mail/calendar authorization Settings → Connections PRES-M06, PRES-E03

31 existing patterns mapped: 29 pages and two existing aliases. /kanban is currently a page, not already an alias. Outer /*, inner * and the inner root redirect stay as routing/error infrastructure. Do not confuse them with user pages.

New destinations and readiness

Proposed path Minimum meaningful content / prerequisite
/analytics Existing analytics charts and definitions; source/sample/period shown. New metrics only after their data contract
/documents Owner-scoped artifact index with job/type/state links; cross-job listing/query availability gated in Documents plan
/notifications Expanded existing notification centre; read/dismiss actions and operation links, not a new notification store
/admin Aggregate dashboard after authorized count endpoints exist; until then keep existing admin children visible with no empty dashboard

These routes are not introduced in Phase 4 foundations. No /cvs rename, /account rename or nested Jobs child-URL rewrite is necessary. A future desire for prettier URLs needs its own compatibility proposal.

Job section compatibility

Current accepted keys are overview, analysis, cv, cover-letter, interview. Current legacy keys collapse to analysis or overview in applicationWorkspace.ts. Future mappings must reveal the intended content more precisely without losing current capabilities.

Incoming key Current resolution Future destination
absent, overview, job-details overview Overview; details anchor for job-details
analysis, match analysis Match (analysis + profile comparison + strategy)
cv cv Application → CV
cover-letter cover-letter Application → Cover letter
interview interview Interview
documents overview Documents
timeline overview Timeline
checklist overview Notes & tasks → checklist
communication overview Timeline → correspondence/follow-up context

Future canonical top sections: overview, match, application, documents, timeline, tasks, interview. application may use sub=cv, letter, answers, submission; timeline may use sub=activity or correspondence. This is a small navigation adapter; do not change API section strings or persistent checklist links in bulk.

Keep all numeric tab helper inputs: 0 overview; 1 correspondence; 2 attachments; 3 tailored CV; 4 follow-up; 5 candidate fit; 6 focus plan; 7 interview prep; 8 readiness; 9 history. Translate their existing section outputs through the table. Preserve followMode and open its actual compose/follow-up mode; do not silently drop it as current tab switching can. Unknown keys fall back safely to Overview without submitting or mutating data.

Query, state and compatibility contract

  • Preserve Jobs q, status, companyId, location, needsFollowUp, readiness, includeDeleted, sortBy, sortDir and page. Keep existing page-number interpretation. view changes only presentation. Board query parity must be tested before /kanban redirects.
  • Preserve return state from/focusJobId; return to exact filter/list context, restore focus or a safe nearby list heading if the row no longer exists. Only local safe return paths are accepted.
  • Preserve capture ?add= and ?addtext=, encoding, consumed-once review and optional post-create attachment/CV work. Do not put private draft bodies in new URLs or command history.
  • Preserve /companies?edit=id and correspondence ?view=review. Draft identity/revision stays with its service; adding a draft deep link must not create/resend a draft.
  • Preserve /career?section=overview, profile, evidence or import; missing/unknown selects Overview as today. Canonical editing and import-review entry must remain distinct. No CV editor query contract is invented from a test filename.
  • Keep public token URLs and backend OAuth callback/postMessage origin/state behavior. Do not migrate them through a generic route redirect.
  • Prefer React Router replace for compatibility aliases so Back does not loop. Preserve relevant query/hash/state; never trust URL account identifiers as authorization.
  • Keep aliases throughout migration and at least the first completed full rollout. There is no approved removal date. Removal requires explicit decision, observed old-link usage without private data, updated extension/bookmarklet/notifications and regression evidence. No redirect chains: every alias targets the canonical resolver directly.

Titles, breadcrumbs and route validation

One h1 per page. Collection title: Jobs / Career Profile / CVs. Detail: role at company or CV name, safely text-rendered; browser title adds section and current Jobjakt name. Public token pages must not copy tokens into titles. Breadcrumbs on detail/Settings/Admin only when they provide navigation, e.g. Jobs → Role, CVs → CV name; status and tabs are not extra breadcrumb ancestors.

Phase 5 route changes require an actual App browser fixture for every migrated canonical/alias entry, loaded and missing/foreign objects, query retention, capture no-write, browser Back/refresh, dirty Cancel/Discard, focus return and account switch. Existing route-helper tests alone are insufficient. Test real static nginx fallback separately before deployment; F04 remains open.