Build Log · July 3, 2026

Rick's Today — the daily handoff card

Shipped a structured daily check-in card (food/medicine/water/mood) on Rick's portrait page, Council-reviewed for the medical-tracker boundary before building, so Jan stops being the only source of truth for what already happened today.

  • Known
  • Feature
  • Ethics
  • Crucible
new DB table (daily_checkins)
1

new DB table (daily_checkins)

new entryType (daily_checkin)
1

new entryType (daily_checkin)

Crucible council findings addressed pre-build
3

Crucible council findings addressed pre-build

post-build finding patched (silent save failure)
1

post-build finding patched (silent save failure)

Timeline

  1. Start

    Charge received — third leg of the caregiver triangle

    Zeb pasted a fully-shaped idea for a daily food/medicine/water/mood card, alongside Steady Me and Give Me 20 Minutes

  2. Early

    Crucible Council — architect + qe + steward

    Flagged AM/PM medicine slots as reading like a dose log, no verification step, and staleness risk

  3. Mid

    Codebase research before shaping

    Found the existing entryType + sidecar-detail pattern (behaviorLoopDetails) and the day-unique-index pattern (cardSnapshots) — both reused directly

  4. Build

    Schema, API route, component, page wiring

    One migration, one route, one component — no new subsystem

  5. Close

    Post-build Crucible audit + patch

    Fixed a silent-failure gap in the autosave error path before wrap

What shipped

  • dailyCheckins DB table — day-scoped (portraitId, checkinDate) unique index, six soft-signal fields (breakfast/lunch/dinner as not_yet|some|good, medicine as not_yet|done, water as low|some|good, mood as 5 states), free-text notes, updatedBy — schema.ts

  • New portraitEntries.entryType value 'daily_checkin' — same spine+sidecar shape as behavior_loop/behaviorLoopDetails, so the entry participates in soft-delete and the existing entries table without new columns on the shared table

  • /api/portraits/[id]/today — GET returns today's checkin (or null) scoped by localDateStr(); POST upserts, creating the entries spine row + detail row on first save of the day, updating the detail row in place on later saves same day. Org-scoped via requireOrgIdApi, same pattern as every other portrait route

  • RicksTodayCard.tsx — collapsed-by-default card matching GiveMe20Panel/TodayNoteQuickAdd convention, pill-button rows per field, 600ms debounced autosave, 'Saved HH:MM' / 'Couldn't save' status line

  • Wired above the existing freeform RecentNotesSection/TodayNoteQuickAdd on the portrait page — structured card for the four fields, freeform notes stay for anything else, per Zeb's placement decision

  • daily_checkin entries excluded from the printed portrait book (memories filter), same treatment as handoff_note and behavior_loop

“The win is not more tracking. The win is fewer moments where Jan has to stop and think, 'Wait... did we already do that?'”
— Zeb, framing the Charge before the Council review