Recipes

Phase 5–6 dashboard workflow with governed migration preflight and evidence record

Discovered from README cross-links · today

Software & DevOpsWork & Operations

Bounded job dashboard plus fail-closed migration preflight and one

What they did

On the field-work-hub repo, the author implemented approved Phases 5 and 6 together in dependency order on the draft branch feat/phase-5-6-dashboard-workflow. The dashboard was reworked from rendering every work order as a long card into a bounded table loading 25/50 jobs, with address/WO search, field-status filters, stable ordering and an exact count feeding one responsive job dialog that reuses the existing details, assignment/handoff and photo-requirement forms. Selection stays tied to the WO UUID, and Save/Stay/Discard guards close, Escape and job switching; automatic refresh preserves edits, delayed responses cannot restore signed-out work, and a confirmed save followed by a failed refresh cannot trigger a repeat mutation. Only non-sensitive page/sort/status preferences persist per account/org. Installed legacy work APIs and operational reads were moved onto current-session/team guards while keeping the established action and photo engines. Explicit team scopes, current-account/session capabilities, gated Supervisor tiers and a separate Product Owner entitlement authority were added, with existing WOs gaining a constrained responsible-team binding. A private service/operator-only bootstrap checks exact reviewed UUID inventories, records an immutable action manifest and atomically seeds initial memberships and owner binding, with same-action retries returning the historical result without restoring revoked access. Separately, the existing ci/phase5d_team_migration_preflight.sh was reconciled to require the exact clean draft PR #40 branch/head, the correct Team TEST project, 108 source migrations, the canonical dispatch filename, and a supabase db push --dry-run --linked showing zero pending versions and a positive up-to-date statement, failing closed on anything ambiguous, with no apply, repair, provider Send or worker action. An isolated fake-CLI regression (no real network) covered deceptive dry-run, wrong-project, stale-checkout and missing-migration denials. A first harness attempt failed on a malformed shell assertion and escaped newline and was fixed narrowly. All status was consolidated into one authoritative evidence record, docs/PHASE_5_6_IMPLEMENTATION_RECORD_2026-10-06.md, with a current-evidence checklist at the top.

How it went

Exact-head CI went green across Admin Dashboard, FWH Database, Android Team Client and Governance at multiple commits, including after the documentation-only reconciliation. The fake-CLI preflight regression passed all denial cases. Live Team TEST state was verified read-only: 108 canonical migrations installed, 0 held permits, 0 active client destinations, 0 ready workers, 0 outbox rows, 0 final delivery receipts, no cron catalog, hosted client-delivery v11 read-only. A signed-in private-JPEG browser check returned PARTIAL: 404,185 exact bytes across two HTTP 206 responses with a matching SHA-256 receipt and anonymous Edge signer denied, while browser-visible Content-Range and a proven RLS denial on anonymous Storage GET remained unverified. The PR stayed DRAFT.

Worth knowing

The revised operator CLI preflight script has not been physically run against the live project; that is only needed at a genuinely new rollout gate. Level-3 premerge approval and the real protected Send/Google/Android delivery gate remain pending, and hosted delivery stays read-only and off. The dashboard work is a partial 6A layout/read foundation, not the completed workspace authority, server draft, company/address grouping, photo review or release workflow, and no Supervisor or work-disablement UI is activated. The private-photo browser helper does not prove wrong-user, foreign-org or original-owner denial, and the live CDN page/button visibility was not independently established by source inspection. Personal identities are not seeded in source; the bootstrap depends on operator-confirmed UUID inventories.

Wiring

Work proceeds on the draft branch feat/phase-5-6-dashboard-workflow with rollback point 62244e2c4c11831d4e8104821f851f19124b2616 and rule packs AGENTS, GOVERNANCE, PROJECT_PROFILE, RULE_INDEX, CHANGE_CONTROL, TESTING, INTEGRATION and PHASE_STAGING. The dashboard front end reads bounded job pages through guarded legacy work APIs that resolve current session and team scope, then hands the selected WO UUID to the existing details, assignment/handoff and photo-requirement forms; preferences persist per account/org. Team scopes, capabilities, Supervisor tiers and Product Owner entitlement are seeded by a private operator-only bootstrap that validates reviewed UUID inventories, writes an immutable action manifest and seeds memberships atomically. The preflight script ci/phase5d_team_migration_preflight.sh runs against the linked Team TEST Supabase project using supabase db push --dry-run --linked, comparing the migration directory count and dispatch filename against the expected 108 and failing closed on mismatch, and is exercised by a fake-CLI harness that stubs the CLI with no network. CI jobs for Admin Dashboard, FWH Database, Android Team Client and Governance run at exact head, and all status is written into the single implementation record doc.

Try it yourself

Read docs/PHASE_5_6_IMPLEMENTATION_RECORD_2026-10-06.md top checklist first and treat it as the single authoritative status. Then, on branch feat/phase-5-6-dashboard-workflow, reconcile ci/phase5d_team_migration_preflight.sh so it requires the exact clean draft PR head, the correct Team TEST project ref, 108 source migrations, the canonical dispatch filename, and a supabase db push --dry-run --linked output with zero pending versions plus a positive up-to-date statement. Fail closed on any unknown pending migration, CLI error or ambiguous response, and include no apply, repair, provider Send or worker action. Add an isolated fake-CLI regression with no real network covering deceptive dry-run, wrong-project, stale-checkout and missing-migration denials. Keep the bounded dashboard table (25/50 rows, search, status filters, UUID-bound selection, Save/Stay/Discard) and the current-session/team guards on legacy work APIs unchanged. Do not rebuild the 108 installed migrations or the connected source executors, do not activate the hosted worker, and do not merge the PR. Append results to the existing evidence record rather than creating a second checklist, and report exact-head CI run IDs for Admin Dashboard, Database, Android and Governance.

Source

Tools in this stack