Skip to content

QA audit + safe bug fixes + $30 community tier spec - #32

Open
ethanwolk04-maker wants to merge 5 commits into
mainfrom
fix/qa-guaranteed
Open

QA audit + safe bug fixes + $30 community tier spec#32
ethanwolk04-maker wants to merge 5 commits into
mainfrom
fix/qa-guaranteed

Conversation

@ethanwolk04-maker

Copy link
Copy Markdown
Collaborator

Branch for review/comparison against main. Everything here is proposed and CI-gated — the TS/RN changes are hand-verified only (no local build/tests were possible); Python services pass py_compile. Please let CI + review validate before merge.

What's in it

docs/qa/ — full QA audit of the app (TestFlight coach + client walkthrough + code audit):

  • FITFO_BUGS.md — 68 findings with file:line
  • FITFO_BUGS_STATUS_ON_MAIN.md — re-validation vs shipped main (12 already fixed, 3 fixed-in-effect, 43 open)
  • FITFO_FLOWS.md, FITFO_SUBSYSTEMS.md — flows to redesign + how the engine works
  • FITFO_TIER_30_COMMUNITY_SPEC.md — buildable spec for a new $30 community tier (real backend-wired plan, not the client-side demo mock)

23 safe mechanical fixes (engine intentionally untouched — 2 working sets + goal→reps are product decisions):

  • Backend: coach-dashboard pagination scoping (at-risk / unread / weekly check-ins over full roster; real per-client unread count), corpus embed pagination + batch cap, citation pruning, weak-point note, day-name validation.
  • Mobile: coach card set count, intake split/goal display, empty-session guard + optimistic rollback, linked spread fix, redundant plan modal removal, leaderboard real counts, equipment prefill contradiction, recent-workout dedupe, A/B leg labels, nutrition load race, hub poll gating, check-in copy.

Not included (need a decision, not a blind edit)

Engine rep/volume (B02/B03), leaderboard coach-exclusion SQL migration (B21), adherence table wiring (B15), plan-state enum refactor (B11/B43), client dedupe/count definitions (B12/B13), rank off-by-one (B24), overdue check-in UX (B26/B27), billing/referral policy (B50/B51), canonical set-count (B04), prompt-injection/window (B40/B42).

Notes

  • Built from origin/main (the branch build 102 shipped from); the QA line numbers in FITFO_BUGS.md were from an older branch, so the status doc has the real main locations.
  • An out-of-scope agent edit to TourPage.tsx was caught and excluded.

🤖 Generated with Claude Code

ethanwolk04-maker and others added 2 commits July 23, 2026 21:31
…in-status comparison

Adds docs/qa: full coach+client QA audit of the app (68 bugs), flows to
redesign, a subsystem primer, and a re-validation of every bug against the
shipped main (12 already fixed, 3 fixed-in-effect, 43 still open).

Also fixes B23: the live workout player was hardcoding rest_sec=90 for every
coach-assigned exercise, discarding the coach's prescribed rest (strength mains
are prescribed 240-300s). coachingWorkoutToPlan now honors ex.rest_sec when
present, falling back to 90s only when none was set.

Engine intentionally untouched (goal->reps and 2-working-sets are product
decisions per Ethan).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Applies 23 low-risk, reviewable fixes from the QA audit (engine untouched).
Python services syntax-checked (py_compile); TS/RN hand-verified, pending CI.

Backend (apps/api):
- B18/B56/B58/B59 coaching_cohort: at-risk + unread aggregate + weekly check-ins
  no longer scoped to the first page; per-client unread is a real count not 1.
- B38 corpus_db: paginate the embedded-id fetch (was capped ~1000, re-embedding).
- B39 corpus_pipeline: batch embeddings <=2048 inputs (was one 3000-input call).
- B41 corpus_chat: prune citations to the [N] markers the answer actually cites.
- B33 coaching_template_adapter: drop the misleading weak-point note (2-set kept).
- B34 coaching_program_validator: add day-name readability validation.

Mobile (apps/mobile):
- B05 coach card renders real set count (numeric-string fallback), B35 shows
  current/keep split, B36 AboutTab reads primary_goal.
- B09 don't save a 0-set session; B31 roll back the optimistic record on failure;
  B55 fix coachingTabMe spread clobbering linked:true.
- B22 drop the redundant "building your plan" modal (keep inline); B45 scope the
  dismissed flag to the revision.
- B30 leaderboard uses real participant/user counts, not hardcoded 1,000/20,000.
- B07 full-gym prefill no longer also sets bodyweight_only; B10 dedupe coach
  recent-workouts across Program/App; B61 A/B labels for repeated leg days.
- B52 nutrition load sequence guard; B53 gate hub poll on app active;
  B28 reword Progress "check-in" copy to measurements.

Docs: docs/qa/FITFO_TIER_30_COMMUNITY_SPEC.md — real build spec for the $30
community tier (not a paste of the client-side demo mock).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fitfo-web Ready Ready Preview, Comment Jul 24, 2026 5:33am

Request Review

ethanwolk04-maker and others added 3 commits July 23, 2026 22:06
… checkpoint)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Restructure per expert panel: lead with promise, prove with the coaches
(on-record moved up), show the rhythm, show the app, VIP-first two-card
pricing, side-by-side, repeated closing CTA, FAQ. CTAs sell the next step
(Start my plan) with price underneath. Header/hero decluttered, IG moved
to footer. Zero em dashes. Features, prices, and the no-auto-renew promise
kept exactly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The /demo page was a preview: state lived in the browser tab, so nothing
survived a refresh, a new tab or a second device. Nobody could be a member
of it. This makes the tier real at /community, reusing what already exists
rather than inventing anything.

Real accounts. Sign up / sign in go through the existing account system
(POST /auth/email/signup, /auth/email/login) that the mobile app uses, so a
Community member is a normal FitFo account with the same 30 day JWT.

Real saved progress. A new ct_member_state table (migration 196) stores the
member's session blob, restored on sign in and mirrored back on every change
(debounced 1.5s, flushed on unmount).

The app itself is untouched. DemoApp still reads and writes its session
exactly as before; the /community wrapper seeds that session from the server
before mount and subscribes to writes, via two small additions to
demoSession.ts. /demo has no subscribers, so its behaviour is unchanged and
it remains a public, no login preview.

Naming: the tier owns the `ct_` prefix, kept separate from coaching_* so the
two tiers never collide.

Verified: py_compile clean (community_tier.py, main.py); apps/web tsc
--noEmit zero errors with all 7 new/changed files in the compiled file list;
apps/web production build succeeds and registers /community,
/api/community-tier/auth and /api/community-tier/state.

Not verified: the end to end signup flow was not run against production,
which needs live credentials and would create real accounts. The runbook at
docs/qa/FITFO_TIER_30_BACKEND_RUNBOOK.md is the smoke test, and applying
migration 196 is the only remaining step before this is live.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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