Frontend: branded 404 page for unknown routes (preserve TimeCurve referral paths) #223
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#223
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Unknown client routes currently mount
RootLayoutwith an empty<Outlet />— no dedicated not-found UI. Add a branded 404 page and a catch-all route, without breaking referral link shapes or static TimeCurve sub-routes.Current behavior
ShellRoutesinfrontend/src/app/LaunchGate.tsxregisters explicit routes only; there is nopath="*"fallback after launch / in no-env builds.CountdownRoutesalready usespath="*"for the countdown shell — out of scope except to avoid regressions whenVITE_LAUNCH_TIMESTAMPis set.TimeCurveSubnavintentionally links bare/timecurve(not a path that 404s) — keep that contract.Referral / TimeCurve routing (must preserve)
Product spec:
docs/product/referrals.md.?ref={code}on any matched routeapplyReferralUrlCapture+ReferralPathSyncinRootLayout— must still run on 404 when query is valid/timecurve/{slug}a-z0-9, not reserved) → TimeCurve Simple + path capture — not 404/timecurve/arena,/timecurve/protocoltimecurve/:timecurveSegment) — not 404/{code}/home, etc.) — should 404, not become referral capturereferralPathReserved.ts(arena,protocol,home,referrals, …) — no path capture; route should remain the normal product surface or 404 per table belowImplementation references:
extractReferralCodeFromPathnameTimeCurveBranchPage(timecurve/:timecurveSegment→ Simple for unknown segments today)referralPathCapture.test.ts,referralPathReserved.test.tsProposed routing matrix (align in PR)
Clarify in implementation + docs which cases get 404 vs existing pages:
/nope,/timecurve/foo/bar,/referrals/extra,/home/extra, bare/luck777(no top-level slug route).ROUTES_*/TIMECURVE_ROUTES/SECONDARY_ROUTES./timecurve/{segment}wheresegmentis not a valid referral slug (too short, bad charset, reserved): today renders Simple without capture; consider 404 vs friendly “invalid referral link” vs redirect to/timecurve(pick one; document inreferrals.md).Catch-all should be last child under
RootLayoutso explicit routes win.Acceptance criteria
NotFoundPage(or equivalent) with on-brand copy, primary CTAs (e.g. TimeCurve, Home//homeper launch mode, Referrals).path="*"route inShellRoutesrenders the 404 insideRootLayout(header/footer/audio shell unchanged)./timecurve/{referral}and static/timecurve,/timecurve/arena,/timecurve/protocolunchanged.?ref=capture still works when visiting an unknown path with a valid query (ReferralPathSync remains mounted)./definitely-not-a-routeshows 404 UI; one that/timecurve/{validSlug}does not show 404 (extendnavigation.spec.tsor referral e2e).document.title/metaorrole="main"heading for a11y; note SPA hosting (index.htmlfallback) if deploy config needs an explicit 404 document for non-asset paths.Out of scope
/{referral}public routes (explicitly rejected in product docs).Related
referralPathReserved.tscomment)docs/product/referrals.md/homeoutlet fix: #199mentioned in commit
8fb7290f1eImplementation summary (GitLab #223)
Merged to
mainin8fb7290— branded 404 for unknown client routes insideRootLayout.What changed
NotFoundPage(data-testid="not-found-page") with on-brand copy, CTAs (TimeCurve, hub, Referrals),role="main", anddocument.titlePage not found · YieldOmega.ShellRoutescatch-allpath="*"registered last so explicit routes win.homeHubPath()helper:/(no-env) vs/home(post-launch) for the hub CTA./timecurve,/timecurve/arena,/timecurve/protocol, valid/timecurve/{referral}; invalid/timecurve/{segment}still renders TimeCurve Simple without path capture (unchanged).?ref=capture still runs on unknown paths viaReferralPathSync.Docs / invariants
INV-FRONTEND-223-NOT-FOUND— docs/testing/invariants-and-business-logic.md#branded-404-catch-all-gitlab-223Automated verification (ran before merge)
Manual verification checklist
/definitely-not-a-route→ 404 heading + shell chrome, not empty outlet/timecurve/abc12→ TimeCurve Simple, no 404/timecurve/arena,/timecurve/protocol,/timecurveunchanged/luck777→ 404 (no bare/{code}route)/definitely-not-a-route?ref=test1→ 404 UI andyieldomega.ref.v1pending codetest1/on no-env dev build,/homeon post-launch build@nullvector_ux — please verify the checklist above on your preferred build (no-env dev and/or post-launch). Leaving the issue open until sign-off.
Manual verification checklist @PlasticDigits
/definitely-not-a-route→ 404 heading + shell chrome, not empty outlet/timecurve/abc12→ TimeCurve Simple, no 404/timecurve/arena,/timecurve/protocol,/timecurveunchanged/luck777→ 404 (no bare/{code}route)/definitely-not-a-route?ref=test1→ 404 UI andyieldomega.ref.v1pending codetest1/on no-env dev build,/homeon post-launch build