Skip to content

ariadne(tui): draggable grid seams, OS signals to on_signal, ari cvcpkg package - #709

Merged
transfix merged 5 commits into
masterfrom
feat/ariadne-tui-followups
Oct 19, 2026
Merged

transfix merged 5 commits into
masterfrom
feat/ariadne-tui-followups

Conversation

@transfix

Copy link
Copy Markdown
Owner

Follow-ups to the interactive FTXUI terminal backend. Stacked on #708: review that first; this PR's own change is the one commit on top of it.

Grid seams drag

  • Row splits (resizable + row_heights) render as one framed stack with a separator between panes.
    • Dragging a separator resizes the two panes on either side and keeps their total.
    • Pane sizes persist to tree.<id>.tracks (§11.4). They are seeded once from the persisted or authored sizes.
  • resizable tables get a draggable seam between columns, so every row follows a dragged column. A table with no inner borders gets a blank one-cell seam.

OS signals reach on_signal:

Signal handlers are process-wide, so they stay in the host; the loop only offers the seams.

  • RunOptions gains three hooks:
    • on_start runs after FTXUI installs its own handlers, so a host's handlers take precedence;
    • on_stop runs before the terminal is restored;
    • take_signal is polled every iteration.
  • Each pending signal goes to the document's on_signal: with source: "os". When the document has no handler, the signal ends the loop.
  • run() now returns why it ended (RunExit { signal, from_os }). It used to return void, so existing callers are unaffected.
  • ari wires SIGTERM, SIGHUP, SIGINT, SIGQUIT and SIGUSR1/2 through sigaction. On a signal the document doesn't handle it exits with 128 + the signal number.

ari is its own cvcpkg package

  • It moves to a dual-mode src/ari/, which builds in-tree or standalone against an installed libcvc, like src/cvc-cli. The build gets a CVC_BUILD_ARI option, which the libcvc and libcvc-cuda recipes set OFF.
  • New cvcpkg/recipes/ari recipe, linux-only: the published libcvc carries FTXUI there.
  • A "Build, pack & publish ari [Linux]" step in publish-cvcpkg.yml, modelled on cvcgl-examples. It runs the recipe's own build.sh against the libcvc just staged, and compute-revisions gains an ari output.

Verification

  • ariadne_ftxui_test 32/32, with 4 new seam tests:
    • row-split drag persists tree.split.tracks as 112,48;
    • persisted tracks seed the split;
    • a column drag moves every row;
    • a seam works with no borders.
  • ctest -R Ariadne: 368/368.
  • Real terminal (tmux), killing the running ari:
    • SIGTERM, SIGHUP, SIGUSR1 and SIGINT each reached a counting on_signal (source: os), and ari kept running;
    • three Ctrl-Cs still quit;
    • a document with no handler exited 143 on SIGTERM, with the terminal restored.
  • Packaging:
    • cvcpkg validate cvcpkg/recipes/ari passes;
    • the recipe's build.sh builds standalone against a cmake --installed SDK (RUNPATH $ORIGIN/../lib), and that binary runs ari snapshot;
    • cvcpkg pack cvcpkg/recipes/ari --local packs a relocatable 34 KB archive.
  • I checked the published libcvc 3.6.0+cvc.1 with readelf: it links libftxui-* and libyaml-cpp, so the packaged ari gets the real backend.

Not verified

  • The publish step itself only runs in CI with CVCPKG_TOKEN. I ran its commands locally, but not the workflow.

The defensive rewrite of assimp's exported zlib link matched libz.* and
zlib.*, but an assimp republished on the windows builder exports
$<LINK_ONLY:.../cvcpkg-prefix-assimp-*/lib/z.lib> (zlib's CMake names its
windows import library z.lib). Neither pattern matched, so the builder-absolute
path survived into cvc.dll's link: `ninja: error: ...lib/z.lib, needed by
bin/cvc.dll, missing` in the windows recipe lane and `nvlink fatal: Could not
open input file ...lib/z.lib` in package-windows (red on master since the
republish). Match a path ending in /z.lib or \z.lib too, through to the end of
its list entry so a $<LINK_ONLY:...> wrapper does not leave a stray '>'.
@transfix
transfix force-pushed the feat/ariadne-tui-followups branch from 48a4e3a to d77c663 Compare October 19, 2026 06:15
With the build-side rewrite fixed, the windows recipe lane got as far as its
consumer smoke test and failed there: `LNK1181: cannot open input file
...cvcpkg-prefix-assimp-*\lib\z.lib` in smoke.vcxproj. cvcConfig.cmake re-finds
assimp for every consumer and carries its own copy of the stale-zlib rewrite,
with the old libz/zlib-only pattern. Give it the same pattern as
src/cvc/CMakeLists.txt.
…cpkg package

Follow-ups to the interactive FTXUI backend (#708):

- Grid seams drag. A row split is now one framed stack with a separator
  between panes; dragging a separator resizes the two panes around it and
  the pane sizes persist to tree.<id>.tracks (seeded apply-once from the
  persisted / authored sizes). A `resizable` table gets a draggable seam
  between columns (a blank one-cell seam when it shows no inner borders).
- OS signals reach on_signal. RunOptions gains host hooks: on_start (after
  FTXUI installs its own handlers), on_stop, and a take_signal poll; each
  pending signal goes to the document's on_signal (source "os") and ends
  the loop when the document has no handler. run() now returns why it
  ended (RunExit). The handlers stay in the host: `ari` wires SIGTERM,
  SIGHUP, SIGINT, SIGQUIT and SIGUSR1/2 through sigaction and exits with
  128 + signo on an unhandled one.
- `ari` is its own package. It moves to a dual-mode src/ari (in-tree or
  standalone against an installed libcvc, like src/cvc-cli), gains
  CVC_BUILD_ARI (OFF in the libcvc / libcvc-cuda recipes), a linux
  cvcpkg/recipes/ari recipe, and a pack + publish step in
  publish-cvcpkg.yml modelled on cvcgl-examples.
…ny screen

begin_window clamped the STORED window position to the screen every frame, so
one frame drawn on a momentarily tiny screen (a terminal, or a browser page
before its first resize) moved every window into the corner for good. Clamp
only where the window is drawn (Win::sx/sy); the placement stays what the
document, the persisted geometry or a drag set. Found by the wasm/xterm.js
session (#710).
@transfix
transfix force-pushed the feat/ariadne-tui-followups branch from d77c663 to f34f9fd Compare October 19, 2026 06:29
@transfix
transfix merged commit 3007a26 into master Oct 19, 2026
18 checks passed
@transfix
transfix deleted the feat/ariadne-tui-followups branch October 29, 2026 20:52
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