docs(docs): R2 labels table, Rust exception, trial protocol

V1-2-6_R2_LABELS.md: the 45 i18n keys R2 adds, changes or removes
(FR, provisional EN, where, status) with the ambiguities and the
pending add-draft cancel question. RUST_ARCHITECTURE_REVIEW Part II:
class C rows for the display-only reference modules (BDR-114 A).
U1_CORRECTIONS §R2 status; BROWSER_TESTS: the two new specs, five
tabs, editor-equine never run, the admin.spec crash risk;
OWNER_TRIAL §4.10 db:trial protocol for R2 and stale four-tab /
old-panel text updated; CLAUDE.md tree.
This commit is contained in:
bchanot committed 2026-11-12 22:49:17 +01:00
1 parent 4b7d2542fd
commit 2182307c62
6 files changed
+285 -13

No files matched your search

@@ -302,6 +302,10 @@ concrete constraint.
| `packages/supabase` client factory, auth/profile wrappers, `database.types.ts`, PGlite harness | vendor SDK, generated types, test infra | TS | no Rust GoTrue client for the browser; PGlite is a JS/WASM library | no | none | none | | **C** | n/a |
| `auth/validation.ts`, `account/validation.ts` (Zod, i18n keys) | form field rules | Zod | portable but React-bound (retained list); the constraints are duplicated in SQL CHECKs and `config.toml` and drift (trim, UTF-16 vs `char_length`, `''` on names) | no | | | one constants module + a PGlite test reading `pg_constraint` and `config.toml` with the counting rule recorded (separate chore, D-R7) | **C** | chore |
| `lib/{dates,id}.ts` | `nowIso`, `todayIso`, `formatDate` (screen), `generateId` | Web APIs | clock and ids injected into the core; screen dates stay `Intl` | no | | | | **C** | n/a |
| `apps/app/src/editor/references/{filter,citations,panel}.ts` | Références tab and citations panel: search match on citation, DOI and URL (`folded`); who cites each reference (`citersOf`); the citations and the path of one finding | TS over the validated document | portable (pure functions), but display lists over the document the core already validated; the one rule nearby, which finding depends on a reference, stays the core's `sheet.dependents` | no | none; read in `useMemo` on the parsed document | none | existing unit suites (`editor-references-view`, `editor-citations`) | **C**: display-only search and listing over validated data, no business rule, no mutation; owner decision BDR-114 (A) 2026-11-12 | n/a |
| `apps/app/src/editor/references/{sort,view,referenceTypes}.ts` | the four display orders of the Références tab (sheet, citation A to Z, count, type), the shown set after search and sort | TS, `Intl.Collator` of the current language | the collation needs the browser's ICU data (a Rust equivalent would ship its own); a pure function of positions that never writes the document, the stored order or the history | no | none | none | `editor-reference-sort.test.ts` (stable, equal keys keep the stored order, inputs untouched), view suites | **C**: display-only ordering, no business rule, no mutation; BDR-114 (A) | n/a |
| `apps/app/src/editor/references/safeLink.ts` | `http` and `https` link target for a URL, `https://doi.org/` target for a well-formed DOI | TS (`URL`) | portable; it builds a display link, it validates no stored field (the core's reference rules stay authoritative) | no | none | none | `editor-safe-link.test.ts` | **C**: display-only link building over validated data; BDR-114 (A) | n/a |
| `apps/app/src/components/editor/references/useReferenceView.ts` | search text and sort choice (React state), tile order handed to the tab | React hook | holds view state only and calls the pure functions above; it reaches no wasm call and no document write | no | none | none | `editor-references-view.test.tsx` | **C**: React state of a display view; BDR-114 (A) | n/a |
| `i18n/*` (281 keys ×2, `useT`, `pickLocaleLabel`) | UI strings | TS | UI data and hook; the engine's 25 archived labels move with the engine | no | | | parity test | **C** | n/a |
| `config/env.ts`, `lib/supabase.ts`, providers, guards, routes, components, styles | runtime config, React | TS | glue | no | | | | **C** | n/a |
| `vite/sheet-bundle.ts`, ESLint, Vite, vitest configs | build tooling | Node | Vite plugin API is JavaScript | no | | | | **C** | n/a |
@@ -325,6 +329,13 @@ concrete constraint.
and error shapes, UI form schemas and dictionaries, platform clock/crypto
and screen date formatting, the browser rasteriser (DOM), Vite asset
wiring and tooling, SQL and RLS, the public web framework (D-R8).
Exception for the Références tab (owner decision BDR-114 (A), 2026-11-12):
search, sort, citer lists and link building under
`apps/app/src/editor/references/` stay in TypeScript. They only order, filter and format the
document the core has already validated, hold no business rule and never
mutate it. The limit: any rule that would change the document, or that the
PDF or the server must share (what may be deleted, what a citation
requires, a count stored or archived), moves to `crates/core`.
---