Appearance
2026-03-11 simulator logger and diagnostic dump plan
This record captures the simulator enhancement that adds one-file diagnostic export/import and a header-level logger toggle for immediate debug switching.
Background
Developers need a fast way to share reproducible simulator sessions and toggle SDK logs during investigation without restarting docs with custom startup flags.
Goal and scope
- Add one-click diagnostic export for
mapHex,pathHex,roomProperties, andruntime. - Add one-click diagnostic import that restores state and re-renders automatically.
- Add a header-level logger toggle and apply changes immediately by rebuilding simulator render state.
Out of scope:
- Multi-file zip diagnostic packages.
- Persisting derived metadata such as runtime support matrix.
Chosen approach
- Remove logger-specific CLI startup flags from
robot-map-docs. - Keep logger state in simulator UI (
default: off) and map it toconfig.global.enableLogger. - Re-render map after logger toggle so logger config takes effect immediately.
- Use a versioned single JSON dump (
version: 1) as the diagnostic exchange format. - Validate and normalize imported runtime payload by runtime defaults before applying to the SDK instance.
Impacted files or modules
bin/docs-server.jssrc/simulator/types/index.tssrc/simulator/core/useRuntimeBindings.tssrc/simulator/core/usePlaygroundRender.tssrc/simulator/core/useMapPlayground.tssrc/simulator/components/SimulatorActionBar.vuesrc/simulator/components/SimulatorMapPlayground.vue
Verification checklist
- [ ]
robot-map-docs --openstill opens docs correctly. - [ ] Header logger toggle defaults to OFF on initial load.
- [ ] Toggling logger ON/OFF re-renders the map and updates visual state.
- [ ] Export action downloads a valid
.simulator-dump.jsonfile. - [ ] Import action restores map/path/room/runtime and re-renders successfully.
- [ ] Import flow does not report success when map render fails.
- [ ]
npm run lintpasses. - [ ]
npx tsc --noEmitpasses.