feat(planner): mark candidate done with todo-source bridge sync (#464) #479
No reviewers
Labels
No labels
app/archiv
app/einkaufslisten
app/imap-client
app/wissensbasis
arch-answered
arch-question
area/api
area/auth
area/infra
area/mobile
area/shared
area/ui
area/web
portfolio-status
prio/high
prio/low
prio/medium
roadmap/public
size/l
size/m
size/s
size/xl
size/xs
status/blocked
status/needs-info
type/bug
type/chore
type/docs
type/feature
type/idea
type/refactor
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
admin-mrrm/mrrmlabapp!479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/candidate-mark-done"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Erste Interaktion auf /heute (#464): Tap auf den Done-Button entfernt das Item optimistisch. Backend bekommt
POST /candidates/:id/donemit symmetrischer Brücke zur Todo-Liste — schließt den Rückweg, den rc22 (#472) hingelegt hat.What changed
CandidatesService.markDoneläuft indb.transactionmitSELECT FOR UPDATE; beisource='todo'wirdlist_items.data.doneim selben Tx viajsonb_setmitgeführt. Cross-tenant-Guard über JOIN auflists.owner_sub(list_items hat keine eigene ownerSub-Spalte). Idempotent beidone, 409 beiobsolete, 404 sonst.CandidatesResource.markDonemit zod-Response-Schema (Schema-Drift-Guard wie rc22).useMarkCandidateDone— TanStack Query Optimistic Update mit Snapshot/Rollback/Invalidate. Tamagui ItemRow bekommt Done-Button mitaccessibilityLabel='Erledigt: <title>'.apps/web/e2e/heute-mark-done.spec.tsspiegeltheute-todo-flow.spec.ts— Item erscheint → Tap → verschwindet ≤5s.docs/adr/0001-candidate-model.md§7 Addendum dokumentiert die Phase-1-Entscheidung (per-source inline statt Event-Bus, weil N=1).Architektur-Entscheidung
Vor der Implementierung als arch-q #478 konsultiert. Verdict: Option (b) symmetrischer inline Writer, kein Event-Bus für N=1 backward-sync. ADR 0001 §7 wird re-interpretiert als Datenkonsistenz-Vertrag, nicht als Bus-Mandat. Sobald die zweite Source backward-sync braucht (vermutlich Tracking), wird
SourceDoneHandler-Interface + Dispatcher extrahiert — bis dahin wäre der Bus reine Indirektion.Test plan
candidate-mark-done.int-spec.ts— 5 Cases (todo+list_items lockstep, idempotent, obsolete→409, missing→404, non-todo source flippt nur Candidate)Fixes #464