Commit Graph

109 Commits

Author SHA1 Message Date
3de99859a1 Add bean for auto-selecting boss team variant based on starter choice
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 21:22:10 +01:00
a6bf8b4af2 Add conditional boss battle teams (variant teams by condition)
Wire up the existing condition_label column on boss_pokemon to support
variant teams throughout the UI. Boss battles can now have multiple team
configurations based on conditions (e.g., starter choice in Gen 1).

- Add condition_label to BossPokemonInput schema (frontend + backend bulk import)
- Rewrite BossTeamEditor with variant tabs (Default + named conditions)
- Add variant pill selector to BossDefeatModal team preview
- Add BossTeamPreview component to RunEncounters boss cards
- Fix MissingGreenlet error in set_boss_team via session.expunge_all()
- Fix PokemonSelector state bleed between tabs via composite React key
- Add Alembic migration for condition_label column

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 21:20:30 +01:00
8931424ef4 Update bean statuses and add wildcard Pokemon checklist item
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:34:07 +01:00
0931884f1e Add child route (sub-area) management to route detail page
Shows a sub-areas section below encounters with add/delete support
and links to navigate to child route details.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:32:17 +01:00
c6521dd206 Add filter controls to admin tables
Pokemon (type), Evolutions (trigger), Games (region/generation),
and Runs (status/game) now have dropdown filters alongside search.
Server-side filtering for paginated tables, client-side for small datasets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:29:55 +01:00
5d444f0c91 Add bean for gathering generation metadata
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:21:26 +01:00
c3bbd365a9 Replace free-text encounter method input with dropdown selector
Use the predefined METHOD_ORDER/METHOD_CONFIG from EncounterMethodBadge
to populate a select dropdown with all known encounter methods plus an
"Other" option for custom values. Shows a colored badge preview on
selection. Correctly handles editing encounters with non-standard methods.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:19:16 +01:00
fb3b003a6d Mark randomize encounters bean as completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:14:45 +01:00
8f6d72a9c4 Add bulk import for evolutions, routes, and bosses
Add three new bulk import endpoints that accept the same JSON format as
their corresponding export endpoints, enabling round-trip compatibility:

- POST /evolutions/bulk-import (upsert by from/to pokemon pair)
- POST /games/{id}/routes/bulk-import (reuses seed loader for hierarchy)
- POST /games/{id}/bosses/bulk-import (reuses seed loader with team data)

Generalize BulkImportModal to support all entity types with configurable
title, example, and result labels. Wire up Bulk Import buttons on
AdminEvolutions, and AdminGameDetail routes/bosses tabs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:14:19 +01:00
8e1c8b554f Use PokemonSelector autocomplete for route encounter form
Replace the manual search input + select dropdown with the existing
PokemonSelector component, matching the boss team editor UX.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:04:26 +01:00
3d515f0e4e Add prev/next and dropdown route navigation to route detail page
Reduces navigation depth when working with route encounters by adding
prev/next buttons and a route dropdown selector to AdminRouteDetail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 20:02:59 +01:00
b29b716fe5 Update Boss and Route data 2026-02-08 15:53:36 +01:00
758750b7b8 Add after_route_name to boss battle export/seed pipeline
Exports now include after_route_name (resolved from the route FK),
and the seed loader resolves it back to an ID on import. Also adds
a draft bean for displaying encounter-less locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:51:23 +01:00
47c8fa8e88 Update seed data with boss battles and route changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:40:07 +01:00
8483c4b109 Add specialty type column to admin bosses table
Shows the Pokemon type image badge in the boss battles table,
or an em-dash when no specialty is set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:38:10 +01:00
0e4fac8790 Add optional specialty type field to boss battles
Gym leaders, Elite Four, and champions can now have a Pokemon type
specialty (e.g. Rock, Water). Shown as a type image badge on boss
cards in the run view, and editable via dropdown in the admin form.
Includes migration, export, and seed pipeline support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:23:59 +01:00
1a7476f811 Add section field to boss battle export and seed pipeline
The section field was missing from the export endpoint, seed loader
(insert + upsert), and the seed export function.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 15:05:36 +01:00
1bf37a6bd9 Add drag-and-drop boss reordering and new feature beans
Adds boss battle reorder API endpoint with two-phase order update to
avoid unique constraint violations. Includes frontend mutation hook
and API client. Also adds draft beans for progression dividers and
conditional boss battle teams features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:58:49 +01:00
a4f814e66e Add section field to boss battles for run progression dividers
Adds a nullable `section` column to boss battles (e.g. "Main Story",
"Endgame") with dividers rendered in the run view between sections.
Admin UI gets a Section column in the table and a text input in the form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:55:26 +01:00
a01d01c565 Add Pokemon detail card with tabbed encounter/evolution views
Pokemon edit modal now shows three tabs (Details, Evolutions, Encounters)
instead of a single long form. Evolution chain entries are clickable to
open the EvolutionFormModal for direct editing. Encounter locations link
to admin route detail pages. Create mode shows only the form (no tabs).

Backend adds GET /pokemon/{id}/encounter-locations (grouped by game) and
GET /pokemon/{id}/evolution-chain (BFS family discovery). Extracts
formatEvolutionMethod to shared utility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 14:03:43 +01:00
f09b8213fd Add click-to-edit pattern across all admin tables
Replace Actions columns with clickable rows that open edit modals
directly. Delete is now an inline two-step confirm button in the
edit modal footer. Games modal links to routes/bosses detail,
route modal links to encounters, and boss modal has an Edit Team button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:44:38 +01:00
76d69dfaf1 Add admin UX improvement epic with 8 child feature beans
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:35:50 +01:00
bbac19677a Fix duplicate sub-areas caused by PokeAPI casing (e.g. 1f vs 1F)
PokeAPI returns both lowercase and uppercase floor names as separate
sub-areas with identical encounter data, causing 649 duplicate routes
across all 22 seed files. Merged case-insensitive duplicates, keeping
the uppercase name and deduplicating encounters. Re-seed required.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:22:50 +01:00
be6c8e75be Add genlocke tracking epic bean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:17:43 +01:00
46f246028f Add randomize encounters feature (per-route + bulk)
Per-route: Randomize/Re-roll button in EncounterModal picks a uniform
random pokemon from eligible (non-duped) encounters. Bulk: new
POST /runs/{run_id}/encounters/bulk-randomize endpoint fills all
remaining routes in order, respecting dupes clause cascading, pinwheel
zones, and route group locking. Frontend Randomize All button on the
run page triggers the bulk endpoint with a confirm dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:14:43 +01:00
6779e3effa Update bean status and add Rotom encounter to Pokemon X seed data
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 13:00:51 +01:00
c049d07917 Fix stretched type badges in StatusChangeModal
Add items-start to the flex-col container so badge images respect
their intrinsic width instead of stretching to fill the container.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:56:42 +01:00
069093ebae Add non-evolution form change support (Rotom, Oricorio, etc.)
Add a "Change Form" button in StatusChangeModal for Pokemon with
alternate forms sharing the same national_dex number. Mirrors the
existing evolution UI pattern, reusing currentPokemonId to track
the active form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:55:11 +01:00
2d4aa9d562 Re-export all seed data from database
Ran --export to refresh seed JSON files with current database state.
Includes updated games, pokemon, routes/encounters, evolutions, and
new firered-bosses.json boss battle data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:39:45 +01:00
0a2d42a6d0 Add --export flag to export all seed data from DB to JSON
Replaces --export-bosses with a unified --export that dumps games,
pokemon, evolutions, routes/encounters, and bosses to seeds/data/.
Each export function mirrors the corresponding API export endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:39:00 +01:00
053dece33e Add boss seed data pipeline for export and import
Add seeder support for boss battles so new database instances come
pre-populated. Adds --export-bosses CLI flag to dump boss data from the
database to JSON seed files, and loads those files during normal seeding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:36:08 +01:00
76855f4f56 Increase team/graveyard pokemon sprite size
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:18:37 +01:00
da9cf0acd2 Fix doubled encounters in encounter modals by filtering on gameId
EncounterModal and ShinyEncounterModal were calling useRoutePokemon
without a gameId, returning encounters for all games in the version
group. Now both receive and pass the run's gameId to scope results
to the current game only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:18:12 +01:00
3e88ba50fa Add version groups to share routes and boss battles across games
Routes and boss battles now belong to a version_group instead of
individual games, so paired versions (e.g. Red/Blue, Gold/Silver)
share the same route structure and boss battles. Route encounters
gain a game_id column to support game-specific encounter tables
within a shared route. Includes migration, updated seeds, API
changes, and frontend type updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:07:42 +01:00
979f57f184 Add collapsible boss teams and hide attempts in hardcore mode
Boss battle cards now collapse the pokemon team by default with a
chevron toggle. Expanded teams show larger sprites with "Lvl" prefix.
In hardcore mode, the BossDefeatModal hides the attempts field and
lost button since a loss ends the run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:03:11 +01:00
5d54c00af0 Add tabbed UI for routes/bosses and boss export endpoint
Refactors AdminGameDetail to use tabs instead of stacked sections,
adds GET /export/games/{game_id}/bosses endpoint, and adds Export
button to the Boss Battles tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:52:18 +01:00
190b08eb26 Add boss battles, level caps, and badge tracking
Introduces full boss battle system: data models (BossBattle, BossPokemon,
BossResult), API endpoints for CRUD and per-run defeat tracking, and frontend
UI including a sticky level cap bar with badge display on the run page,
interleaved boss battle cards in the encounter list, and an admin panel
section for managing boss battles and their pokemon teams.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:16:13 +01:00
3b87397432 Add run management screen to admin panel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 10:54:47 +01:00
5cdcd149b6 Add export buttons to all admin panel screens
Backend export endpoints return DB data in seed JSON format
(games, routes+encounters, pokemon, evolutions). Frontend
downloads the JSON via new Export buttons on each admin page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 10:50:14 +01:00
8fbf658a27 Hide Pinwheel Clause rule toggle for games without pinwheel zones
Fetches routes for the selected game during run creation and hides
the Pinwheel Clause option when no routes have pinwheel zone data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 10:40:18 +01:00
d50d189114 Update seed data from latest fetch-pokeapi run
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:09:53 +01:00
2efadae367 Add beans for admin exports, randomize encounters, pinwheel clause, and run management
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:09:24 +01:00
1d1a1f1927 Populate Legends: Z-A Wild Zone 1-20 encounter data
Sourced from Bulbapedia. 147 encounters across 20 zones, using walk
method with overworld spawn rates. Excludes fixed alphas and event-only
spawns. Pumpkaboo (Zone 15) omitted as it's not yet in pokemon.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:05:49 +01:00
7d4fdcd8ae Display bar chart labels inside bars with adaptive text color
Move game/type labels from a fixed-width column into the bar itself so
long names like "Pokemon Brilliant Diamond" aren't truncated. Compute
luminance from the bar's hex color to pick dark or light text, with a
subtle text shadow for readability at bar/track boundaries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 22:00:11 +01:00
1884a085f3 Add Pokemon Legends: Z-A to the game list
Add version group entry with region_id 0 (no PokeAPI region) and region
"lumiose". The Go fetch tool now skips route fetching for region_id 0 so
manually provided data won't be overwritten by re-runs. Includes
placeholder data file and box art.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:56:50 +01:00
3934167139 Add box art images for all games
Sourced from Bulbapedia. Covers Gen 1 through Gen 9 (37 games total).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:44:35 +01:00
6f231e522b Use object-contain for box art to prevent cropping
Wrap the box art img in a div with the game color as background and
switch from object-cover to object-contain. This shows the full box art
without cropping, especially important for the taller Switch-era cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:43:21 +01:00
8915f69215 Support both PNG and JPG box art images
Try .png first, then .jpg, falling back to the color swatch only if
neither format exists for a game slug.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:37:15 +01:00
7dbf3772df Improve run creation workflow with filters, local box art, and sticky nav
Use local /boxart/{slug}.png images instead of database boxArtUrl with
color-swatch fallback. Add region filter pills and run-status checkboxes
(hide active/completed) to GameGrid. Move the Next button into a sticky
top bar showing selected game summary so it's always visible. Capitalize
region names in all display locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:29:14 +01:00
4c0b45984f Add beans for boss battles and run creation workflow improvements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:21:12 +01:00