chore(comments): drop epic, sprint and review-round ids from the code
The code cited its plan instead of saying why: `E28 review J4`, `(R6 S3b)`, `S1 justified…`,
`deep-review round 5`. That plan lives in the private ops repo, so for every reader of this one the
citation was noise, and a sentence whose subject was the plan step ("round 2 showed…") hid its
lesson behind an id. Each one is gone and the "why" kept: a bare citation is deleted, a sentence
carrying a lesson is reworded around it ("a later attempt showed…").
Measured (`scripts/audit_metrics.py`, product code): 652 lines in 270 files carried an epic code by
the definition the next commit holds (507 / 241 by the old, two-digit-only one) -> 0. Across all
code, tests, scripts and configs: ~1100 epic-code lines plus ~320 sprint/round ids.
Behaviour unchanged, checked mechanically: every changed .py file has the same AST once docstrings
are blanked; css/sh/toml/yml/json files are identical once comments are stripped; the only
non-comment changes in TS/JS are test titles, one description string in a contract table, and five
ESLint messages, whose text is all the gates snapshot diff holds. Not touched: Markdown (docs and
the changelog keep their history), Alembic migrations, TV episode notation (`S2 · E5`), DESIGN.md
ids (`C1`, `B4`, `S3h`), tracker ids (`SEC-16`, `DX-17`).
One stale claim fixed on the way: test_hls_reaper's docstring said the player checkpoints "every
10 s whether or not it is playing", which plex/stream.py calls wrong; it now says what the code does.
This commit is contained in:
@@ -4,8 +4,8 @@ import i18n from "../i18n";
|
||||
// The one home of the app's LOCALE forms — numbers, units, dates (alphabetical order: `collate.ts`) —
|
||||
// all in the UI language, never the browser's (lint: `local/locale-format` refuses a hand-built one elsewhere).
|
||||
//
|
||||
// Every formatter takes the language (or `t`) as an ARGUMENT, and that is load-bearing, not style
|
||||
// (E30 S3): the React Compiler memoizes a call on its arguments, so a formatter that read the language
|
||||
// Every formatter takes the language (or `t`) as an ARGUMENT, and that is load-bearing, not style:
|
||||
// the React Compiler memoizes a call on its arguments, so a formatter that read the language
|
||||
// off the i18n singleton kept its old answer after a language switch — a card still said "2 hr 4 min"
|
||||
// beside a hero saying "2 ó 16 p". Passing `i18n.language` (from useTranslation) makes the language a
|
||||
// dependency the compiler can see; the signature makes forgetting it a type error.
|
||||
@@ -121,8 +121,8 @@ export function formatDuration(sec: number | null): string {
|
||||
return h > 0 ? `${h}:${pad(m)}:${pad(s)}` : `${m}:${pad(s)}`;
|
||||
}
|
||||
|
||||
// A duration's unit in the UI language, in the browser's own short form (docs/DESIGN.md "Copy", E28
|
||||
// S3g): "90 min", "2 hr" / "90 p", "2 ó". Hand-typed "90m" / "2h" were English in both languages and
|
||||
// A duration's unit in the UI language, in the browser's own short form (docs/DESIGN.md "Copy"):
|
||||
// "90 min", "2 hr" / "90 p", "2 ó". Hand-typed "90m" / "2h" were English in both languages and
|
||||
// came in three spellings. One formatter per language × unit, built lazily (the grids format one per card).
|
||||
export type DurationUnit = "second" | "minute" | "hour" | "day";
|
||||
export function formatUnit(
|
||||
@@ -225,7 +225,7 @@ export function formatCountOrDash(n: number | null | undefined, lang: string): s
|
||||
return n != null ? formatCompact(n, lang) : "—";
|
||||
}
|
||||
|
||||
// The app's date forms (docs/DESIGN.md "Copy", E28 S3g), all in the UI language — never a bare
|
||||
// The app's date forms (docs/DESIGN.md "Copy"), all in the UI language — never a bare
|
||||
// `toLocaleString()`, which formats in the BROWSER's locale (an English UI showed a Hungarian-shaped
|
||||
// date) and, with no options, as numbers with seconds ("9/27/2026, 8:30:14 AM"):
|
||||
// relativeTime "3d ago" / "3 napja" — recency in a list; the exact form on hover
|
||||
|
||||
Reference in New Issue
Block a user