Files
nuzlocke-tracker/.beans/nuzlocke-tracker-532i--ux-remove-level-field-from-boss-defeat-modal.md

39 lines
1.4 KiB
Markdown
Raw Normal View History

2026-03-22 08:56:06 +01:00
---
# nuzlocke-tracker-532i
title: 'UX: Make level field optional in boss defeat modal'
status: completed
2026-03-22 08:56:06 +01:00
type: feature
priority: normal
created_at: 2026-03-21T21:50:48Z
updated_at: 2026-03-22T09:16:12Z
2026-03-22 08:56:06 +01:00
---
## 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