# DISPATCH: Explorer M4 3 (Minimap HUD Component & DOM Integration)

## Assigned Agent
- Name: `explorer_m4_3`
- Type: `teamwork_preview_explorer`
- Working Directory: `c:\Projects\FreeExile\.agents\teamwork\explorer_m4_3`

## Mandatory Reference Documents
1. `c:\Projects\FreeExile\.agents\teamwork\ORIGINAL_REQUEST.md` (specifically section `## 2026-10-01T19:19:13Z` - R4)
2. `c:\Projects\FreeExile\GEMINI.md`
3. `c:\Projects\FreeExile\AGENTS.md`
4. `c:\Projects\FreeExile\.agents\teamwork\orchestrator_11\PROJECT.md`
5. `client/webapp/index.html`

## Exploration Scope & Instructions
Design and architect the Minimap HUD component and DOM mounting:
1. Design `client/webapp/js/ui/minimap_hud.js`:
   - Dedicated $120 \times 80\text{px}$ canvas element mounted in top-right HUD container (`#minimap-container`).
   - Coordinate transformation: maps grid $(W \times H)$ to $120 \times 80$ canvas with aspect-ratio preserving scaling.
   - Fog integration: `UNEXPLORED` tiles remain black; `EXPLORED_FOGGED` and `VISIBLE` tiles render miniature terrain colors matching biome.
   - Dynamic indicators:
     - Player position: pulsating white/cyan blip with orientation notch.
     - Waypoint: cyan circle icon at waypoint location.
     - Boss Gate: red/gold locked skull or gate icon.
     - POI markers: subtle gold dots when explored.
   - Refresh rate: dirty invalidation or throttled update on player movement (e.g. 15–30 Hz) to conserve mobile battery.
2. DOM & CSS Integration in `client/webapp/index.html`:
   - Inspect `#minimap-container` or design semantic HTML container in top-right corner.
   - Glassmorphic border, subtle drop-shadow, responsive positioning for mobile portrait ($390\text{px}$ width).
   - Strict DOM constraint: `index.html` must remain $\le 200$ lines (Soft cap 200, Hard cap 400).
3. Test & Verification Spec:
   - Formulate unit tests for `war_fog.js` and `minimap_hud.js` (`tests/unit/test_fog_and_minimap.py` or Node test harness).
4. Deliver a detailed technical report in `report.md` and self-contained `handoff.md`.
Notify parent when complete.

## 2026-10-01T21:24:35Z
You are Explorer M4 3 (explorer_m4_3).
Your working directory is: c:\Projects\FreeExile\.agents\teamwork\explorer_m4_3
Your dispatch assignment is: c:\Projects\FreeExile\.agents\teamwork\explorer_m4_3\DISPATCH.md
MANDATORY: Read the authoritative user request at:
c:\Projects\FreeExile\.agents\teamwork\ORIGINAL_REQUEST.md (specifically section ## 2026-10-01T19:19:13Z - R4).
Also consult c:\Projects\FreeExile\GEMINI.md, c:\Projects\FreeExile\AGENTS.md, and c:\Projects\FreeExile\.agents\teamwork\orchestrator_11\PROJECT.md.

Design Minimap HUD component and DOM mounting:
1. Design client/webapp/js/ui/minimap_hud.js:
   - Dedicated 120x80 px canvas in top-right HUD.
   - Scaled representation of terrain and fog state.
   - Dynamic indicators: player blip, waypoints, locked/unlocked Boss Gate, POIs.
   - Throttled update rate for mobile battery optimization.
2. DOM & CSS integration in client/webapp/index.html (keep index.html <= 200 lines).
3. Test spec for Fog & Minimap.
4. Ensure minimap_hud.js stays <= 280 lines (Soft cap 350, Hard cap 500 lines).

Write report.md and handoff.md in your working directory and notify parent when complete.
