Skip to content

ariadne: closable windows (X) + a Settings menu to reopen them - #567

Merged
transfix merged 1 commit into
masterfrom
feat/ariadne-closable-windows
Oct 4, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/ariadne-closable-windows

Conversation

@transfix

@transfix transfix commented Oct 4, 2026

Copy link
Copy Markdown
Owner

What

Windows can now be closed (an X button) and reopened from a menu — as you asked, the lsystem_forest control panels are closable and re-openable from a Settings menu.

closable: true on a window gives it a close (X) button; its open state persists at tree.<id>.open (default open — the §11.4 tree.<id> convention, alongside .geometry). A closed window isn't rendered at all; a menu_toggle bound to the same key reopens it.

  • widget.h — Widget::closable. loader.cpp — parse closable: on a window and at an include site (so a demo makes a shared panel closable without forking it, like the pos/size override).
  • Backend — begin_window gains bool *p_open (default null = no X). ImGuiBackend passes it to ImGui::Begin (new ui::Begin(name, p_open) overload); FTXUI / Mock ignore it.
  • ariadne.cpp — the Window case reads tree.<id>.open (skips a closed window entirely), passes &open to begin_window, and writes the post-render state back (the X clears it).
  • lsystem_forest.ari — every control panel is closable: true, and a new Settings menu lists them as checkable toggles (bind tree.<id>.open).

Stacked on #566 (base feat/lsys-node-controls) because it adds closable: to that PR's panels. Will retarget to master once #566 merges.

Tests

  • ariadne_loader_test — closable as a window key + an include override + the non-closable default.
  • ariadne_runtime_test — a MockBackend that simulates the X: render→open seeds 1, X→persists 0, closed→not rendered, key back to 1→re-rendered.
  • Verified in the browser: closing Stage lighting with its X hides it and unchecks it in Settings; toggling it in Settings brings it back at its spot. Native + wasm compile.

Add `closable: true` to a window: it gets a close (X) button, and its open state persists at
tree.<id>.open (default open) — the §11.4 tree.<id> convention, alongside .geometry. A closed window
is not rendered at all; a menu_toggle bound to the same key (e.g. a "Settings" menu) re-opens it.

- widget.h: Widget::closable. loader.cpp: parse `closable:` on a window AND at an include site (so a
  demo makes a shared panel closable without forking it, like the pos/size override).
- Backend: begin_window gains `bool *p_open` (default null = no X). ImGuiBackend passes it to
  ImGui::Begin (via a new ui::Begin(name, p_open) overload); FTXUI/Mock ignore it.
- ariadne.cpp Window case: when closable, read tree.<id>.open (skip the window entirely when closed),
  pass &open to begin_window, and write the post-render state back (the X clears it).
- lsystem_forest.ari: every control panel is now `closable: true`, and a new Settings menu lists them
  as checkable toggles (bind tree.<id>.open) to show/hide each.

Tests: ariadne_loader_test (closable as a window key + an include override + the non-closable
default); ariadne_runtime_test (a MockBackend that can simulate the X — render→open seeds 1, X→
persists 0, closed→not rendered, key back to 1→re-rendered). Verified in the browser: closing Stage
lighting with its X hides it + unchecks it in Settings; toggling it there brings it back. Native +
wasm compile.
@transfix
transfix changed the base branch from feat/lsys-node-controls to master October 4, 2026 20:17
@transfix
transfix force-pushed the feat/ariadne-closable-windows branch from da445e6 to 602eda2 Compare October 4, 2026 20:17
@transfix
transfix enabled auto-merge (squash) October 4, 2026 20:17
@transfix
transfix merged commit 590e101 into master Oct 4, 2026
13 of 19 checks passed
@transfix
transfix deleted the feat/ariadne-closable-windows branch October 29, 2026 20:51
transfix added a commit that referenced this pull request Nov 9, 2026
…ors (#1075)

python312 3.12.10+cvc.23 (wasm and wasm-mt, cy-pca/cvcpkg#565 and #567)
archives pyexpat's expat and _sha2's HACL SHA-2, so neither link needs
-sERROR_ON_UNDEFINED_SYMBOLS=0 any more.

- cvc_ariadne_python_wasm_host drops the flag. Its configure reads the
  deps prefix's python312 manifest and stops on anything older than
  cvc.23: cvcpkg's version ranges ignore +cvc.N, so the recipes can't ask
  for it.
- link-host.sh drops it too and checks the same manifest. Allowing
  undefined symbols had also hidden 44 others the node smoke never
  calls, so the link now names what a CMake executable gets from its
  targets: libcvcMedia.a, -sFETCH=1, -lwebsocket.js, WebGL 2
  (-sFULL_ES3=1 -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2) and VTK
  RenderingUI's js-library.
- The ariglx-web smoke gains stdlib.ari: a python: block that parses XML
  with xml.parsers.expat, takes a SHA-256 and seeds random with a string,
  each of which used to abort the page.
- ci.yml and publish-pycvc-gl-wasm.yml print the python312 they
  installed. The recipes, ARIADNE.md, CVCGL_WASM.md and the scripting
  hosts roadmap (5.1, 5.5, 9, 10) say what is required now.


* With the VTK bridge the wasm host needs python312 cvc.25 or later

The pycvc_gl host's dry run (publish-pycvc-gl-wasm) failed on duplicate
symbols, not undefined ones:

  wasm-ld: error: duplicate symbol: g_reparseDeferralEnabledDefault
  >>> defined in libpython3.12.a(xmlparse.o)
  >>> defined in libvtkexpat-9.5.a(xmlparse.c.o)

python312 cvc.23 and cvc.24 archive CPython's expat, whose pyexpatns.h
leaves two internals unrenamed (that one and
_INTERNAL_trim_to_complete_utf8_characters). VTK's bundled expat defines
both too, and vtk-python's wrappers pull it in. This happens with or
without the strict flag. cy-pca/cvcpkg#581 renames them in cvc.25.

Both checks, the configure's (cvc_ariadne_python_wasm_host) and
link-host.sh's, now ask for cvc.25 or later when the VTK bridge is
linked. Without the bridge they still ask for cvc.23, which the lean
ariglx-web job passes on cvc.24. link-host.sh runs its check after the
vtk-python detection. The recipes, the workflow comment, CVCGL_WASM.md
and the roadmap (1, 5.1, 5.5, 10) say so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant