28 Commits

Author SHA1 Message Date
93381ba5cb test(server): gate PostgreSQL tests behind postgres-tests feature
Move testcontainers to optional dependency and create feature flag for database integration tests. Tests without the feature use a dummy pool and skip database operations.
2026-01-07 00:00:29 -06:00
eedf22f86d refactor(just): reorganize Justfiles to match project architecture and format code 2025-12-30 04:24:41 -06:00
884f42a855 feat(server): make database and OAuth providers optional configuration
All external services (database, Discord/GitHub OAuth, S3) can now be individually disabled by omitting their environment variables. The server gracefully degrades functionality when services are unavailable. Partial configuration of any service group triggers a clear error at startup.

- Database: Falls back to dummy pool when DATABASE_URL is unset
- OAuth: Providers only registered when credentials are complete
- S3: Image storage disabled when credentials are missing
- Health checks reflect actual configuration state
2025-12-30 04:03:48 -06:00
de7c656b61 refactor(just): split monolithic Justfile into project-specific modules
Organize recipes into dedicated Justfiles for pacman, server, and web components. Root Justfile now serves as a thin facade with common aliases pointing to submodule recipes.
2025-12-30 02:16:18 -06:00
a636870661 refactor(web): migrate from Vike+React to SvelteKit
- Replace Vike+React with SvelteKit for simpler SSR and routing
- Update WASM build output paths from public/ to static/
- Add wasm-opt integration for WASM size optimization
- Streamline tooling: remove ESLint, Prettier configs (use defaults)
- Move build.rs to pacman-server/ (frontend no longer needs it)
2025-12-30 02:15:42 -06:00
16fba6aabc build(docker): consolidate WASM build into multi-stage Dockerfile
- Move WASM compilation from GitHub Actions into Docker build stages
- Add emsdkVersion to package.json config as single source of truth
- Implement cargo-chef for dependency caching in both WASM and server builds
- Update .dockerignore to include packed game assets while excluding unpacked
- Simplify deploy workflow by removing local WASM build steps
2025-12-29 16:43:37 -06:00
6a4abcec0d build(emsdk): update to latest version and fix unused import warning
Updates CI/CD emsdk from pinned 3.1.43 to latest (4.0.22), resolving a version
mismatch between local dev (which used latest) and production builds. This
discrepancy likely caused production-only ErrnoError bugs that were impossible
to reproduce locally.
2025-12-29 15:23:00 -06:00
21078b7ada fix(emscripten): avoid Module.arguments access with ASSERTIONS enabled
Skip env::args() on Emscripten builds to prevent accessing Module.arguments
after runtime initialization, which causes abort with ASSERTIONS=1.
2025-12-29 14:50:40 -06:00
8d3d69da9d feat(web): add cache busting with version-based asset loading
- Inject git hash via Vite plugin for cache-busting WASM/JS assets
- Enable Emscripten assertions for better runtime error messages
- Log Emscripten runtime init for debugging filesystem readiness
- Expand dockerignore to exclude web build artifacts
2025-12-29 14:27:52 -06:00
3bb3908853 feat(web): add smooth page transitions and WASM loading states
- Implement navigation state tracking with optimistic UI updates
- Add loading spinner and error handling for WASM initialization
- Insert browser yield points during game initialization to prevent freezing
- Redesign leaderboard with tabbed navigation and mock data structure
- Add utility CSS classes for consistent page layouts
2025-12-29 03:33:43 -06:00
ca36d01891 test(input): update pause key binding test to use Escape 2025-12-29 02:56:50 -06:00
5e86bbb040 feat(web): implement game lifecycle management for SPA navigation
Add stop_game and restart_game FFI functions to properly pause/resume the game loop during page transitions, preventing resource leaks and audio issues when navigating between pages
2025-12-29 02:06:15 -06:00
791a0e48e3 fix(lint): resolve clippy warnings and add cross-platform lint recipe
- Add `just lint` recipe for desktop + wasm clippy checks
- Fix clippy warnings: redundant field names, formatting, dead code
- Gate Emscripten-specific audio methods behind target_os cfg
2025-12-29 01:15:03 -06:00
6db061cc41 perf(game): adjust frame time warning threshold to be platform-adaptive
Use dt-based dynamic threshold instead of hardcoded 17ms to account for different platform frame timings (desktop ~16.67ms vs WebAssembly's variable requestAnimationFrame)
2025-12-29 01:05:28 -06:00
949899b035 feat(game): implement pause system with Escape key and visual overlay 2025-12-29 01:03:06 -06:00
d320f2b01b feat(web): auto-install emsdk and set default caddy port
- Clone and install emsdk automatically if not present
- Configure caddy to listen on port 8547 by default
2025-12-29 00:43:34 -06:00
fc349c45c5 fix(web): implement browser autoplay policy compliance with click-to-start
Add WaitingForInteraction game stage and Suspended audio state for Emscripten builds.
Audio unlocks and game starts after user clicks or presses any key, satisfying browser
autoplay restrictions while maintaining immediate playback on desktop.
2025-12-29 00:41:31 -06:00
Ryan Walters
50c0033f2f fix(game): track cursor and touch state in dirty flag for immediate visual feedback
Extends dirty_render_system to detect changes in CursorPosition and TouchState resources. This ensures re-renders trigger immediately when clicking to activate drag functionality, when cursor debug visualization updates, and when cursor fade-out occurs after timeout.
2025-11-23 00:44:38 -06:00
Ryan Walters
c306e992c4 fix(game): resolve race condition in render dirty flag using bitwise OR
The render dirty flag was being reset instead of accumulated, causing
the game to become stuck and unplayable in web builds. Changed from
assignment to bitwise OR to preserve all dirty state updates.

Also adds game layout component and updates Justfile to build frontend.
2025-11-22 21:14:24 -06:00
Ryan Walters
fb98c077b5 refactor(web): migrate frontend to Tailwind CSS and Vike SSR
- Replace Mantine UI components with Tailwind CSS v4
- Migrate from static HTML to Vike-based SSR framework
- Disable SSR for game page (Emscripten requires browser environment)
- Simplify Emscripten loading to avoid hydration conflicts
- Remove Tailwind download logic from web.build.ts
- Add package manager lockfiles for reproducible builds
- Update .gitignore for node_modules and build artifacts
2025-11-02 13:39:51 -06:00
Ryan Walters
07e0709c50 test: A/B test cargo-vcpkg vs manual vcpkg with 2025.10.17
Adds cargo-vcpkg step alongside manual vcpkg for macOS to determine if
the fix is due to using manual vcpkg or simply upgrading to vcpkg
2025.10.17. Both methods will run to compare behavior.

- Updated vcpkg baseline from 2024.11.16 to 2025.10.17
- Restored macOS triplets in Cargo.toml
- Added duplicate cargo-vcpkg step for macOS builds
2025-11-02 11:52:39 -06:00
Ryan Walters
aeb03aaf52 fix: use manual vcpkg installation for macOS builds
Replaces cargo-vcpkg with direct vcpkg installation for macOS to fix
libogg build failures. Uses vcpkg 2025.10.17 with proper SDL2 package
installation and VCPKG_ROOT environment variable for rust-sdl2
integration. Windows and Linux continue using cargo-vcpkg.
2025-11-02 11:34:55 -06:00
Ryan Walters
54ef292606 chore: update vcpkg baseline to 2024.11.16
Updates vcpkg from 2024.05.24 to stable 2024.11.16 release to fix
platform-specific build failures. Avoids 2025.x versions which have
breaking vcpkgTools.xml changes incompatible with cargo-vcpkg.
2025-11-02 10:34:54 -06:00
Ryan Walters
d9519746b8 fix: proper asset path for emscripten 2025-09-29 15:29:52 -05:00
Ryan Walters
408b660490 fix: drop unused fast_image_resize, drop toolchain back to 1.86, limit emscripten build to pacman project properly 2025-09-18 23:16:55 -05:00
Ryan Walters
7ede82cc5d feat: add pacman-common/pacman-server crates 2025-09-16 09:36:12 -05:00
Ryan Walters
d0ee7db2ef fix: update workspace Cargo.toml, README.md workspace distinctions 2025-09-16 09:19:23 -05:00
Ryan Walters
a3c4c94d42 refactor: create workspace, move 'pacman' into pacman/ subfolder as workspace member 2025-09-16 01:07:16 -05:00