Commit Graph

233 Commits

Author SHA1 Message Date
Julian Tabel
617f92a7ea Mark branding cleanup bean as completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:02:30 +01:00
Julian Tabel
1842aa947b Add pull-before-merge rule to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:58:52 +01:00
99b969ab5e Merge pull request 'Release frontend branding and metadata' (#3) from develop into main
Reviewed-on: TheFurya/nuzlocke-tracker#3
2026-02-10 12:55:18 +01:00
9ea03c598a Merge pull request 'Clean up frontend branding and metadata' (#2) from feature/branding-cleanup into develop
All checks were successful
CI / backend-lint (push) Successful in 7s
CI / frontend-lint (push) Successful in 28s
Reviewed-on: TheFurya/nuzlocke-tracker#2
2026-02-10 12:53:15 +01:00
Julian Tabel
03b5572429 Clean up frontend branding and metadata
All checks were successful
CI / backend-lint (pull_request) Successful in 7s
CI / frontend-lint (pull_request) Successful in 31s
Replace Vite defaults with Nuzlocke Tracker branding: custom pokeball-
skull favicon (SVG + PNG + ICO), page title, meta description, Open
Graph tags, theme-color, web manifest, and package.json name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:44:09 +01:00
Julian Tabel
66bd1a421f Update deployment docs, complete Deployment Strategy epic
Rewrite DEPLOYMENT.md to reflect current state (CI/CD, backups, merge
strategy). Expand CI paths-ignore to skip docs, license, gitignore,
and deploy workflow changes. Add merge strategy to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:38:34 +01:00
Julian Tabel
132dac0a2e Update deployment docs, complete Deployment Strategy epic
All checks were successful
CI / backend-lint (push) Successful in 7s
CI / frontend-lint (push) Successful in 29s
Rewrite DEPLOYMENT.md to reflect current state (CI/CD, backups, merge
strategy). Expand CI paths-ignore to skip docs, license, gitignore,
and deploy workflow changes. Add merge strategy to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:37:43 +01:00
87e4bb8941 Merge pull request 'develop' (#1) from develop into main
Reviewed-on: TheFurya/nuzlocke-tracker#1
2026-02-10 12:31:19 +01:00
Julian Tabel
7e8d55ec06 Skip CI on bean-only changes
All checks were successful
CI / backend-lint (push) Successful in 7s
CI / frontend-lint (push) Successful in 29s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:29:52 +01:00
Julian Tabel
29f0b930f8 Mark lint cleanup bean as completed
All checks were successful
CI / backend-lint (push) Successful in 7s
CI / frontend-lint (push) Successful in 28s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:28:45 +01:00
Julian Tabel
e4111c67bc Fix linting errors across backend and frontend
All checks were successful
CI / backend-lint (push) Successful in 7s
CI / frontend-lint (push) Successful in 29s
Backend: auto-fix and format all ruff issues, manually fix B904/B023/
SIM117/B007/E741/F841 errors, suppress B008 (FastAPI Depends) and F821
(SQLAlchemy forward refs) in config. Frontend: allow constant exports,
disable React compiler-specific rules (set-state-in-effect,
preserve-manual-memoization).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:26:57 +01:00
Julian Tabel
7f8890086f Add CI and deploy workflows for Gitea Actions
Some checks failed
CI / backend-lint (push) Failing after 1m43s
CI / frontend-lint (push) Failing after 1m6s
CI runs ruff and eslint/tsc on push to develop and PRs. Deploy
workflow is manual (workflow_dispatch) and builds, pushes, and
deploys images to Unraid via SSH.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:17:20 +01:00
Julian Tabel
0c4cc815be Remove cron job setup from deploy script
Backup scheduling will be handled via the Unraid User Scripts plugin
instead, which persists across reboots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 12:02:35 +01:00
Julian Tabel
58475d9cba Add database backup script with daily cron and 7-day retention
pg_dump-based backup script deployed alongside compose file. Deploy
script now installs a daily cron job (03:00) on Unraid automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 11:55:27 +01:00
Julian Tabel
7b383dd982 Set up branching structure and add branching rules to CLAUDE.md
Create develop branch from main and document the branching strategy
(main/develop/feature/*) in CLAUDE.md to enforce the workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 11:50:11 +01:00
Julian Tabel
bd267499b8 Add Gitea Actions CI/CD pipeline task to deployment epic
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:38:59 +01:00
Julian Tabel
3254103cf6 Add frontend branding and metadata cleanup task
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:36:37 +01:00
Julian Tabel
6f4ed3460b Add Unit & Integration Tests epic with subtasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:34:45 +01:00
Julian Tabel
fae6532b8a Add Game Data Cleanup epic with subtasks
Track the work needed to audit and complete encounter data and route
ordering across all supported games. Covers automated source exploration,
Gen 8+ stub population, ORAS/Let's Go completion, route ordering for
Gen 5+, Gen 1-4 ordering audit, and special encounters review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 10:00:14 +01:00
Julian Tabel
31355975e1 Update deployment beans to reflect SSH-based approach
Remove Portainer references, mark NPM and env management as
completed, update epic checklist and decided approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:45:58 +01:00
Julian Tabel
83a17c8f15 Build images for linux/amd64 to run on Unraid
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:43:18 +01:00
Julian Tabel
7ea6b30396 Rework deploy script to SSH directly into Unraid
Replace Portainer-based redeployment with direct SSH approach:
- Auto-detect podman/docker for local builds
- SCP compose file to Unraid
- Generate Postgres password in .env if missing
- Pull images and (re)start containers via SSH

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:32:41 +01:00
Julian Tabel
3f39b5f0cb Use bind mount for prod database storage instead of named volume
Store PostgreSQL data at ./data/postgres relative to the compose file
so persistent data lives on the Unraid disk at
/mnt/user/appdata/nuzlocke-tracker/data/postgres.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:17:14 +01:00
61a7f57f1f Update beans and deployment docs
Update epic checklist, mark completed tasks, fix Gitea username/domain
references, and update DEPLOYMENT.md with correct registry paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:28:56 +01:00
03f07ebee5 Add deploy script and update prod compose
Deploy script builds and pushes images to Gitea registry, then triggers
Portainer stack redeployment via API. Includes preflight checks for
branch and uncommitted changes. Also renames prod DB volume to avoid
conflicts with dev and changes frontend port to 9080.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:28:17 +01:00
972137acfb Fix TypeScript errors in frontend build
Cast boss type select value to union type and remove unused
AdvanceLegInput import.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:10:38 +01:00
fd23d89e71 Add production Dockerfiles and nginx config
Backend: installs non-editable, runs uvicorn without reload.
Frontend: multi-stage build, serves static files via nginx with
API proxy to the backend service and SPA fallback routing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 18:00:28 +01:00
d9d547ef53 Add production docker-compose file
Uses pre-built images from the Gitea container registry, runs Alembic
migrations before API startup, and keeps the database password configurable
via environment variable. No source mounts or debug mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:58:55 +01:00
349a0cb821 Add DEPLOYMENT.md as living deployment documentation
Covers architecture overview, Gitea container registry setup, branching
strategy, and deployment workflow. Sections not yet implemented are marked
with TODO to be filled in as the deployment epic progresses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:56:06 +01:00
ad4ac6cf8c Update deployment strategy to use Gitea instead of plain Docker registry
Gitea provides source hosting, container registry, and CI/CD in one package.
Images are pushed as user-level packages to the Gitea registry over SSL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:45:43 +01:00
Julian Tabel
6a86c56e3b Add deployment strategy child task beans
Split the deployment strategy epic into 11 individual task beans
with blocking dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:32:04 +01:00
Julian Tabel
e6646fc3e0 Add deployment strategy epic bean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:29:28 +01:00
Julian Tabel
f9f94e5e9c Add post-game completion rule option
Add postGameCompletion toggle to nuzlocke rules so players can indicate
whether a run ends after the Champion or continues into post-game. Adds
a new "Completion" category section in rules configuration with a green
badge color.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:24:06 +01:00
Julian Tabel
6d955439eb Fix team sort: add to RunEncounters and fix hook ordering
Add sort dropdown to RunEncounters (the encounters page with the
expandable team section) and move all useMemo hooks before early
returns in both RunDashboard and RunEncounters to fix React hook
ordering violations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:21:07 +01:00
Julian Tabel
bc9bcf4c4b Add sort options to run team overview
Add a dropdown to sort Active Team and Graveyard by route order,
catch level, species name, or national dex number.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:11:54 +01:00
Julian Tabel
c67621295a Mark genlocke tracking epic and edge cases bean as completed
All 14 success criteria met, all 10 child tasks completed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:08:18 +01:00
Julian Tabel
924efa9073 Show error feedback when run deletion is blocked
Add optional error prop to DeleteConfirmModal and wire it into AdminRuns
so the backend's rejection message is displayed to the user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:07:09 +01:00
Julian Tabel
f0307f0625 Guard genlocke data integrity edge cases
Block deletion of runs linked to a genlocke leg, prevent reactivating
completed/failed genlocke-linked runs, and guard encounter deletion
against genlocke transfer references with clear 400 errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:03:58 +01:00
Julian Tabel
d3b65e3c79 Add genlocke lineage tracking with aligned timeline view
Implement read-only lineage view that traces Pokemon across genlocke legs
via existing transfer records. Backend walks transfer chains to build
lineage entries; frontend renders them as cards with a column-aligned
timeline grid so leg dots line up vertically across all lineages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:58:38 +01:00
Julian Tabel
4e00e3cad8 Fix HoF display for transfers/shinies and hook ordering
Move alive and hofTeam into useMemo hooks above early returns to fix
React hook ordering violation. Include transfer and shiny encounters
in alive so they appear in the team section and can be selected for
the Hall of Fame.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:45:29 +01:00
Julian Tabel
c2e946f500 Restrict transfers to HoF team and prevent blocking starter route
Transfer modal now only appears when a Hall of Fame team is selected,
using the existing hofTeam data instead of the survivors endpoint.
Without a HoF selection, advance proceeds directly with no transfer step.

Transferred encounters are now a separate category: they appear in their
own "Transferred Pokemon" section, don't occupy route slots in the
encounter map, and don't block the route-lock check (excluded via
genlocke_transfers subquery). The run detail endpoint returns
transferEncounterIds so the frontend can distinguish them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:35:05 +01:00
Julian Tabel
e1dac10d27 Fix run deletion crash and transfer modal initialization error
Run deletion now properly cleans up boss_results, genlocke_transfers,
and genlocke_leg references before deleting the run. Also fix
showTransferModal being referenced before initialization in
RunEncounters by moving its useState declaration above useLegSurvivors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:28:22 +01:00
Julian Tabel
c5910ec75c Add genlocke transfer UI with transfer selection modal and backend support
When advancing to the next genlocke leg, users can now select surviving
Pokemon to transfer. Transferred Pokemon are bred down to their base
evolutionary form and appear as level-1 egg encounters in the next leg.
A GenlockeTransfer record links source and target encounters for lineage tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:20:49 +01:00
Julian Tabel
3bd4250305 Add genlocke cumulative graveyard with backend endpoint and UI
Aggregates all fainted encounters across every leg of a genlocke into a
unified graveyard view. Backend serves GET /genlockes/{id}/graveyard with
per-entry leg/game context and summary stats (total deaths, deaths per
leg, deadliest leg). Frontend adds a toggle button on the genlocke detail
page that reveals a filterable/sortable grid of grayscale Pokemon cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:00:37 +01:00
Julian Tabel
d39898a7a1 Add run deletion guard to genlocke edge cases bean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:52:21 +01:00
Julian Tabel
a81a17c485 Add genlocke admin panel with CRUD endpoints and UI
Backend: PATCH/DELETE genlocke, POST/DELETE legs with order
re-numbering. Frontend: admin list page with status filter,
detail page with inline editing, legs table, and stats display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:51:47 +01:00
Julian Tabel
08f6857451 Add genlocke list and detail pages
Add GET /genlockes and GET /genlockes/{id} endpoints with aggregate
encounter/death stats per leg, and a frontend list page at /genlockes
plus a detail page at /genlockes/:genlockeId showing progress timeline,
cumulative stats, configuration, retired families, and quick actions.
Update nav link to point to the list page instead of /genlockes/new.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:39:59 +01:00
Julian Tabel
c7c66c76d3 Mark HoF team selection and genlocke retirement integration as completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:27:29 +01:00
Julian Tabel
056bef9f75 Scope genlocke retireHoF to HoF team instead of all alive Pokemon
advance_leg() now checks current_run.hof_encounter_ids first and only
retires those Pokemon and their families. Falls back to all alive
non-shiny Pokemon when no HoF team is selected (backwards compatible).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:26:49 +01:00
Julian Tabel
58d36c4433 Fix hooks order violation in RunEncounters
Move hofTeam useMemo before early returns to comply with Rules of Hooks.
It was placed after the loading/error guards, causing a "rendered more
hooks than during the previous render" crash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:22:54 +01:00