All notable changes to Graphium will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
New Grid Types: Added support for Hexagonal (flat-top) and Isometric grids alongside existing Square grids
- Hexagonal grid uses axial coordinate system for efficient hex addressing
- Isometric grid uses diamond-shaped cells with 45° rotation
- All grid types maintain full backward compatibility
-
Grid Geometry Abstraction: New modular architecture for grid types
GridGeometryinterface for geometry-agnostic operationsSquareGridGeometry,HexagonalGridGeometry,IsometricGridGeometryimplementations- Factory pattern via
createGridGeometry(gridType)for extensibility
-
Smart Grid-Aware Snapping:
- Square grids: Odd-sized tokens snap to cell centers, even-sized snap to intersections
- Hex/Iso grids: All tokens snap to cell centers (hex center or diamond center)
- Updated
snapToGrid()function withgridTypeparameter
-
UI Enhancements:
- Map Settings now shows "Square - Lines", "Square - Dots", "Hexagonal", "Isometric", "Hidden"
- Grid calibration button disabled for non-square grids (with tooltip explanation)
-
Performance Optimizations:
- Pre-computed math constants (SQRT3) to avoid repeated calculations
- Efficient viewport culling for all grid types
- Minimal object allocations in hot paths (drag/snap operations)
- DOTS mode remains square-grid only for optimal performance
-
Comprehensive Testing:
- 50+ unit tests for grid geometries
- Coordinate conversion roundtrip tests
- Performance tests for large viewports
- Updated existing grid tests with explicit
gridTypeparameter
-
Grid Cell Hover Highlight: Visual feedback when hovering over grid cells
- Semi-transparent overlay on hovered cell
- Works with all grid types (square, hex, iso)
- Disabled for DOTS mode (performance)
- Uses grid geometry for accurate cell detection
-
Customizable Grid Color: Per-map grid color picker
- Grid color property persisted per map
- Color picker UI in Map Settings
- Default: #222222 (dark gray)
- Removed theme-based grid color
-
Grid-Aware Snap Preview: Visual indicator during token dragging
- Shows where tokens will snap when released
- Dashed blue circle at snap destination
- Works with all grid types
- Multi-token drag support
- Performance optimized using refs
-
Movement Range Overlay: Tactical movement planning
- BFS flood-fill algorithm for reachable cells
- Activate with M key (DM only)
- Default 30ft movement speed (D&D standard)
- Updates in real-time during drag
- Grid-aware neighbor calculation
- Semi-transparent blue overlay
-
Enhanced Measurement Display: Grid cell counts in measurements
- Ruler: "30ft (6 cells)"
- Blast: "20ft radius (4 cells)"
- Cone: "30ft 53° cone (6 cells)"
- Proper singular/plural handling
- Helps DMs with tactical planning
-
Grid Type Keyboard Shortcuts: Quick grid switching (DM only)
- 1: Square - Lines
- 2: Square - Dots
- 3: Hexagonal
- 4: Isometric
- 5: Hidden
- Toast notifications for feedback
- No repeat events
- Grid Type Definition: Extended
GridTypefrom'LINES' | 'DOTS' | 'HIDDEN'to include'HEXAGONAL' | 'ISOMETRIC' - snapToGrid() Function: Added optional
gridTypeparameter (defaults to 'LINES' for backward compatibility) - GridOverlay Component: Refactored to support hex/iso rendering using geometry abstraction
- Grid Color Default: Maps created before this update that don't have the
gridColorproperty will use the new default grid color (#222222, dark gray) when loaded. This is a visual-only change and does not affect map functionality.
- Grid calibration now properly disabled for non-square grids to prevent incorrect results
New Files:
src/types/grid.ts- Grid type definitions and interfacessrc/utils/gridGeometry.ts- Grid geometry implementationssrc/utils/gridGeometry.test.ts- Comprehensive grid geometry testssrc/components/Canvas/MovementRangeOverlay.tsx- Movement range visualization
Modified Files:
src/store/gameStore.ts- Extended GridType enum, added gridColorsrc/utils/grid.ts- Updated snapToGrid with gridType supportsrc/utils/measurement.ts- Enhanced formatters with cell countssrc/utils/measurement.test.ts- Updated tests for new formatsrc/components/Canvas/GridOverlay.tsx- Hex/iso rendering, hover highlightsrc/components/Canvas/CanvasManager.tsx- Snap preview, movement range, keyboard shortcuts, grid colorsrc/components/MapSettingsSheet.tsx- Grid type options, color picker, calibration fixsrc/utils/grid.test.ts- Updated tests with explicit gridType parameterCHANGELOG.md- Comprehensive documentation of all changes
Grid Size Semantics:
- Square:
gridSize= cell width/height in pixels - Hexagonal:
gridSize= circumradius (center to vertex) - Isometric:
gridSize= half of diamond width
Breaking Changes: None - fully backward compatible with existing square grids
- Auto-Update System: Seamless updates from GitHub Releases
- Check for updates via About modal (
?keyboard shortcut) - Download progress indicator with speed and percentage
- One-click "Restart & Install" when update is ready
- Comprehensive error handling with user-friendly messages
- Error boundary protection prevents update failures from crashing app
- Full test coverage (708 lines of tests)
- Production logging for debugging update issues
- Disabled in development mode to prevent accidental updates
- Requires code signing for macOS production builds
- Check for updates via About modal (
- Added
electron-updater^6.3.9 for update management - Added
electron-log^5.2.4 for production logging - New components:
UpdateManager.tsx: Update UI modal (528 lines)UpdateManagerErrorBoundary.tsx: Error protection (161 lines)electron/autoUpdater.ts: Main process logic (212 lines)
- IPC bridge in
electron/preload.tsfor secure communication - Type definitions in
src/window.d.tsforwindow.autoUpdaterAPI - Integrated in
src/App.tsxwith error boundary wrapping - "Check for Updates" button added to About modal
- Design system documentation in playground
- Comprehensive documentation in
AUTO_UPDATER.md
- Signature verification (when app is code-signed)
- HTTPS-only downloads from GitHub
- No auto-download - user controls update installation
- Sandboxed renderer access via contextBridge
- Logo not appearing in Mac production builds (#223)
(Add previous releases as needed)
- Added: New features
- Changed: Changes in existing functionality
- Deprecated: Soon-to-be removed features
- Removed: Removed features
- Fixed: Bug fixes
- Security: Security improvements