Repository navigation
Ariadne settings: an editor for every key under a state subtree, from its metadata - #1372
Merged
Merged
Conversation
transfix
enabled auto-merge (squash)
November 19, 2026 21:05
… its metadata
A new widget, `settings:` (or `type: settings`), so a settings panel no longer lists a widget per
key. `(has? "settings")` finds it.
- .ari:
- `root:` is a state path or a list of them;
- `filter:` patterns (a substring or a glob, a leading '-' leaves out);
- `groups:` orders, renames and opens branches (a key, {key: title} or {key: {title, help,
open}});
- `search: true` adds a search box, its text at tree.<id>.search;
- `readouts: false` leaves out the read-only keys;
- `open:`, `commit: release` and `on:` as elsewhere.
- Each key's editor comes from its metadata: state_key_meta's access / unit / min / max,
param_table's type / choices / default, and an optional `scale` (log | linear).
- A read-only node or `access: telemetry` is a read-out.
- `choices` is a combo.
- bool / int / number is a checkbox, an integer or a number.
- An untyped key with a unit, or with a range, is a number:
- no unit (state_key_meta's "") is a flag over 0..1, else a count;
- `tick` is a count.
- Anything else is a text field, applied on Enter.
- A number with a range is a slider, by ratio when the range is positive and spans 100x.
- Groups: each branch is a group, keys first at each level.
- Reset: per key, and "reset all" per group. The default is the key's `default` property, else
the value first seen.
- Each row's tooltip has the path, the description, unit, range, default and when it applies.
- Writes go through the committed-write path (live while a slider moves, `on:` after the
commit). A value the key's kind does not take is refused with a warning.
- Backend::settings(label, id, SettingsSpec) -> SettingsEdit. The core (settings_emit.{h,cpp})
walks the subtree and rebuilds the spec only after a write under a root (a value, a comment, a
property, a key added or removed), counted per root from the tree root's childChanged, or when
the search moves. At rest it reads no state.
- It lists at most 2000 keys and 32 levels.
- {i} works in root: and filter: under repeat:.
- The default for backends without their own (FTXUI, tvision) is a flat list of the backend's
widgets: "[title]" lines, each key labelled with its path, reset buttons.
- ImGui (settings_imgui.cpp):
- a collapsing header per branch under the root and a tree node below;
- a row of name / editor / reset;
- the search box;
- a protected settings_row_drawn hook with each row's rects, for tests.
Tests:
- ariadne_settings_test (new): kinds from metadata, groups, filter and search, writes and on:,
commit: release, resets, re-read only on change, several roots, repeat, the flat default.
- ariadne_loader_test SettingsWidget.
- The ariadne_ftxui_test flat-list golden, plus a reset and a checkbox clicked.
- cvcgl_imgui_settings (new): a slider dragged writes live and runs on: once at release; its
reset writes the default; a text field applies on Enter only.
Windows' terminal draws no partial-block glyphs (U+2589..U+258F), so SettingsDrawsAFlatList's golden failed there on the slider rows. The golden now reads that cell as a space and still checks the full cells and everything else.
transfix
force-pushed
the
feat/ariadne-settings-editor
branch
from
November 20, 2026 01:35
607503a to
d7ba8e3
Compare
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A new Ariadne widget,
settings:(ortype: settings): an editor for every key under a state subtree, each key's editor chosen from its metadata. A settings panel no longer needs one widget per key, ascars_settings(bindings/pycvc/pymod_gl/cars_panels.ari) lists them today. A document checks for it with(has? "settings").What each key gets
The editor comes from the metadata bindings already write:
cvc/state/state_key_meta.h's access / unit / min / max,cvc/core/param_table.h's type / choices / default, and an optionalscale(log | linear).access: telemetry.choices.typebool / int / number.""), a flag over 0..1 and a count otherwise;tickis a count.scalesays otherwise.groups:orders, renames and opens them.defaultproperty, else the value first seen.How it works
Backend::settings(label, id, SettingsSpec) -> SettingsEditinbackend.h.settings_emit.{h,cpp}):on:after the commit.childChanged. At rest it reads no state.{i}works inroot:andfilter:underrepeat:.[title]lines, each key labelled with its path, and reset buttons.settings_imgui.cpp):settings_row_drawnhook that reports each row's rects to tests.docs/ARIADNE.md§4.Terminal (FTXUI), from the new golden:
I also checked it by hand in arigl. I rendered
examples/ariadne/documents/orthoslicer.ariwith one extra window, a settings editor over the threevolume_slicenodes'slicekeys (which VolumeSliceNode describes withparams_describe_state), usingarigl snapshot --png. Each plane got a header and the right editors (a combo foraxisandfilter, a voxel slider forindex, a checkbox foropaque), with resets where the values differ from the params defaults. That document is not part of this PR.Tests
ariadne_settings_test(new):on:,commit: release, key and group resets;repeat:, and the flat default.ariadne_loader_test:SettingsWidget.ariadne_ftxui_test:SettingsDrawsAFlatList, the golden above plus a reset and a checkbox clicked.cvcgl_imgui_settings(new):on:once, at the release;Local results
Linux Release build. All Ariadne and ImGui ctest entries pass except three world/vehicle tests that need Jolt, which this local build lacks. Those tests don't involve this change.