Follow-up / To-Do List (needs_followup flag)

Built: 2026-07-21 · portal fb25401 · api 603d218 · migration 025 (applied)

Owner/admin follow-up tracking for projects waiting on something external (photos, drive logs, confirmations). Requested by Dustin for himself + Jacob.

How it works

  • Flag: projects.needs_followup (boolean, default false, partial index WHERE needs_followup = true). Slug sneeds_followup in raw_data, denormalized via config.SUPABASE_FIELD_MAP.
  • Checkbox: “Follow up / Add to to-do list” — last item of the ProjectDetail header section, below the review checklist. Renders for up_owner/up_admin only. Same component serves the pop-out context panel and the full project page, so both stay in sync.
  • To Do’s page: Daily Work > To Do’s (/todos), owner+admin nav/route only. Rows: branch stripe, address, status, project ID, trailing checkbox that clears the same flag (row drops off). Live-refreshes via the onProjectUpdate context-panel callback when the panel checkbox toggles.

Endpoints (routes/portal_projects.py)

  • GET /portal/projects/followups — flagged projects, lightweight dict, sorted by address. 403 for non-owner/admin.
  • PATCH /portal/projects/{record_id}/followup{needs_followup: bool}, writes through supabase_write_service. 403 for non-owner/admin.
  • needs_followup also surfaced in _format_project (all project payloads).

Notes

  • Gate is role-based ({up_owner, up_admin}), matching every other owner/admin gate. In portal_users.db Jacob is up_owner (not up_admin), so the pair covers exactly Dustin + Jacob (+ the TEST admin1 account).
  • Verified end-to-end 2026-07-21 with a minted test JWT: toggle on/off on MAN-9127, list add/remove, detail payload, raw_data slug + column both written, 403s for triage role. Flag restored to false after test.

Related: ProjectDetail Sidebar supabase_write_service