Commit Graph

52 Commits

Author SHA1 Message Date
059ba8f778 fix: remove service_healthy condition unsupported by podman 4.3.1
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 11s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:01:08 -05:00
4e6930c207 fix: reorder nav menu to place Dashboard after Home
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:57:43 -05:00
cea1b4e80e feat: add Caddy reverse proxy in front of app
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 11s
Caddy listens on port 80 and proxies to the app on 8000 internally.
App port is no longer exposed to the host directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:49:01 -05:00
bae0bc9dee feat: add missing import service and templates
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s
These files were untracked and missing from prior commits, causing
ModuleNotFoundError on fresh deploys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:46:37 -05:00
df8d5c65fb feat: enhance dashboard with PRs, adherence, activity, progression chart, and muscle heatmap
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 13s
Add 3 new stat cards (Last Workout, Personal Records, Adherence Rate),
recent activity table, progression timeline chart, and muscle group
recency heatmap to the dashboard. Remove Total Volume card.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:44:21 -05:00
c5a7728818 Merge origin/master: integrate auto-populate suggestions and set renumbering
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 36s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:43:14 -05:00
ebecfd0b58 feat: add CSV export of workout history to dashboard
Add date range picker and download button to the dashboard page,
backed by GET /dashboard/export endpoint that returns a StreamingResponse
CSV file. Completes Phase 4 (final V2 improvement).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:22:50 -05:00
0389aef56e Merge branch 'feature/rep-ladder-progression' 2026-03-13 13:57:04 -05:00
52e48f8ed4 feat: replace wk1/wk4 targets with 6→8→10→12 rep ladder progression
Simplifies the progression model to a universal rep ladder: every exercise
follows 6→8→10→12 reps at current weight, then +5 lbs and reset to 6.
Replaces per-user wk1/wk4 rep and weight targets with a single
starting_weight field.

- Add Alembic migration to drop wk1_reps/wk4_reps/wk1_weight/wk4_weight,
  add starting_weight (migrated from wk1_weight)
- Run Alembic migrations on app startup instead of create_all, with
  auto-detection and stamping for legacy databases
- Include alembic/ and alembic.ini in Docker image
- Rewrite progression_service.get_suggestion() with ladder logic:
  climb, hold, weight_increase, hold_at_top, deload
- Replace wk1/wk4 grid in exercise cards with rep ladder progress bar
- Add color-coded progression badges by type
- Change weight log input from text to number with pre-filled suggestion
- Normalize weight input in routes (0→BW, bare number→N lbs)
- Remove schedule page (route, template, nav link, tests)
- Simplify user_programs.yaml from 4 fields to 1 per exercise
- Update all tests for new schema and progression logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:57:02 -05:00
69b3357800 updating roadmap so phase 2 is complete 2026-03-13 13:07:37 -05:00
4b117c6fa7 feat: add smart "Workout Now" recommendation to workout picker
Auto-recommends the next workout in the 4-day cycle based on the
user's last completed session (one with logged sets). Redesigns
the /workouts page with highlighted recommendation card and
renames the back button to "Change Workout".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 13:05:39 -05:00
931e452205 docs: mark roadmap item 1 (remove auth) as complete
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:52:48 -05:00
5b26f36f5d fix: resolve stash conflict and update roadmap to v2
Resolved merge conflict in exercise_card.html (kept suggested
reps/weight pre-population logic) and updated roadmap.md with
the new v2 improvement plan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:50:34 -05:00
758034b25a Merge branch 'feature/remove-auth' into master 2026-03-13 12:40:58 -05:00
576d3bbb68 feat: replace admin auth with cookie-based profile picker
Remove all authentication (login, sessions, bcrypt, itsdangerous) since
the app runs on a private homelab LAN. Replace with a profile picker
landing page and cookie-based profile selection (1-year expiry).

- Add Alembic migration to drop password_hash/is_admin columns
- Delete auth service, auth routes, login template, and auth tests
- Rewrite app/utils/auth.py with NoProfileSelectedError and
  require_active_profile dependency
- Add profile creation flow (GET/POST /profiles/create)
- Rewrite home page as profile picker with card layout
- Update all route files to use profile dependency instead of admin auth
- Remove bcrypt and itsdangerous from requirements
- Remove admin_username/admin_password from config
- Update all tests for new profile-based access model

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 12:40:54 -05:00
91b3d24147 Merge pull request 'fix: renumber sets after delete and use last-logged values for prefill' (#2) from feature/auto-populate-suggestions into master
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 12s
Reviewed-on: #2
2026-02-24 21:56:32 +00:00
2208f0492b fix: renumber sets after delete and use last-logged values for prefill
Two bugs fixed:
- Deleting a set left gaps in set numbering (1, 3, 3). Now renumbers
  remaining sets sequentially after deletion.
- Logging set 1 caused the prefill to recalculate via the progression
  engine, shifting suggested reps mid-session. Now prefills from the
  last logged set's actual values; progression suggestion is only used
  for the first set of a session.
2026-02-24 15:55:27 -06:00
60acdbefdb Merge pull request 'feature/auto-populate-suggestions' (#1) from feature/auto-populate-suggestions into master
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 11s
Reviewed-on: #1
2026-02-24 21:49:05 +00:00
7b535bef6e fix(tests): align auth tests with NotAuthenticatedError and 302 redirect
The auth dependency raises NotAuthenticatedError (not HTTPException),
and the exception handler returns a 302 redirect. Updated the unit test
to expect NotAuthenticatedError, and all route auth tests to accept 302
alongside 401/303.
2026-02-24 15:47:36 -06:00
272563060c feat: auto-populate suggested reps and weight in log form
Pre-fill the reps and weight inputs with progression engine suggestions
so users can log sets without manually retyping values each time.
Suggestions flow through the template chain on initial page load and
on all HTMX partial responses (log, edit, delete).
2026-02-24 15:46:04 -06:00
3dc0171639 updating dockerfiles for deployment vs local dev
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 10s
2026-02-24 15:37:21 -06:00
312b14e57b updating dockerfiles for deployment vs local dev 2026-02-24 15:37:16 -06:00
d8b52cf907 fix(ci): use REGISTRY_TOKEN secret for container registry auth
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 23s
The automatic GITHUB_TOKEN lacks package write permissions. Switch to
a manually configured PAT stored as REGISTRY_TOKEN.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:47:09 -06:00
b18146e96c fix(ci): use act-latest container for Docker and Node.js support
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 7s
Replace manual Node.js install with catthehacker/ubuntu:act-latest
container which includes Node.js, Docker, and all build dependencies
needed for Gitea Actions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:42:30 -06:00
ee45513f30 fix(ci): install Node.js 20 for actions/checkout@v4 compatibility
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 9m38s
The default apt nodejs package is too old to support static class blocks
required by checkout@v4. Use NodeSource to install Node.js 20.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:32:39 -06:00
d90c9faf23 Merge branch 'feat/package-build-workflow'
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 35s
2026-02-24 14:31:28 -06:00
093f7aa55e ci: add Gitea Actions workflow for Docker build and registry push
Adds a CI pipeline that builds the Docker image and pushes it to the
Gitea container registry on every push to master. Includes .dockerignore
to keep the build context lean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:30:19 -06:00
77d1bc4a25 chore: add uv.lock for reproducible dependency resolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:20:39 -06:00
89d70fcae7 Merge branch 'docs/cleanup-implementation-files' 2026-02-24 14:19:54 -06:00
53e62f694f docs: replace implementation plans with architecture and API reference docs
Remove phase implementation plans, design notes, and source spreadsheet
that are no longer needed. Add architecture.md, API_REFERENCE.md, and
database_schema.md for ongoing development and debugging reference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:19:49 -06:00
fd979aa2da Merge branch 'fix/log-form-exercise-undefined' 2026-02-24 14:00:37 -06:00
215ce90404 fix: resolve template errors, orphaned sessions, and auth redirects
- Fix exercise_id undefined error in log_form.html by using scalar
  exercise_id instead of exercise.id object reference
- Clean up orphaned WorkoutSession records when all logs are deleted
- Filter empty sessions from dashboard stats (sessions, volume, streak)
- Replace broken HTTPException auth redirect with custom exception
  handler that properly returns 302 to /login

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:00:34 -06:00
134542b66f feat: add Phase 5 Progression & Analytics — smart suggestions, dashboard, schedule
Add auto-progression engine (ProgressionService) with rep increase, weight
increase, deload, and felt-easy acceleration rules. Add AnalyticsService for
user stats, exercise progress charts, and volume-by-day data. New dashboard
and schedule routes with Chart.js visualizations. Progression badges shown
inline on workout day view. Navigation updated with Dashboard and Schedule links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:26:23 -06:00
e35b78ae87 feat: add Phase 4 Logging & Tracking — inline set logging, history views
Add workout logging so users can track sets, reps, weight, and a
"felt easy?" toggle inline from the workout day view via HTMX.
Sessions auto-create on first log. History page shows past sessions
with detailed per-exercise breakdowns.

New services: WorkoutSessionService, LogService
New routes: POST /log, /log/{id}/edit, /log/{id}/delete, GET /history, /history/{id}
New templates: log_form, log_entry, session_card, log_history, session_detail
Modified: exercise_card (inline logging), nav (History link), workouts route (session context)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:12:23 -06:00
23754ea239 feat: add Phase 3 Workout UI — auth, profiles, workout viewer, exercise browser
Build the core user-facing experience with admin login (bcrypt + signed
session cookies), profile switcher, workout day viewer with warmups and
exercise cards, and HTMX-powered exercise browser with search/filter.

- AuthService with bcrypt password verification and itsdangerous session tokens
- Auth dependency redirects to /login (303) for unauthenticated requests
- NavContextMiddleware injects admin/profiles/active_profile into all templates
- Profile management (list, switch, edit) with cookie-based active profile
- Workout day viewer shows warmups + exercises + per-user programming targets
- Exercise browser with HTMX filter dropdowns (no page reloads)
- Flash message partial for success/error feedback
- 12 new tests (66 total passing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:14:52 -06:00
1f47103480 Merge branch 'feat/phase2-data-layer' 2026-02-24 10:15:10 -06:00
7c07bcee25 feat: wire database init and seeding into app startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:14:32 -06:00
6f9e923846 feat: add SeedService for YAML-based database seeding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:09:05 -06:00
42f6667b23 feat: add ExerciseService with filtering and warmup support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:07:33 -06:00
afb2cdf308 feat: add UserService with CRUD operations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:04:55 -06:00
e6ee17d1ff feat: add Alembic migrations with initial 8-table schema
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:52:31 -06:00
3bf1e13adc feat: define all 8 SQLModel tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:35:13 -06:00
45b93a2988 feat: add database engine and session management
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:32:26 -06:00
f9ff42c665 Merge branch 'feat/phase1-scaffold' 2026-02-24 09:16:03 -06:00
835ab197eb feat: add Dockerfile and docker-compose for containerized deployment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:15:01 -06:00
df7e86f2ed feat: add base template with Pico CSS dark theme and home page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:13:28 -06:00
b3b34222c8 feat: add FastAPI app factory and health check endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:12:31 -06:00
fb4b948681 feat: add structlog logging configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:05:14 -06:00
a211f9b6bd feat: add typed configuration loader with env support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:04:41 -06:00
2a9891ce69 feat: create project directory structure and env template
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:55:04 -06:00