docs: web comments say what the app does, not how it came to be (#6277)
Rewrites the web app's comments to rule 32. Task, milestone, rule and spec ids are gone; regression stories are restated as the trap they guard (public auth routes, the menu's stopPropagation, universal loads under adapter-static, metric deltas with their margin). Flutter and Tauri mentions now name the Android app or a native shell, operator quotes and dates are dropped, and one library's counts no longer appear outside test fixtures. Verified with a TypeScript-scanner token comparison (template literals and regex literals re-scanned): only comment text changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,10 +6,10 @@ describe('isPublicRoute', () => {
|
||||
expect(isPublicRoute('/login')).toBe(true);
|
||||
});
|
||||
|
||||
// Regression guard for #376: /register was previously bounced to /login
|
||||
// by the layout guard, breaking bootstrap-admin self-registration on
|
||||
// fresh deployments. Do NOT remove /register from the public set unless
|
||||
// you have a deliberate replacement (e.g. invite-only landing page).
|
||||
// /register must stay public: bounced to /login by the layout guard, the
|
||||
// bootstrap admin of a fresh deployment could not register. Do NOT remove
|
||||
// /register from the public set unless you have a deliberate replacement
|
||||
// (e.g. invite-only landing page).
|
||||
test('/register is public — bootstrap admin must reach the form', () => {
|
||||
expect(isPublicRoute('/register')).toBe(true);
|
||||
});
|
||||
@@ -31,11 +31,9 @@ describe('isPublicRoute', () => {
|
||||
expect(isPublicRoute('/loginx')).toBe(false);
|
||||
});
|
||||
|
||||
// Regression guard for drift #558: /forgot-password and the
|
||||
// /reset-password/<token> deep links must be reachable without a
|
||||
// session — the reset flow is entered by clicking an email link
|
||||
// while signed out, so the auth gate redirecting to /login broke
|
||||
// account recovery.
|
||||
// /forgot-password and the /reset-password/<token> deep links must be
|
||||
// reachable without a session — the reset flow is entered by clicking
|
||||
// an email link while signed out.
|
||||
test('/forgot-password is public', () => {
|
||||
expect(isPublicRoute('/forgot-password')).toBe(true);
|
||||
});
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
// Routes that the +layout.svelte auth guard must NOT redirect away from
|
||||
// when the visitor is unauthenticated. Bootstrap-admin self-registration
|
||||
// (#376) requires /register to be reachable without a session — without
|
||||
// /register here, the login page's "Register" link bounces back to /login.
|
||||
//
|
||||
// Drift #558: /forgot-password and /reset-password/<token> were missing
|
||||
// from this set. The email-link reset flow is by definition entered
|
||||
// without a session — a signed-out user clicking their reset link was
|
||||
// being bounced to /login, breaking account recovery.
|
||||
// requires /register to be reachable without a session — without /register
|
||||
// here, the login page's "Register" link bounces back to /login. The
|
||||
// email-link reset flow (/forgot-password, /reset-password/<token>) is by
|
||||
// definition entered without a session.
|
||||
const PUBLIC_ROUTES = new Set(['/login', '/register', '/forgot-password']);
|
||||
const PUBLIC_PREFIXES = ['/reset-password/'];
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { user, setUser } from './user.svelte';
|
||||
export { user };
|
||||
|
||||
// Weekly client-driven cadence for sending the browser's current IANA
|
||||
// timezone to PUT /api/me/timezone (#392 Half B). Tracked in
|
||||
// timezone to PUT /api/me/timezone. Tracked in
|
||||
// localStorage so the cadence survives tab restarts; bumped after each
|
||||
// successful PUT. Failures are swallowed — server keeps its previous
|
||||
// value (or 'UTC' default).
|
||||
|
||||
Reference in New Issue
Block a user