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:
2026-10-23 12:42:12 -04:00
co-authored by Claude Opus 5.5
parent 6028d78844
commit 10d50dccbd
164 changed files with 602 additions and 624 deletions
+2 -3
View File
@@ -13,9 +13,8 @@ describe('plural', () => {
});
});
// One way to say a count (M505). Before it there were ~55 hand-written
// copies and two helpers that disagreed on the thousands separator. A
// hand-written copy has a tell this guard looks for:
// One way to say a count, so every count agrees on wording and the
// thousands separator. A hand-written copy has a tell this guard looks for:
// - a branch that spells the one: `n === 1 ? '1 track' : ...`;
// - the number beside a choice of noun: `{n} {n === 1 ? ...}` in markup,
// or `${n} ${n === 1 ? ...}` in a template string;
+1 -1
View File
@@ -1,7 +1,7 @@
// A count with its noun: "1 track", "26,171 tracks". The noun may carry the
// words that agree with it ("album has" / "albums have"). The number is in the
// viewer's locale, as the app's other counts are. The web app's one way to say
// a count (M505); a source guard in plural.test.ts names any hand-written copy.
// a count; a source guard in plural.test.ts names any hand-written copy.
export function plural(n: number, one: string, many: string): string {
return `${n.toLocaleString()} ${n === 1 ? one : many}`;
}
+3 -3
View File
@@ -57,8 +57,8 @@ describe('timeUntil', () => {
expect(timeUntil(new Date(NOW.getTime() + delta).toISOString())).toBe(expected);
});
// The bug CI caught: flooring rendered a 4h-away attempt as "in 3h",
// sending the operator back an hour early.
// Flooring would render a 4h-away attempt as "in 3h", sending an admin
// back an hour early.
test('rounds rather than floors, so nearly-4h reads as 4h', () => {
vi.useFakeTimers();
vi.setSystemTime(NOW);
@@ -67,7 +67,7 @@ describe('timeUntil', () => {
});
// A due-or-overdue attempt is the sweeper's next tick away, not "3h ago" —
// the operator wants to know it is imminent, not how late it is.
// an admin wants to know it is imminent, not how late it is.
test('a moment already passed reads as imminent', () => {
vi.useFakeTimers();
vi.setSystemTime(NOW);
+2 -2
View File
@@ -42,8 +42,8 @@ export function timeUntil(iso: string): string {
// Rounds where relativeTime floors, and the difference matters. Flooring an
// elapsed time is honest — "3h ago" for 3h59m means "at least three hours".
// Flooring a countdown is not: it would show "in 3h" for something 3h59m
// away, so the operator comes back an hour early and finds nothing has
// happened. Caught by CI rendering a 4h-away attempt as "in 3h".
// away, so an admin comes back an hour early and finds nothing has
// happened.
const minutes = Math.round(ms / 60_000);
if (minutes < 60) return `in ${minutes}m`;
const hours = Math.round(ms / 3_600_000);