openpencil/crates/op-host-native
Fini 9ab4715ce1 feat(desktop): open scene templates from File > new from template
Completes the entry point: the File menu gains a "new from template"
row that opens the centre, and a chosen card becomes a document.

The template loads through `load_editor_state_from_source` — the same
loader a real file goes through — so a document that parses as JSON but
fails schema conversion cannot reach a user as a click that does
nothing. A test runs all four shipped templates through it.

It opens UNSAVED with no bound path, like File > New rather than File >
Open. The shipped `.op` is read-only content; binding it as the save
target would let the first Cmd+S overwrite the template for everyone who
used it afterwards.

Loading happens in the frame drain rather than the press handler because
replacing the document has to re-run the collaboration gate, which the
panel press — which only opens a panel — correctly did not.

Native wiring mirrors the Prompt Center's tiers: paint in the floating
panel pass, press above it in the overlay ladder, hover reporting
`owns_point` so canvas hover is suppressed underneath, scroll swallowed
by the grid, and Escape closing the panel ahead of selection.

File-menu row indices shift by one below the new row; the row-map tests
move with them. One of them asserts a hover value is passed through
verbatim rather than a row meaning, so its number stays put.

Claude-Session: https://claude.ai/code/session_01FqKQqNj8exYwopGDpYUU7x
2026-08-02 11:00:34 +08:00
..
assets fix(web): use browser fonts in canvaskit shell 2026-06-19 02:39:34 +08:00
examples feat(desktop): adopt the casement winit fork 2026-05-18 21:45:09 +08:00
notes
src feat(desktop): open scene templates from File > new from template 2026-08-02 11:00:34 +08:00
tests refactor: typed error enums across the whole workspace 2026-07-27 21:09:06 +08:00
Cargo.toml feat(collab): add authenticated p2p collaboration 2026-07-29 00:06:58 +08:00