Blob: docs/deferred/README.md
Deferred work
Work intentionally not done in the initial build, with enough context to pick it up cold. Each file states the goal, the recommended approach, the hard parts, and a rough effort estimate.
Index
| File | Topic | Priority |
|---|---|---|
| background-removal.md | Remove/replace background (phase 2) | High |
| face-aware-passport.md | Auto-frame faces for ID photos (phase 2) | High |
| free-form-crop.md | True corner-drag crop + layers/text (Konva) | Medium |
| enhancements.md | Undo/redo, persistence, batch, more adjustments | Medium |
| known-limitations.md | Current behavioral limits and caveats | n/a |
The one cross-cutting tension to know about
The app sets Cross-Origin-Embedder-Policy: require-corp so SharedArrayBuffer is available for threaded WASM (wasm-vips, jSquash mt). Under require-corp, any cross-origin subresource (for example an ML model fetched from a CDN) is blocked unless it carries a Cross-Origin-Resource-Policy header.
Consequence: features that pull large models (background removal, face detection) must self-host their model and wasm assets same-origin, or the page must drop cross-origin isolation (and therefore the vips fast path). Plan to self-host the assets. This is called out again in the relevant files.
Status of the data model for phase 2
The Template type already carries an optional framing field
({ faceHeightRatio: [min, max], eyeLineFromTop }) and the US passport template
populates it. EditorCanvas already renders a manual framing guide from it. The
remaining phase-2 work is to compute the crop automatically from a detected face.