kanban-dev-webapp/src/app/actions
Dave b3aac9ba4f feat(plan): Plan Puzzle v1 backend — proposal fields, server actions, Done-column guards
Adds the three proposal fields (proposed_target_date, proposed_by,
proposed_at) to the cards collection with a partial index that backs
the 'pending proposals' query, plus two new ActivityAction values
(date_proposed, date_proposal_resolved) and column_changed for
return-to-scheduled.

New server actions under src/app/actions/:
  - client-proposal.ts: client-manager drag creates a proposal (not
    a target_date write); 404 (not 403) on cross-tenant failures and
    Done-column cards, matching the rest of /api/client/*.
  - owner-plan.ts: accept and dismiss clear the three proposal
    fields together and emit the audit rows; returnToScheduledAction
    moves a Done card back to the first working column.

Server-side Done-column guards added to:
  - src/app/actions/reschedule.ts (was UI-only)
  - src/app/api/client/cards/[id]/route.ts (was UI-only)

Both pass through the new writeCardWithAudit helper at
src/lib/cards/write-with-audit.ts — single source of truth for
'patch card + emit activity rows', replacing the inline copies in
the PATCH route and rescheduleCardAction.

Adds src/lib/roadmap/slot-date.ts (slot <-> target_date mapping)
consumed by Pixel's puzzle UI; named SlotId API rather than the
plan's numeric indices for self-documenting callers.

CLIENT_EDITABLE_CARD_FIELDS stays at priority + target_date per
the brief; proposals go through the dedicated action so they get
their own audit row type.
2026-09-19 18:35:33 +02:00
..
plan feat(plan): Plan Puzzle v1 backend — proposal fields, server actions, Done-column guards 2026-09-19 18:35:33 +02:00
activity.ts feat(activity): superuser-backed audit log helper 2026-09-16 10:58:35 +02:00
ai-settings.ts feat(ai): settings page with a real connection test 2026-09-16 15:54:58 +02:00
cards.ts feat(linking): re-link on ingest and on card rule changes 2026-09-16 13:24:17 +02:00
client-proposal.ts feat(plan): Plan Puzzle v1 backend — proposal fields, server actions, Done-column guards 2026-09-19 18:35:33 +02:00
clients.ts feat(actions): client and project management with seeded boards 2026-09-16 11:27:01 +02:00
columns.ts feat(actions): column management guarded by board invariants 2026-09-16 11:27:46 +02:00
comments.ts feat(actions): subtask and owner comment mutations 2026-09-16 10:59:37 +02:00
ingest.ts feat(dashboard): add Refresh commits button, separate from Recompute 2026-09-17 14:58:01 +02:00
intake.ts feat(intake): interview action and client-facing wizard 2026-09-16 17:56:06 +02:00
linking.ts feat(linking): re-link on ingest and on card rule changes 2026-09-16 13:24:17 +02:00
log-work.ts fix(dashboard): truncate subject to the schema's 300-char limit 2026-09-19 14:49:39 +02:00
metrics.ts feat(metrics): cached project metrics recomputed on ingest 2026-09-16 13:51:03 +02:00
narrative.ts feat(admin): manual narrative generation 2026-09-16 16:25:58 +02:00
owner-plan.ts feat(plan): Plan Puzzle v1 backend — proposal fields, server actions, Done-column guards 2026-09-19 18:35:33 +02:00
projects.ts feat(projects): kind on create/admin, home page grouped by client 2026-09-17 10:42:48 +02:00
reschedule.ts feat(plan): Plan Puzzle v1 backend — proposal fields, server actions, Done-column guards 2026-09-19 18:35:33 +02:00
subtasks.ts feat(actions): subtask and owner comment mutations 2026-09-16 10:59:37 +02:00
summarise.ts feat(admin): summary progress and manual generation 2026-09-16 16:16:56 +02:00
users.ts feat(actions): issue and deactivate client-manager accounts 2026-09-16 11:27:25 +02:00