chore: apply reconcile suggestions — CLAUDE.md drift + TODO sync
REC-1: registry cross-ref ranges (22 BDR / 31 LRN / 5 BLK).
REC-2: env-var identity checked with tour evidence.
REC-3: draft mirror note — restore landed f58a49f.
REC-4: CLAUDE.md factual drift — canvg→native raster, svgToPngDataUrl→
loadSvg, version 1→2, pako→DecompressionStream, pnpm path, folder tree
(EditorsRoute, AppHeader/Footer, LateralityPicker, pdf render files).
TODO gains a dated tour+fixes DONE block.
This commit is contained in:
1 parent
9d8267ba22
commit
d7c9d39b13
2 files changed
+20
-17
No files matched your search
@@ -29,7 +29,7 @@ MVP species: equine only. Open-source MIT.
|
||||
| State | Zustand | 5 |
|
||||
| Validation | Zod | 3 |
|
||||
| PDF | pdf-lib | 1.17 |
|
||||
| SVG raster | canvg | 4 |
|
||||
| SVG raster | native Image/canvas (no dependency) | — |
|
||||
| Animation | motion | 11 |
|
||||
| Tests | vitest + happy-dom + @testing-library/react | 3.x |
|
||||
| Deploy | Docker multi-stage → nginx:alpine | — |
|
||||
@@ -77,8 +77,8 @@ docker compose up --build
|
||||
docker compose down
|
||||
```
|
||||
|
||||
Note: pnpm binary at `~/.local/share/pnpm/bin/pnpm` on dev host (corepack broken).
|
||||
Add it to PATH: `export PATH="$HOME/.local/share/pnpm/bin:$PATH"`.
|
||||
Note: pnpm binary at `~/.local/bin/pnpm` on dev host (corepack broken).
|
||||
It is normally already on PATH; otherwise `export PATH="$HOME/.local/bin:$PATH"`.
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +113,7 @@ osteo/
|
||||
├─ src/
|
||||
│ ├─ app/
|
||||
│ │ ├─ App.tsx ← root router
|
||||
│ │ ├─ routes/{Home,NewReport,Editor,SvgEditor,NotFound}Route.tsx
|
||||
│ │ ├─ routes/{Home,NewReport,Editor,Editors,SvgEditor,NotFound}Route.tsx
|
||||
│ │ └─ providers/ConfigProvider.tsx ← AppConfig context
|
||||
│ ├─ config/env.ts ← runtime config resolution
|
||||
│ ├─ domain/
|
||||
@@ -139,20 +139,20 @@ osteo/
|
||||
│ ├─ anatomy/
|
||||
│ │ ├─ types.ts ← Bone, BoneCategory, BoneState
|
||||
│ │ ├─ svgConvention.ts ← parseSvgBones()
|
||||
│ │ ├─ svgLoader.ts ← loadSvg(), svgToPngDataUrl()
|
||||
│ │ ├─ svgLoader.ts ← loadSvg()
|
||||
│ │ └─ labels.ts ← boneLabel(bone, locale, fallback)
|
||||
│ ├─ components/
|
||||
│ │ ├─ ui/{Button,Card,Dialog,Input,Label,Select,Textarea,Badge,Chip}.tsx
|
||||
│ │ ├─ canvas/{AnatomyCanvas,DetailModal}.tsx
|
||||
│ │ ├─ observation/{ObservationList,ObservationCard,FindingsTreePicker,
|
||||
│ │ │ VertebraPicker,SeveritySelector,
|
||||
│ │ │ VertebraPicker,SeveritySelector,LateralityPicker,
|
||||
│ │ │ FreeTextFindingInput}.tsx
|
||||
│ │ ├─ report/{ReportHeader,PractitionerForm,AnimalForm,
|
||||
│ │ │ ConclusionPanel,NextAppointmentPicker}.tsx
|
||||
│ │ └─ brand/{Brand,LanguageSwitcher}.tsx
|
||||
│ │ └─ brand/{Brand,AppHeader,Footer,LanguageSwitcher}.tsx
|
||||
│ ├─ pdf/
|
||||
│ │ ├─ export.ts + import.ts + attachment.ts + fonts.ts
|
||||
│ │ └─ render/{header,footer,observationPage,conclusionPage,svgToPng}.ts
|
||||
│ │ └─ render/{header,footer,observationPage,conclusionPage,svgToPng,text,logo,linkAnnotation}.ts
|
||||
│ ├─ lib/{dates,id,assert,zoneMatch,spineZones}.ts
|
||||
│ ├─ styles/{index,tokens,svg-editor}.css ← Tailwind v4 CSS-first + SVG editor styles
|
||||
│ └─ main.tsx
|
||||
@@ -253,7 +253,7 @@ Runtime config
|
||||
### Schemas
|
||||
- domain/schema/*.ts are the data contracts — never change without bumping version
|
||||
- All user-provided data goes through Zod parse before hitting the store
|
||||
- ReportSchema.version = 1 for MVP; future breaking changes → version 2
|
||||
- ReportSchema.version = 2 (v1 attachments rejected at import with a typed error); future breaking changes → version 3
|
||||
|
||||
### Stores
|
||||
- No direct store mutation outside Zustand actions
|
||||
@@ -302,7 +302,6 @@ Runtime config
|
||||
| zustand 5 | Lightweight global state |
|
||||
| zod 3 | Schema validation + type inference |
|
||||
| pdf-lib 1.17 | Pure-JS PDF generation + native attachments |
|
||||
| canvg 4 | SVG → Canvas rasterization for PDF |
|
||||
| motion 11 | Animations (modals, toasts, observation cards) |
|
||||
| vitest 3 | Test runner |
|
||||
| happy-dom | DOM environment for tests |
|
||||
@@ -321,8 +320,8 @@ Runtime config
|
||||
- Never modify anatomy SVGs in public/species/ — they are source assets from the user.
|
||||
- Pathology DB entries must be source-cited before commit; client review required for MVP batch.
|
||||
- Ask before any change to importReportFromPdf or extractReportJson — these handle user data.
|
||||
- After PDF roundtrip tests fail: check attachment bytes, then Zod validation, then pako decompression.
|
||||
- pnpm binary: `~/.local/share/pnpm/bin/pnpm` on dev host. Add to PATH in shell profile.
|
||||
- After PDF roundtrip tests fail: check attachment bytes, then Zod validation, then DecompressionStream inflation.
|
||||
- pnpm binary: `~/.local/bin/pnpm` on dev host (normally already on PATH).
|
||||
|
||||
## Commit message convention
|
||||
|
||||
|
||||
Reference in new issue
Block a user