feat(plan): optimize plan from Plan screen + modify proposed values - #65
Merged
Conversation
) Add sparkles icon button to active PlanVersionCard that triggers the existing workout plan tuner using the latest available report. Users can now optimize their plan without navigating to the Reports page. Also add "modify" capability to AdjustmentReviewModal — pencil icon per accepted adjustment opens inline SetEditor for editing sets, reps, weight, and RPE before committing. Backend validates overrideValue as a valid PlanSet[] via isValidPlanSetArray(). - AdjustmentDecision type wraps old string decision with optional overrideValue - PATCH handler maps decisions to status-only for DB, uses override when present - Deep clone in handleStartEdit prevents shared reference mutation bug - Prettier formatting applied to 5 backend service files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Live E2E verification uncovered that @fastify/cors default methods (GET,HEAD,PUT,POST,DELETE) omit PATCH — the adjustment commit endpoint was unreachable from the browser. Also adds data-testid attributes to optimize button, review modal, commit button, edit and modified badges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isValidPlanSetArray()'accepted' | 'rejected'string with{ status, overrideValue? }object — backward-compatible at API layerFiles changed (13)
workout-plan.tsAdjustmentDecisiontypeworkout-plans.tsisValidPlanSetArrayPlanVersionCard.tsx,PlanPage.tsx,AdjustmentReviewModal.tsxworkout-plans.test.ts,AdjustmentReviewModal.test.tsxproduct-capabilities.mdTest plan
npm run build -w @vitals/shared— cleannpx tsc --noEmit— backend + frontend clean🤖 Generated with Claude Code