Combat skill buttons now:
- Check both hardcoded SKILLS and database SKILLS_DB
- Display class-specific skill names (e.g., "Brand New Hokas")
- Use fallback icon for database-only skills
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously auto-center was turned off after the first GPS fix.
Now it stays on, keeping the map centered on the player's position.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added new base skills:
- quick_strike: Fast attack with 98% accuracy
- focus: Accuracy buff for 3 turns
- second_wind: MP restore skill
- heavy_blow: High damage (250%), low accuracy (60%)
- quick_heal: Efficient small heal
- triple_strike: 3-hit combo attack
- full_restore: Full HP restore at high MP cost
Trail Runner skill tree (2 choices per level):
- Lv1: Trail Kick (auto)
- Lv2: Brand New Hokas OR Gel Pack
- Lv3: Downhill Sprint OR Pace Yourself
- Lv4: Trail Blaze OR Quick Feet
- Lv5: Second Wind OR Trail Mix
- Lv6: Finish Line Sprint OR Zone In
- Lv7: Ultra Marathon OR The Bonk
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed hardcoded PLAYER_CLASSES and SKILL_POOLS constants
- Added loadClasses() function to fetch classes from /api/classes
- Dynamically builds PLAYER_CLASSES from database with skills
- Dynamically builds SKILL_POOLS from class_skills with choice_groups
- Updated showSkillChoice() to use class-specific skill names
- Updated selectSkill() to display class-specific skill names
- Added safety fallbacks for level-up stat gains
- Classes loaded on app initialization alongside skills/monsters
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GPS Test Mode (WASD movement) now automatically enables when an admin
user logs in, improving the development/testing experience.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Modified executePlayerSkill() to loop through all living monsters when
skill.target === 'all_enemies'
- Each target gets individual hit chance roll
- Added Whirlwind skill (75% ATK to all enemies, 12 MP) to database seeds
- Added whirlwind to Trail Runner class skills for testing
- Fixed skill seeding to check for existence before inserting
- Added try-catch for class skill names to prevent duplicate errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add classes table (base stats, stat growth per level)
- Add class_skills table (skill assignments with unlock levels, choice groups)
- Seed 4 classes: Trail Runner (enabled), Gym Bro, Yoga Master, CrossFit Crusader
- Seed Trail Runner skills with level-up choices at levels 2 and 3
- Add API endpoints for class and class skill CRUD
- Add Classes section to admin panel with full editor UI
- Skills grouped by unlock level with choice group indicators
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix death system: add clearMonsterEntourage(), set HP to 0 on death
- Add movement-based monster spawning (configurable distance)
- Add admin-editable spawn settings (interval, chance, distance)
- Add home base HP/MP regeneration when player is nearby
- Update character sheet to show damage range, accuracy, MP cost
- Change WASD test step from 11m to 1m
- Fix monster spawning after respawn
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add visual status/buff overlays on combat sprites (100x100px full overlay)
- Monster skills can now have custom names per monster
- Skills admin page for full skill CRUD
- Fix monster buff skills (defend) to properly buff instead of damage
- Fix custom skill names appearing in combat log
- Auto-copy default images when creating new monsters
- Add monster toggle endpoint fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clone copies all monster data with modified key/name
- Auto-generates unique key suffix (_copy, _copy1, etc.)
- Cloned monster is disabled by default for review
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add admin.html with monster/user/settings management UI
- Add admin API endpoints with adminOnly middleware
- Add game_settings table for configurable settings
- Replace emoji monster icons with PNG images (50px map, 100px battle)
- Add mapgameimgs/ directory with default fallback images
- Fix mobile geocache tap by checking for markers before preventDefault
- Increase geocache marker touch target to 64x64px
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Skill Selection System:
- Added 3 new alternative skills (quick_step, second_wind, finish_line_sprint)
- Created SKILL_POOLS for level 2, 3, 5 skill choices
- Added skill choice modal on level up
- Players now choose 1 of 2 skills at milestone levels
- Combat UI shows only unlocked skills
- Character sheet displays learned skills
Monster Database Migration:
- Renamed "Discarded GU" to "Moop" (Matter Out Of Place)
- Created monster_types table for storing monster definitions
- Added CRUD methods for monster types
- Added /api/monster-types endpoint
- Frontend now loads monster types from API
- Auto-seeds Moop monster on first run
- Ready for admin UI and multiple monster types
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Phase 3: Character sheet modal (click class name in HUD)
- Display all stats (HP, MP, ATK, DEF)
- Show XP progress bar with level milestones
- Show unlocked/locked skills based on level
- Fix mobile double-tap inconsistency (50/50 bug)
- Add monster check to native touchend handler
- Block press-and-hold navigation when monsters present
- Both touch handlers now consistently prioritize combat
- Increase monster touch targets to 70x70 with visible tap area
- Add pointer-events:none to trails in nav mode
- Add interactive:false to accuracy circles
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Features:
- Trail Runner class with 4 skills (Attack, Brand New Hokas, Runner's High, Shin Kick)
- Skill level requirements (unlock at levels 1, 2, 3, 5)
- Discarded GU monster type with dialogue escalation phases
- Multi-monster combat: all entourage monsters join fight simultaneously
- Target selection system (click to select enemy)
- Sequential monster turns after player action
- XP bar in HUD showing progress to next level
- Server-side RPG stats persistence (survives cache clear)
Technical:
- Added rpg_stats table to database
- Added GET/PUT /api/user/rpg-stats endpoints
- Fixed auth token name mismatch (accessToken vs authToken)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Trail-appropriate slime monster: sentient energy gel residue.
Includes stats, abilities, variants, and entourage dialogue.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete RPG class design with:
- Full stat progressions and passives
- 10 skills with detailed level-by-level mechanics
- XP tables, damage calculations, and strategy guides
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed updateUndoButton null reference at line 1543
- Added null check before accessing DOM element properties
- Tracks now load properly
- Hamburger menu confirmed functional
- All critical JavaScript execution errors resolved
This commit represents a stable, working state after multiple fix attempts documented in FIX_ATTEMPTS.md
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed 20+ syntax errors caused by incorrect event listener wrapping
- Fixed null reference error in updateTrackList function
- Added null checks for trackCount and trackList elements
- Corrected all misplaced closing braces in arrow functions
- Separated nested if statements that were incorrectly combined
- Hamburger menu now functional
- Track loading error resolved
- Fixed misplaced closing braces in 7 event listeners
- Arrow functions were being closed too early (lines 4958, 4969, 6140, 6162, 6180, 6490, 6503)
- Corrected brace placement to properly wrap multi-line event handlers
- All event listeners now have proper null checks AND correct syntax
- Application now loads without JavaScript errors
- Wrapped all getElementById().addEventListener calls with null checks
- Prevents 'Cannot read properties of null' errors
- Keeps event listeners in original locations (no code movement)
- Fixes hamburger menu and track loading issues
- All 28+ event listeners now safely wrapped
Simple fix to prevent JavaScript from breaking when elements don't exist:
- Wrapped geocache event listeners in setupGeocacheListeners() function
- Added null checks for panelToggle (hamburger menu)
- Added null checks for clearNavBtn, undoBtn, mergeConnectBtn, etc.
- Added debug logging for hamburger click
This prevents errors from stopping script execution.
The hamburger menu should work now if the element exists.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Defer tool button initialization until DOM is ready
- Add null checks to prevent errors if elements don't exist
- Use setTimeout to ensure DOM elements are available
- This fixes all track tool buttons not responding to clicks
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed duplicate edit content from tab divs
- Removed duplicate admin content from tab divs
- JavaScript now finds correct button elements in overlays
- All track tools (select, draw, reshape, smooth, geocache) now work
- Fixed duplicate element IDs that prevented event listeners
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Limited max-width to 500px on desktop for better usability
- Right-aligned panels on desktop (right: 0)
- Full width on mobile (max-width: 100% below 768px)
- Adjusted border radius: rounded top-left only on desktop
- Prevents excessive width on large screens
- Maintains full-width experience on mobile
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Similar design to admin panel but 60vh height for more tools
- Green accent color (#4CAF50) to distinguish from admin
- Smooth slide-up animation with backdrop blur
- Close button returns to navigate mode
- All edit tools and controls preserved in overlay
- Properly closes other overlays when switching tabs
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added ensurePopupInBody() helper function
- Applied fix to navigation confirm dialog
- Applied fix to resume navigation dialog
- Applied fix to remesh dialog
- Applied fix to route overlay
- Applied fix to geocache dialog
- All popups now moved to document.body before display
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Force move popups to document.body if inside another container
- Added detailed console logging to show parent element
- Shows bounding rect position to debug visibility
- Popups were displaying but trapped inside hidden controls div
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Set z-index to 999999/999998/999997 for dialogs
- Added !important to all positioning properties
- Forced width/height to 100vw/100vh
- Added pointer-events: auto to ensure clickability
- Restricted Leaflet z-index to prevent interference
- Popups were showing but rendered behind map layers
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added explicit z-index layers (map: 1, dialogs: 10000+)
- Force visibility, opacity, and overflow on dialogs
- Added reflow trigger to ensure proper rendering
- Added console logging for debugging
- Ensure body has overflow: visible
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added 100ms delay to ensure DOM is ready before showing icon selector
- Popups already have proper z-index (3000+) above controls (1000)
- Icon selector should now appear immediately on page load if no icon saved
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added console logging for debugging
- Increased timeout to 100ms to ensure DOM is ready
- Added preventDefault and stopPropagation
- Included inline onclick as fallback method
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Admin panel HTML is created after JavaScript runs
- Used setTimeout to defer event binding until DOM is ready- Close button now properly attaches and functions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed selector to use correct ID 'adminCloseBtn'
- Close button now properly dismisses overlay and returns to edit mode
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Issues fixed:
- Removed broken range slider that was causing black boxes
- Simplified HTML structure with proper containers
- Fixed input visibility on both mobile and desktop
- Added proper flex containers for inputs and units
- Removed complex wrapper divs that were breaking layout
- Ensured all inputs are visible and properly sized
- Fixed checkbox alignment issues
- Made inputs actually usable on all screen sizes
The admin panel should now work properly on both mobile and desktop.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements:
1. Mobile-friendly redesign with vertical stacking
2. Touch-optimized inputs (44px minimum targets)
3. Better event handling with input events
4. Debounced saving to prevent excessive saves
5. Visual save indicator (toast notification)
6. Collapsible sections for better organization
7. Range sliders with value display
8. Responsive design (mobile-first approach)
Fixes:
- Settings now save immediately on input
- Visual feedback when settings are saved
- Proper mobile layout with full-width inputs
- Larger touch targets for better usability
- Sections can be collapsed and state persists
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Features added:
1. Custom icon colors - Choose any color for geocache icons
2. Secret caches - Set visibility distance (only visible within X meters)
3. Edit existing caches - Change title, icon, color, visibility after creation
4. Geocache list sidebar - View all caches in edit mode, click to navigate
5. Visual indicators for secret caches (purple badge, transparency in edit mode)
Implementation:
- Added color picker with preview in geocache dialog
- Added visibility distance field (0 = always visible)
- Edit button for existing caches in edit mode
- Dynamic visibility updates based on user location in nav mode
- Geocache list sidebar with stats and quick navigation
- All properties sync via WebSocket to other users
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
The title and icon fields were not showing when creating new geocaches.
Added the missing logic to show these fields for new caches.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Added title field for naming geocaches when created
- Added icon selection with MDI icon support
- Users can browse Material Design Icons and choose custom icons
- Updated notifications to show geocache title instead of 'undefined'
- Messages now say 'Someone left a note at [geocache title]'
- Fixed nearby cache notifications to include title
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed notification not triggering when adding message from another device
- Now notifies ALL devices (including your own) when near a cache with new message
- Added null checks for messages array to prevent errors
- Notifications work for messages from same user on different devices
This fixes the issue where adding a message from desktop wouldn't
notify your phone even when nearby.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added "Send Test Notification to All Users" button in admin panel
- Button appears after enabling push notifications
- Server endpoint /test-notification sends to all subscribed users
- Shows count of successful deliveries
- Purple button to distinguish from other actions
- Useful for testing notification system is working
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented three types of notifications with cooldowns:
1. Nearby Cache Notification
- Triggers when within 200m of a geocache
- 10-minute cooldown per cache
- Resets when you move >200m away
2. Cache Message Notification
- Triggers when another user adds a message to a nearby cache
- Only notifies if you're within 200m of the cache
3. Destination Arrival Notification
- Triggers when within 10m of navigation destination
- 1-minute cooldown to prevent spam
Features:
- Server endpoint /send-notification for triggering push notifications
- Cooldown tracking to prevent notification spam
- Distance-based triggers for relevant notifications
- Automatic cleanup of expired subscriptions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed from new Notification() to registration.showNotification()
- Mobile browsers require ServiceWorkerRegistration API for notifications
- Added vibrate pattern and badge icon for better mobile experience
This fixes the "Illegal constructor" error when enabling push notifications
on Chrome for Android and other mobile browsers.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed showStatus() to updateStatus() in 3 places
- Added proper status types ('success', 'info') for notifications
- Fixes ReferenceError when enabling/disabling push notifications
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Double-tap now requires both taps to be within 30 pixels of each other
- Prevents accidental navigation from taps with different fingers
- If second tap is too far away, it starts a new double-tap sequence
This ensures double-tap only works when intentionally tapping the same spot twice.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed quick-tap navigation (was interfering with map panning)
- Keep long-press (500ms hold) as primary navigation method
- Added double-tap as fallback for browsers with touch issues
- Double-click also works on desktop in navigation mode
- No single taps trigger navigation, allowing normal map interaction
This ensures map panning works normally while providing two clear
methods to set navigation destinations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Changed touch event handlers from L.DomEvent to native addEventListener
- Added passive: false to allow preventDefault on touch events
- Implemented fallback quick-tap navigation for Chrome/PWA compatibility
- Added capture: true for better touch event handling
- Quick taps (<300ms) now trigger navigation dialog immediately
This fixes the issue where tap-to-navigate only worked on Firefox mobile
but not Chrome or installed PWA. Now supports both long-press and quick-tap.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>