From 3c25eaf8cf2b604128631e6eefee1e6728580b6c Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Sun, 26 Jul 2026 13:38:48 +0700 Subject: [PATCH] docs: record the Phase 4 review outcome MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The plural helper docs/07 §5 asked for now exists, so §5 names it and the two shape tests that enforce it. The decision log gains the five design choices the review forced, and the progress note records that 19 of 33 findings survived verification -- including the first-run dead-end where the gate was reachable only from the routes it blocked. Adds one measured defect to the Phase 5 list rather than fixing it silently: Button's .danger/.success hardcode white, which is 2.75:1 on dark-theme --danger. Same class of bug as the --accent-fg one Phase 4 fixed, but it needs new tokens and a visual decision rather than a mechanical change. Co-Authored-By: Claude Opus 5 --- CLAUDE.md | 11 ++++++++--- docs/07_I18N.md | 14 ++++++++++++++ docs/15_ROADMAP.md | 16 ++++++++++++++-- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d37e3f8..0f29b4e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -87,9 +87,14 @@ performance budgets docs/11 §6, CI workflows per docs/12 §2 (explicit `permissions:` blocks on every caller — and note the ops repo has **no** `browser-extension-*` family), CHANGELOG, README (badges, screenshots ⚠, install, privacy summary, donate), full manual QA (docs/11 §5), `wxt zip` -clean-install test. Also: point About's "Changelog" link at `CHANGELOG.md` -once it exists (`src/lib/links.ts` currently targets `/releases`), and split -`EditTab.svelte`, which is past the 500-line hard limit. +clean-install test. Also carried in from the Phase 4 review: +- point About's "Changelog" link at `CHANGELOG.md` once it exists + (`src/lib/links.ts` currently targets `/releases`); +- split `EditTab.svelte`, which is past the 500-line hard limit; +- `Button.svelte`'s `.danger`/`.success` variants hardcode `color: #fff`, which + measures **2.75:1** on dark-theme `--danger` (#ff6b7d) — under the 4.5:1 + docs/06 §5 requires. Phase 4 fixed the same class of bug for `--accent-fg`; + these need `--danger-fg`/`--success-fg` tokens and a visual decision. **Exit:** ready for the docs/13 §1 runbook (human performs store submission). ## Working style diff --git a/docs/07_I18N.md b/docs/07_I18N.md index 07f7043..d30232c 100644 --- a/docs/07_I18N.md +++ b/docs/07_I18N.md @@ -129,6 +129,20 @@ stay raw. a tiny helper selects by locale. VI/JA have one grammatical form, so they set `one` and `other` to the same string. They must still carry both keys, or the `satisfies Dict` shape check that §2 relies on for completeness fails. + + Implemented as `selectPluralForm(count, tag)` in `i18n/format.ts` (backed by + `Intl.PluralRules`, narrowed to the two forms — en yields `one`/`other`, vi + and ja only ever `other`, so two forms cover every locale we ship) and + `tPlural(path, count, params?)` in `index.svelte.ts`, which supplies `{n}` + already grouped for the locale so callers pass a raw count. Two tests in + `tests/unit/i18n/dictionaries.test.ts` enforce the shape: every plural key + carries both forms in all three locales, and carries nothing else. + + The current plural keys are `import.warnings.title` and **all seven** + `warnings.*` codes — including the two that interpolate no count, because + `ParseWarning` always carries one and a uniform shape lets `WarningList` call + `tPlural` unconditionally instead of maintaining a list of which codes count + things. Anything else stays a plain string. - Legal Gate: the four legal documents are **English-only** (canonical), with a localized one-line note: "The legally binding documents are in English." - Store listing: EN required; VI + JA listings via CWS dashboard localized diff --git a/docs/15_ROADMAP.md b/docs/15_ROADMAP.md index 4fadd09..3369901 100644 --- a/docs/15_ROADMAP.md +++ b/docs/15_ROADMAP.md @@ -29,8 +29,15 @@ review found real defects (7, 13 and 14 in phases 1–3) — several in the path that delete bookmarks. Budget that review into the remaining phases; a green test run has not once meant "done" on this project. -Phase 4 found three latent defects in code that 338 green tests had already -signed off, all of them unreachable until Phase 4 gave them a caller: +Phase 4's own review filed 33 findings across six lenses; 19 survived +adversarial verification. The most serious was a first-run dead-end: the gate +rendered only on the three routes it blocked, and those three tabs were the +only in-app navigation to them — so a user who reached `#settings` (via the +popup's new gear, which opens a fresh tab with no history) could never get +back to the accept UI. + +Phase 4 also found three latent defects in code that 338 green tests had +already signed off, all unreachable until Phase 4 gave them a caller: `writeSettings` handed a `$state` proxy to `chrome.storage.local.set` (would throw `DataCloneError` in a real browser — `fakeBrowser` stores the reference without cloning, so the suite could not see it); `updateSettings` replaced the @@ -116,3 +123,8 @@ attestation resolver, deadlocking it until reload. | 2026-07-26 | The gate's acceptance checkbox deliberately resets if the user navigates away and back — an un-submitted legal affirmation is not worth persisting | 14 §2 | | 2026-07-26 | Both entrypoints await settings (Manager also legal) **before** `mount()`, trading a blank frame for no locale/theme/gate flicker | 02 §2 | | 2026-07-26 | **Known limitation:** two open Manager tabs do not sync settings or acceptance to each other; last write wins. No `storage.onChanged` listener in v1 | 03 §4 | +| 2026-07-26 | Gate-blocked tabs stay **clickable**; what blocks a route is the gate replacing the tab body, not an inert button. Disabling them removed the only in-app path back to the accept UI | 06 §3 | +| 2026-07-26 | Failure UI shows the localized sentence and puts the raw browser error in a separate detail block — `detail ?? t(key)` made every translation dead code | 02 §7 | +| 2026-07-26 | `--accent-fg` is redefined in the dark blocks alongside `--accent`; white on the lightened violet measured 3.67:1 | 06 §5 | +| 2026-07-26 | Plural keys implemented per `07 §5` (`selectPluralForm` + `tPlural`); `import.warnings.title` and all seven `warnings.*` codes converted | 07 §5 | +| 2026-07-26 | The import session stores an i18n **key**, not a resolved string — `t()` is only reactive where it is called, so a stored sentence never follows a language switch | 03 §5 |