Add full Player Roster (CRUD) with AI integration and Dashboard UI#20
Open
DigitalBlueprint239 wants to merge 1 commit intomasterfrom
Open
Add full Player Roster (CRUD) with AI integration and Dashboard UI#20DigitalBlueprint239 wants to merge 1 commit intomasterfrom
DigitalBlueprint239 wants to merge 1 commit intomasterfrom
Conversation
Build complete player roster feature end-to-end:
- Football-specific types (22 positions, position groups, experience levels)
- Firestore subcollection at teams/{teamId}/players/{playerId} with real-time listener
- Roster UI with depth-chart layout grouped by Offense/Defense/Special Teams
- Add/edit/delete players with jersey number uniqueness validation
- Availability status with color-coded indicators (green/yellow/red/grey)
- Roster summary bar with live counts pinned at top
- AI connection: getRosterContextForAI() feeds roster state into practice plan prompts
- Practice Planner shows empty-roster prompt when no players exist
- Dashboard stat card shows real player count from Firestore
- Fix PracticePlanner to use correct generatePracticePlan method
Files created:
- src/types/roster.ts
- src/services/roster-service.ts
- src/contexts/RosterContext.tsx
- src/features/roster/ (5 components)
- MASTER_TRACKER.md
Files modified:
- src/App.tsx (add RosterProvider)
- src/components/Dashboard.tsx (add Roster tab + live stats)
- src/features/practice-planner/PracticePlanner.tsx (fix AI method + roster context)
- src/services/ai-service.ts (add roster block to prompt)
- src/types/firestore-schema.ts (add subcollection path + rosterSummary field)
https://claude.ai/code/session_011J8e3UovjUyiKd1u5f8DWE
❌ Deploy Preview for magical-starlight-0c1207 failed.
|
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.
Motivation
teams/{teamId}/playersfor per-team isolation and real-time sync.Description
src/types/roster.tsincludingFootballPosition,PositionGroup,RosterPlayer, andRosterSummaryused across the app.src/services/roster-service.tsusing theteams/{teamId}/playerssubcollection plus jersey-number uniqueness check.RosterContext(src/contexts/RosterContext.tsx) to provide real-time players, computedsummary, CRUD wrappers,isJerseyNumberTaken, andgetRosterContextForAI()which builds a natural-language roster summary for prompts.PlayerRoster,PlayerCard,PlayerDetail,AddPlayerForm, andRosterSummaryBarundersrc/features/roster/with depth-chart grouping and a FAB to add players.RosterProviderinApp.tsxand adding aRostertab, roster stat card, and quick-action shortcuts insrc/components/Dashboard.tsx.PracticePlannerto useuseRoster()and passteamContext.rosterSummaryinto AI calls, and switched toai.generatePracticePlan(...)to consume the new team context.buildPracticePlanPromptinsrc/services/ai-service.tsto inject the roster block when available.src/types/firestore-schema.tsto includeTeamContext.rosterSummaryand addedTEAM_PLAYERShelper; added project trackingMASTER_TRACKER.mddocumenting progress and known issues.Testing
tsc --noEmit, which completed successfully.Codex Task