1 ADR 0055 discovery edit mode
Forgejo Actions edited this page 2026-09-25 16:38:07 +00:00

ADR 0055: Discovery Domain Edit Mode — User Marker Edits with Provenance

Status: proposed Date: 2026-06-18

Context

Discovery markers on the photo viewer (plant bounding boxes, face regions, thing labels) are read-only. Users cannot correct marker position, remove false positives, add missed markers, or edit labels inline on the canvas. Existing assign-species/assign-person dialogs require sidebar interaction. New API endpoints and data model needed for user edit decisions separate from worker results. Key constraints: no original mutation, non-destructive overrides, touch-friendly (44px min targets).

Decision

  1. New DB table user_discovery_markers stores user edits (id, media_item_id, domain_key, scope JSONB, marker_type, provenance JSONB, state, class_instance_id, label). 2. Separate API endpoints: POST create, DELETE soft-delete, PATCH scope, POST label. 3. Edit mode per-domain toggle (not global). 4. Prop-driven canvas interaction matching existing patterns. 5. Assign dialogs gated behind edit mode — sidebar buttons hidden when not editing.

Consequences

Positive: clean separation of user edits from worker results; edits survive reruns; reversible via reset-domain API; touch-friendly. Negative: new DB table and 4 endpoints; edit mode blocks single-finger canvas pan; future domains need edit-config updates. Risk: drag vs pan conflicts on mobile needs thorough testing.