Skip to content

Add Wildcard and Free Hit chip planner#84

Merged
timjwsmith merged 9 commits intomainfrom
feature/wildcard-freehit-chips
Mar 3, 2026
Merged

Add Wildcard and Free Hit chip planner#84
timjwsmith merged 9 commits intomainfrom
feature/wildcard-freehit-chips

Conversation

@timjwsmith
Copy link
Copy Markdown
Collaborator

@timjwsmith timjwsmith commented Mar 3, 2026

Summary

  • Adds Wildcard and Free Hit buttons to the GW Plan widget — Claude generates an optimal 15-player squad rebuild when a chip is activated
  • New POST /api/gw-plan/chip-plan route calls Claude (extended thinking) to pick the best full squad within budget, respects FPL squad rules, and saves the plan with a chip_type column in gw_plans
  • Extended POST /api/gw-plan/submit to pass wildcard: true / freehit: true to the FPL transfers API when submitting a chip plan
  • UI: chip availability checked on mount via manager history, chip buttons shown only when chip is available, chip badge on plan display, submit label reflects chip type

Test Plan

  • Wildcard button appears only when wildcard not yet used in the current half-season
  • Free Hit button appears only when free hit not yet used this season
  • Clicking Wildcard/Free Hit generates a 15-transfer plan with all transfers pre-selected
  • Plan displays a WILDCARD PLAN / FREE HIT PLAN badge above the predicted score
  • Submit button label reads "Submit Wildcard (15 transfers) ▶" / "Submit Free Hit (15 transfers) ▶"
  • Confirming submit passes wildcard: true or freehit: true to the FPL API
  • Regular plan flow (generate, submit) unchanged

🤖 Generated with Claude Code

Tim Smith and others added 9 commits March 3, 2026 21:35
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… generation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extend fpl-auth/status to return managerId from session
- Add Wildcard and Free Hit buttons to GwPlanWidget that appear when
  connected, managerId present, and chip not yet used this season/half
- Fetch chip history from /api/fpl/entry/{id}/history on mount to
  determine wildcard/free hit availability
- Show WILDCARD PLAN / FREE HIT PLAN badge above predicted score
- Pass chipType to SubmitPlanModal; update confirm button label to
  'Submit Wildcard (N transfers)' or 'Submit Free Hit (N transfers)'
- Include chipType in the /api/gw-plan/submit request body when set

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…r handling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@timjwsmith timjwsmith merged commit 37b77a5 into main Mar 3, 2026
1 of 2 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