--- # nuzlocke-tracker-xd9j title: Add team snapshot to boss battle results status: completed type: feature priority: low tags: - failed created_at: 2026-03-20T15:11:53Z updated_at: 2026-03-20T19:41:44Z parent: nuzlocke-tracker-neqv --- When recording a boss battle result, allow the player to snapshot which alive team pokemon they used and at what levels. This gives a record of "what I brought to the fight." ## Checklist - [x] **Migration**: Create \`boss_result_team\` table (\`id\`, \`boss_result_id\` FK, \`encounter_id\` FK, \`level\`) - [x] **Model**: Create \`BossResultTeam\` model, add relationship to \`BossResult\` - [x] **Schemas**: Add \`BossResultTeamInput\` and update \`BossResultCreate\`/\`BossResultResponse\` - [x] **API**: Update \`POST /runs/{run_id}/boss-results\` to accept and save team snapshot - [x] **BossDefeatModal**: Add checkboxes for alive team members with optional level override - [x] **Display**: Show team snapshot when viewing past boss results in \`RunEncounters.tsx\` ## Summary of Changes Implemented team snapshot feature for boss battle results: - Created `boss_result_team` table (`id`, `boss_result_id` FK, `encounter_id` FK, `level`) - Added `BossResultTeam` model with relationship to `BossResult` - Updated schemas with `BossResultTeamMemberInput` and `BossResultTeamMemberResponse` - Updated `POST /runs/{run_id}/boss-results` to validate and save team snapshot - Added team selection UI in `BossDefeatModal` with level override - Display team snapshot in defeated boss cards on `RunEncounters.tsx`