fix(editor): Task 3 round 1, literal journey, pin, limits, notice

This commit is contained in:
bchanot committed 2026-11-13 20:38:04 +01:00
1 parent 8b42816270
commit 3bb3603115
9 files changed
+295 -97

No files matched your search

+1 -1
View File
@@ -304,7 +304,7 @@ concrete constraint.
| `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 the finding filter, the search and the sort (R2F-6: the ids a finding cites narrow the list; no pin under a filter) | 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/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, and its `http`/`https` test also backs the reference dialog's precheck of the stored URL field (UI form validation: the same refusal the core makes, shown on the field; the core's reference rules stay authoritative and refuse anything else) | 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), the finding filter read from the history view (navigation, not typed text), 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 |