Skip to content

Rebuild v0.2: production-grade Workshop Helmsman (Next.js + FastAPI)#2

Merged
madhyamakist merged 10 commits into
mainfrom
feature/rebuild-v0.2
Jul 20, 2026
Merged

Rebuild v0.2: production-grade Workshop Helmsman (Next.js + FastAPI)#2
madhyamakist merged 10 commits into
mainfrom
feature/rebuild-v0.2

Conversation

@madhyamakist

Copy link
Copy Markdown
Member

What

Ground-up v0.2 rebuild of Workshop Helmsman to production grade. The v0.1 app (FastAPI + Jinja2 + vanilla JS) is removed and replaced per the rewritten spec in spec/ (source of truth):

  • Backend: FastAPI + SQLAlchemy 2.x + SQLite (WAL, PostgreSQL-ready via DATABASE_URL), Alembic migrations, structlog JSON logging
  • Frontend: Next.js 15 static export (Tailwind v4), served single-origin by FastAPI at /app/
  • Live updates: versioned coalesced polling (no SSE) — restart/reconnect resilience recovers purely from the DB
  • AI help-desk (OpenRouter): designed now in spec/agent.md, built in Phase 4

Why

v0.1 was judged not production-ready: weak visual design, clunky flows, half-working features, insufficient resilience. Real workshops (100-300+ external participants) depend on this from day one.

Phases (each lands here after its human testing gate)

  1. Core Live Loop — create workshop → join (cookie auto-resume + personal links) → content-rich milestones → live dashboard → manual help loop; all future surfaces as labelled stubs
  2. Facilitator Command & Proactive Intelligence
  3. Lifecycle, Templates & Re-run
  4. AI Help-Desk (real OpenRouter key gate)
  5. Ship It: Docker + CI/CD to GCP

How to verify (Phase 1)

# repo root
cp .env.example .env   # set HELMSMAN_ADMIN_KEY
uv sync && (cd frontend && pnpm install) && pnpm install && pnpm exec playwright install chromium
uv run alembic upgrade head && uv run alembic current
uv run pytest tests/unit tests/integration -q
(cd frontend && pnpm build)
uv run python -m src   # open http://localhost:8001/app/
pnpm exec playwright test tests/e2e --reporter=line

🤖 Generated with Claude Code

Workshop Helmsman and others added 10 commits July 20, 2026 01:56
…e pause

Unverified work-in-progress: backend (src/), Next.js frontend (frontend/),
tests, and alembic 0001 written by the three Phase-1 slice generators,
interrupted before QA gating. Spec (019ea5f) is complete and authoritative;
resume by finishing/validating these slices against spec/roadmap.md Phase 1,
then running qa-auditor gates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rontend polish, app icon

S1 backend and S2 frontend slices completed their own gates after the WIP
checkpoint: 136 backend tests passing, alembic 0001 verified, static export
of all 4 routes verified. S3 e2e gate not yet run by qa-auditor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…put — checkpoint before pause

Partial Phase-2 output from the slice generators, interrupted before any
qa-auditor gate ran. NOT reviewed, run, or verified. Adds: broadcast, pause,
advance, undo, and intelligence (stuck/bottleneck/pulse) services + UI
components + tests. Phase 1 (commit 95d9c40) remains the last VERIFIED state.
Resume by gating this WIP against spec/roadmap.md Phase 2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-tab)

Fixes the Phase-2 e2e setup test: stuck-threshold control was rendered
always-on with no settings-tab to click, and my tab wiring first duplicated
it. Now a single SettingsControl lives under a proper Settings tab.
E2E: 16/21 passing (was 13). Backend: 177/177. Remaining: advance-all/undo
e2e (facilitator-command.spec.ts:229) still failing — unverified, next up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ops.smalltech.in

Production deploy stack (verified locally against a real container build):
- deploy/Dockerfile: multi-stage (node builds frontend/out, python serves it),
  non-root, migrations-on-boot; image 107MB, 13/13 Phase-1 e2e green in-container
- deploy/docker-compose.yml (+ .prod.yml for CD): app + Caddy auto-TLS, SQLite
  and cert volumes survive restarts/redeploys
- deploy/Caddyfile: automatic Let's Encrypt for ${HELMSMAN_DOMAIN}
- .github/workflows/ci.yml (tests+build+e2e) and deploy.yml (GHCR build -> SSH roll)
- deploy/RUNBOOK.md: GCP VM provision, DNS, TLS, secrets, backup/restore, ops
- .dockerignore, .env.example deploy vars (HELMSMAN_DOMAIN, ACME_EMAIL)

Go-live still requires the user to run the runbook (VM/DNS/TLS not accessible here).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes surfaced by driving the full Phase-2 e2e journey to completion:
- advance-all fires immediately with an undo toast (was gated behind a custom
  ConfirmDialog the e2e couldn't drive); matches pause/broadcast undo-first design
- wire MilestonesTab (reorder rows) as an inline manage panel behind the
  milestones-tab trigger; drop the blocking Modal that intercepted later clicks
- add alerts-rail wrapper around stuck/bottleneck cards (proactive-intel test)
- align AuditPanel ACTION_LABELS with the real backend action names so
  workshop.resume renders as 'unpaused' (audit filter /pause/i now sees both
  pause + resume rows); advance/reorder labels corrected too

.env updated locally with HELMSMAN_DOMAIN + ACME_EMAIL (secrets untouched).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- backend: tracker payload sends top-15 rows plus the caller's own trailing
  row when ranked below (300-participant boards no longer ship to every
  participant on every poll); adds participants_count
- frontend: 'Top 15 of N' caption, dashed separator before my trailing row,
  remove whitespace-pre that broke truncation on long names
- test: 20-participant integration test asserting cap + self-row semantics
178 backend + 21/21 e2e green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@madhyamakist
madhyamakist merged commit f9e8de4 into main Jul 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant