Skip to content

Simulator initial render and layout bugfix (March 10, 2026)

Symptom

The simulator page showed an empty canvas after load even though default mapHex data existed. The map preview area also looked too small for practical inspection of large maps.

Reproducible steps

  1. Open /simulator/ in docs.
  2. Observe status text before any action.
  3. Observe preview panel size on desktop.

Root cause

  • The component only prefilled mapHex state and initialized canvas, but did not trigger first render.
  • The page inherited default docs content width and the previous grid split, which constrained the preview area.

Patch summary

  • Trigger initial renderMap() on mount.
  • Switch layout to preview-first with a larger desktop map area.
  • Expand simulator page content width and disable page aside via frontmatter.
  • Increase preview container minimum height.

Risk assessment

  • Low risk. Changes are isolated to simulator docs UI.
  • No runtime SDK behavior changes.

Regression checklist

  • [ ] /simulator/ renders default mapHex without manual click.
  • [ ] Preview area is significantly larger on desktop.
  • [ ] Mobile layout remains stacked and usable.
  • [ ] mapHex required behavior remains unchanged.
  • [ ] Optional pathHex and roomProperties remain non-blocking.

最后更新于: