---
# nuzlocke-tracker-66hg
title: Auto-select boss team variant based on starter choice
status: completed
type: feature
priority: normal
created_at: 2026-02-08T20:21:40Z
updated_at: 2026-02-08T20:34:35Z
---

When a run's starter Pokemon is known, automatically match it against boss battle condition labels (e.g., "Chose Bulbasaur") and pre-select the matching variant instead of showing the pill selector.

## Context

Currently, bosses with variant teams (condition_label) display a pill selector on the run page (BossDefeatModal and RunEncounters BossTeamPreview) so the user can manually toggle between team variants. However, if the run's starter choice is known, the correct variant can be inferred automatically.

## Behavior

- If the run has a starter Pokemon recorded, check each variant's condition label for a match (e.g., starter name "Bulbasaur" matches condition label "Chose Bulbasaur")
- If exactly one condition label matches, auto-select that variant and hide the pill selector entirely
- If no match is found (or the run has no starter), fall back to showing the pill selector as today
- Matching should be case-insensitive and check if the starter name appears anywhere in the condition label (substring match)

## Affected Components

- `BossDefeatModal` — auto-select variant, hide pills when matched
- `BossTeamPreview` in `RunEncounters` — same logic
- May need to check how/where the run's starter Pokemon is stored and accessible

## Checklist

- [x] Determine how the starter Pokemon is stored/accessible from the run data
- [x] Add matching logic to find the right variant from condition labels
- [x] Update BossDefeatModal to auto-select and hide pills when starter matches
- [x] Update BossTeamPreview in RunEncounters with same logic
- [ ] Test with variant bosses where starter matches a condition
- [ ] Test fallback behavior when no starter is set or no match found