Skip to content

fix(plan-tuner): cleanup — DRY retry, formatValue, progressionRule - #62

Merged
silver-snoopy merged 1 commit into
masterfrom
feature/plan-tuner-cleanup
Apr 12, 2026
Merged

fix(plan-tuner): cleanup — DRY retry, formatValue, progressionRule#62
silver-snoopy merged 1 commit into
masterfrom
feature/plan-tuner-cleanup

Conversation

@silver-snoopy

Copy link
Copy Markdown
Owner

Summary

Post-merge cleanup for Workout Plan Fine Tuner v1 (PR #60). Addresses 4 items from the retro followUps list.

  • F1: Extract completeWithRetry to services/ai/retry-utils.ts — eliminates byte-for-byte duplication between report-generator.ts and tuner.ts
  • F2: Un-export mapPlanRow / mapVersionRow / mapAdjustmentRow — module-private helpers, only used internally by query functions
  • F3: Fix AdjustmentReviewModal.formatValue display bug — handles PlanSet[] arrays directly instead of falling through to JSON.stringify
  • F4: Infer progressionRule from exercise metadata SFR tier — S-tier compounds (bench/squat/deadlift/OHP) now get 'linear' (2-for-2 rule), others stay 'double'. Previously all parsed exercises got 'double', making the 2-for-2 rule dead code for imported plans.

Test plan

  • 411 backend tests pass (+1 new parser test for F4)
  • 74 frontend tests pass
  • Build clean across shared/backend/frontend
  • Lint clean (0 errors)

🤖 Generated with Claude Code

…rogressionRule

- Extract completeWithRetry to services/ai/retry-utils.ts (DRY refactor
  from report-generator.ts + tuner.ts)
- Un-export mapPlanRow/mapVersionRow/mapAdjustmentRow (module-private,
  only used internally by query functions)
- Fix AdjustmentReviewModal formatValue to handle PlanSet[] arrays
  directly instead of falling through to JSON.stringify
- Infer progressionRule from exercise metadata SFR tier (S-tier compounds
  get 'linear' for 2-for-2 rule, others get 'double')

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 12, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
vitals Ignored Ignored Apr 12, 2026 8:07am

@silver-snoopy
silver-snoopy merged commit e1ecb50 into master Apr 12, 2026
5 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