Add manual critical table cell editor

This commit is contained in:
2026-03-14 15:09:16 +01:00
parent 4e518244a2
commit 6e28ad975f
16 changed files with 1105 additions and 27 deletions

View File

@@ -270,3 +270,29 @@ Current import flow:
7. Route image PDFs like `Void.pdf` through OCR before the same parser.
The important design decision is: never throw away the original text. The prose is too irregular to rely on normalized fields alone.
## Manual curation workflow
Because the import path depends on OCR, PDF XML extraction, and heuristics, the web app now treats manual repair as a first-class capability instead of an out-of-band database operation.
Current curation flow:
1. Browse a table on the `/tables` page.
2. Hover a populated cell to identify editable entries.
3. Open the popup editor for that cell.
4. Edit the entire `critical_result` graph:
- base raw cell text
- curated prose / description
- raw affix text
- parse status
- parsed JSON
- nested `critical_branch` rows
- nested `critical_effect` rows for both the base result and branches
5. Save the result back through the API.
The corresponding API endpoints are:
- `GET /api/tables/critical/{slug}/cells/{resultId}`
- `PUT /api/tables/critical/{slug}/cells/{resultId}`
The save operation replaces the stored branches and effects for that cell with the submitted payload. That keeps manual edits deterministic and avoids trying to reconcile partial child-row diffs against importer-generated data.