Files
nuzlocke-tracker/.beans/archive/nuzlocke-tracker-xd9j--add-team-snapshot-to-boss-battle-results.md
Julian Tabel a6cb309b8b
All checks were successful
CI / backend-tests (push) Successful in 28s
CI / frontend-tests (push) Successful in 28s
chore: archive 42 completed/scrapped beans
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 21:31:23 +01:00

35 lines
1.5 KiB
Markdown

---
# 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`