The port ships Linux first, then Windows. Each phase ends in a runnable, testable milestone. The guiding principle: MVP first, architected for full parity — get the core loop (track → hatch → evolve → graduate) working end-to-end, then widen.
- Scaffold Tauri 2 + Vite + TypeScript in this repo (
src/frontend,src-tauri/backend). - Wire the module layout from architecture.md §3 (
domain/,providers/,companion/,integration/,platform/). - Configure
tauri.conf.json(identifierdev.poketokenbar.app, tray, single window). - Set up CI (GitHub Actions):
cargo fmt --check,cargo clippy -- -D warnings,cargo test, frontendtsc+vite build, on Linux + Windows runners. - Lock in SvelteKit frontend framework.
Exit criteria: cargo test and npm run build green in CI on Linux and Windows.
-
platform/— XDG paths, shell env lookup (shellEnvironmentValues), process spawn. -
domain/— models, pricing, token formatting, companion state, save envelope + sanitization. -
providers/— Claude, Codex, Gemini readers + incremental cache (port + tests incl. fixtures). -
companion/usage_store— today/week/month aggregation, burn tier. -
companion/state machine — egg → hatch (PokéAPI, weighted by capture rate) → evolve → graduate; natures, shiny roll; Pokédex + catch log persistence. -
providers/pokeapi.rs+ sprite fetching (runtime fetch, disk cache, base64 data URLs). - Tray icon (static) → popover window; home view (companion card + today's tokens).
- Port the relevant Swift tests to Rust as the spec.
- Remaining providers: Antigravity (protobuf), OpenCode, Hermes, Cursor, Copilot, Kiro, Grok (all 10 active).
- Official 5-hour/weekly limits for Claude (OAuth via
~/.claude/.credentials.json). - Cost estimates (
ModelPricing) surfaced in backend + snapshots. - Combined & per-provider breakdown in Sources UI list.
- Shop (Mint, Rare Candy, Pokémon/Uncommon/Rare Egg, Shiny Charm) + Bag.
- Rare-Candy-on-limit rewards; shiny banner/notification.
- Floating pet: transparent, always-on-top, frameless, draggable window (
🐾toggle); progress ring, burn flame animations, offline sprite caching. - Notifications (hatch, evolve, shiny reveals) via
tauri-plugin-notification. - Settings surface (tray actions, autostart launch-at-login, language switch).
- Launch-at-login (
tauri-plugin-autostartfor XDG autostart on Linux / registry on Windows). - Offline sprite disk caching in
~/.local/share/poketokenbar/sprites. - Packaging: Linux AppImage +
.debbuild targets generated and verified.
-
platform/Windows paths (%LOCALAPPDATA%,USERPROFILE), platform-agnostic path joiners. - Cross-platform tray, notifications, autostart, window draggable regions.
- Packaging: Windows NSIS / MSI bundle targets configured in
tauri.conf.jsonand.github/workflows/ci.yml.
- Complete frontend overhaul matching the Claude Design specifications.
- Space Grotesk & JetBrains Mono typography with custom dark aesthetic palettes.
- Hero buddy card with stage pips, elemental type styling, and dual-tone gradient progress bars.
- Active AI Tools horizontal distribution bar with proportional per-provider breakdowns.
- PokéShop purchase shake animations (
pk-shake) on insufficient token balance. - Pokédex 2-column grid with animated Showdown GIFs and mystery discovery progression slots.
- Redesigned desktop pet with an SVG circular perimeter progress ring and unclipped glow.
- Decoupled heavy provider I/O scanning from global state locks (<0.01ms state lock, zero UI freezes).
- Added window minimize & hide backend commands and header pet toggle shortcut.
- Implemented
get_pokedex_detailsbackend endpoint fetching flavor text, genus, height, and weight. - Created offline disk caching for Pokédex entries under
pokedex/{id}.json. - Built interactive glassmorphic Pokédex Detail Modal dialog with animated sprite hero, flavor quote, and physical stats.
- Made Pokédex collection cards interactive with hover lift and view hints.
These are binding, carried over from the original's CLAUDE.md / defect-log.md:
- No literal
providerID == "..."branches on generic paths — provider-specific behavior is isolated to that provider's module. - A single source for path/env resolution — no provider reads a usage-location env var directly.
- External log formats are validated against the upstream writer, not self-made fixtures.
- Dedup keys use the turn's own globally-unique id; timestamps use the turn time, not the re-write time; subagent sessions are folded into parents.
- Defensive parsing at trust boundaries — external numeric values are clamped before arithmetic (the original hit SIGTRAP on hostile log values; we must not repeat it).