Files
nuzlocke-tracker/.beans/nuzlocke-tracker-532i--ux-remove-level-field-from-boss-defeat-modal.md
Julian Tabel 4d6e1dc5b2
All checks were successful
CI / backend-tests (pull_request) Successful in 29s
CI / frontend-tests (pull_request) Successful in 39s
feat: make level field optional in boss defeat modal
Remove the level input from the boss defeat modal since the app doesn't
track levels elsewhere. Team selection is now just checkboxes without
requiring level entry.

- Remove level input UI from BossDefeatModal.tsx
- Add alembic migration to make boss_result_team.level nullable
- Update model and schemas to make level optional (defaults to null)
- Conditionally render level in boss result display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 10:16:15 +01:00

39 lines
1.4 KiB
Markdown

---
# nuzlocke-tracker-532i
title: 'UX: Make level field optional in boss defeat modal'
status: completed
type: feature
priority: normal
created_at: 2026-03-21T21:50:48Z
updated_at: 2026-03-22T09:16:12Z
---
## Problem
When recording which team members beat a boss, users must manually enter a level for each pokemon. Since the app does not track levels anywhere else, this is unnecessary friction with no payoff.
## Current Implementation
- Level input in `BossDefeatModal.tsx:200-211`
- DB column `boss_result_team.level` is `SmallInteger NOT NULL` (in `models.py`)
- Level is required in the API schema
## Proposed Solution
Remove the level field entirely from the UI and make it optional in the backend:
- [x] Remove level input from `BossDefeatModal.tsx`
- [x] Make `level` column nullable in the database (alembic migration)
- [x] Update the API schema to make level optional (default to null)
- [x] Update any backend validation that requires level
- [x] Verify boss result display still works without level data
## Summary of Changes
- Removed level input field from BossDefeatModal.tsx, simplifying team selection to just checkboxes
- Created alembic migration to make boss_result_team.level column nullable
- Updated SQLAlchemy model and Pydantic schemas to make level optional (defaults to null)
- Updated RunEncounters.tsx to conditionally render level only when present
- Updated frontend TypeScript types for BossResultTeamMember and BossResultTeamMemberInput