Split the two existing card decks into separate activities #2

Closed
opened 2026-10-13 18:53:03 +00:00 by ben · 2 comments
Owner

Model 'activities' as first-class entities instead of two hard-coded tabs.

Scope

  • Data model: activity (title, instructions, columns, cards) and per-user activity session/assignment holding placements, notes, flags.
  • Migrate Career Values and Life Values into two activities; migrate existing session data without loss.
  • Client UI: list of my activities -> open one (replaces the tab bar). Instructions text shown per activity (e.g. the practitioner's guidance).
  • Columns come from the activity definition, not constants (prerequisite for the Activity Builder).

Acceptance

  • Existing sessions open with identical placements/notes/flags after migration; migration is tested and reversible (backup first).

Handoff context: the app is being prepared so a counselling practice can self-host it (see README and docs/self-hosting.md). Today the app has no auth by design, two hard-coded decks in shared/cards.json, three fixed columns, and Fastify + SQLite + SSE sync (docs/api.md).

Model 'activities' as first-class entities instead of two hard-coded tabs. **Scope** - Data model: `activity` (title, instructions, columns, cards) and per-user `activity session`/assignment holding placements, notes, flags. - Migrate Career Values and Life Values into two activities; migrate existing session data without loss. - Client UI: list of my activities -> open one (replaces the tab bar). Instructions text shown per activity (e.g. the practitioner's guidance). - Columns come from the activity definition, not constants (prerequisite for the Activity Builder). **Acceptance** - Existing sessions open with identical placements/notes/flags after migration; migration is tested and reversible (backup first). --- Handoff context: the app is being prepared so a counselling practice can self-host it (see README and docs/self-hosting.md). Today the app has no auth by design, two hard-coded decks in `shared/cards.json`, three fixed columns, and Fastify + SQLite + SSE sync (docs/api.md).
Author
Owner

Filed during handoff prep (README and docs/self-hosting.md in c133282). No implementation yet. Recommended order: #2 (activities data model + migration) before #1 (RBAC), pending the maintainer's confirmation.

Filed during handoff prep (README and docs/self-hosting.md in c133282). No implementation yet. Recommended order: #2 (activities data model + migration) before #1 (RBAC), pending the maintainer's confirmation.
Author
Owner

Done in 7a4378c and deployed to career.tealmaker.com on 2026-10-13.

Decisions (maintainer):

  • #2 before #1.
  • Single practice per install, on SQLite.
  • Keep the full-session snapshot for sync.
  • Soft-archive cards and columns (no revisions).
  • Delete deploy-test by its verified id.

What landed:

  • A user_version migration runner with a VACUUM INTO backup and a frozen seed; it aborts on unmapped cards.
  • activities, activity_columns, activity_cards and session_activities tables.
  • Per-activity API routes (state is v2 via ?v=2); legacy routes keep their old shapes until #1.
  • An activity-list UI with columns and shortcuts taken from each activity definition.

Verification:

  • 267 tests pass.
  • A dry run on a live-DB copy, then the live migration itself: the maintainer's own session's placements (92, exact ranks), notes (91), flags (8) and deck notes (2) are identical; deploy-test was removed.
  • The pre-migration backup is in the volume and also copied off-host.

Review: High tier, first round 3/3 (codex/deepseek/qwen), plus two delta rounds. Archived-card UI leftovers are deferred to #5 (see the comment there).

Done in 7a4378c and deployed to career.tealmaker.com on 2026-10-13. **Decisions (maintainer):** - #2 before #1. - Single practice per install, on SQLite. - Keep the full-session snapshot for sync. - Soft-archive cards and columns (no revisions). - Delete deploy-test by its verified id. **What landed:** - A `user_version` migration runner with a VACUUM INTO backup and a frozen seed; it aborts on unmapped cards. - `activities`, `activity_columns`, `activity_cards` and `session_activities` tables. - Per-activity API routes (state is v2 via `?v=2`); legacy routes keep their old shapes until #1. - An activity-list UI with columns and shortcuts taken from each activity definition. **Verification:** - 267 tests pass. - A dry run on a live-DB copy, then the live migration itself: the maintainer's own session's placements (92, exact ranks), notes (91), flags (8) and deck notes (2) are identical; deploy-test was removed. - The pre-migration backup is in the volume and also copied off-host. **Review:** High tier, first round 3/3 (codex/deepseek/qwen), plus two delta rounds. Archived-card UI leftovers are deferred to #5 (see the comment there).
ben closed this issue 2026-10-13 20:08:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ben/career-values-cards#2
No description provided.