Skip to content

refactor(workout): split log route into EventWorkoutView and StrengthWorkoutView - #115

Merged
rghamilton3 merged 3 commits into
mainfrom
refactor/split-log-workout-route
Apr 21, 2026
Merged

rghamilton3 merged 3 commits into
mainfrom
refactor/split-log-workout-route

Conversation

@rghamilton3

Copy link
Copy Markdown
Contributor

Summary

  • Extracted event workout rendering path (lines 509-567) into EventWorkoutView component (113 lines)
  • Extracted strength/cardio/ruck rendering path (lines 569-912) into StrengthWorkoutView component (489 lines)
  • Route file slimmed from 914 to 562 lines -- all state, hooks, handlers, and effects remain in the route orchestrator

Test plan

  • bun run build passes (TypeScript clean)
  • bun run test passes (2476 tests)
  • Manual smoke: start a strength workout, log a set, finish to summary
  • Manual smoke: start an event workout, finish to summary
  • No behavior changes -- pure extraction refactor

…WorkoutView

Extract two rendering paths from the 914-line log.$workoutId.tsx into
dedicated components. Route file slimmed from 914 to 562 lines; all
state, hooks, and handlers remain in the route orchestrator.

New files:
- src/components/workout/event-workout-view.tsx (113 lines)
- src/components/workout/strength-workout-view.tsx (489 lines)
@vercel

vercel Bot commented Apr 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ardent-forge Ready Ready Preview, Comment Apr 21, 2026 1:12am

FIX (Critical)
- P22-001: computeElapsed catch now calls setPageError on corrupt timer data
- P22-002: circuit onExerciseDone guard logs + setPageError instead of silent return

FIX (High)
- P22-003: workoutLog null guard returns surface div + error log instead of blank null
- P22-004: handleMarkDone/handleExpandDone guard empty activityId with log + setPageError
- P22-005: confirmSet prop adds exerciseName? 4th parameter to StrengthWorkoutViewProps

FIX (Medium)
- P22-006: circuit catch prefix [workout-log] -> [strength-workout-view]
- P22-007: CardioPanel/RuckPanel catch prefix [workout-page] -> [strength-workout-view]
- P22-008: handleDiscard awaits navigate with .catch error + setPageError
- P22-013: handleSummaryDone navigate chains .catch with log + setPageError

FIX (Low)
- P22-009: remove exerciseNames prop from StrengthWorkoutView; derive from exerciseMap
- P22-010: export UndoAction from active-workout-store; use in StrengthWorkoutViewProps
- P22-011: extract ProgramBannerProps named type with weekNumber: number required
- P22-012: export EventWorkoutLog type from event-workout-view

TASK: P22-014 added to Ideas backlog (move modal state into StrengthWorkoutView)
ADR: P22-015 -> ADR-022 (mutation orchestration boundary in StrengthWorkoutView)

Review: Context/Reviews/0022-pr115-split-log-workout-route-2026-04-20.md
@rghamilton3
rghamilton3 merged commit fa5ff1e into main Apr 21, 2026
4 checks passed
@rghamilton3
rghamilton3 deleted the refactor/split-log-workout-route branch April 21, 2026 01:15
rghamilton3 added a commit that referenced this pull request Apr 23, 2026
Fix no-explicit-any lint violations in event-workout-view and
strength-workout-view test files introduced by the #115 refactor.

This branch was successfully deployed

1 active deployment
Preview — 54ee7049 Deployed Apr 21, 2026 by vercel[bot]
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