Skip to content

Commit 8bf5809

Browse files
committed
docs: update .ai/status.md and .ai/todo.md for foundry module review session
https://claude.ai/code/session_01XMwxFR8BCi5XvgaSVMSBZB
1 parent bb2726e commit 8bf5809

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.ai/status.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
<!-- ====================================================================== -->
99

1010
## Last Updated
11-
2026-03-11 -- **Session fix + Owner Dashboard (two-dashboard architecture).**
11+
2026-03-11 -- **Foundry module review — bug fixes and feature completion.**
12+
13+
31. **Foundry module review.** Comprehensive code review of the Foundry VTT sync module found 13 issues. Fixed 9 (deferred ApplicationV2 upgrade):
14+
- **Runtime bugs**: Shop window `{{json}}` helper crash (replaced with data-item-id lookup), drawing coordinate conversion missing percentage↔pixel (tokens had it, drawings didn't), fog reconciliation `_syncing` flag corruption (extracted `_createFogDrawingData`, batch creates), entity_type_id:0 invalid in syncapi handler (added first-type fallback).
15+
- **Data flow gaps**: Scene-to-map linking (context menu + auto-link), `_onEntityCreated` fetches full entity from REST (WS payload partial), `onSyncMapping` added to MapSync and CalendarSync, `onInitialSync` added to MapSync (pulls drawings/tokens/fog on connect).
16+
- **Docs/metadata**: SimpleCalendar in module.json, calendar hint fix, .ai.md corrections (fog status, App v1 not v2), TESTING.md fog + scene-linking sections.
1217

1318
30. **Session completion fix + two-dashboard architecture.** Two changes:
1419
- **Session "Mark Complete" bug fix**: `hx-vals` always sends form-encoded data regardless of `hx-headers` Content-Type. `UpdateSessionAPI` expects JSON, so the decode failed → 400 error → red notification bar. Replaced with `Chronicle.apiFetch()` onclick handler using `data-url` and `data-name` attributes. Also fixes XSS risk from session name interpolation into JSON template string.

.ai/todo.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ _WASM-sandboxed backend logic via Extism/wazero. See ADR-021._
289289
- [ ] Calendar timezone support / print-PDF export
290290
- [ ] Map hex/square grid overlay
291291
- [x] Fog of war bidirectional sync (Chronicle ↔ Foundry)
292+
- [x] Foundry module review: runtime bugs (json helper, coord conversion, fog flag, entity_type_id), data flow (scene linking, onSyncMapping, onInitialSync for MapSync, full entity fetch), docs
292293
- [ ] Webhook support for external event notifications
293294
- [ ] Widget inline CSS → CSS classes migration
294295
- [ ] Reusable modal/dropdown component library

0 commit comments

Comments
 (0)