Skip to content

Ariadne settings: only a search, or a filter that picks keys, opens every group - #1390

Merged
transfix merged 2 commits into
masterfrom
fix/settings-narrowed-rule
Nov 21, 2026
Merged

transfix merged 2 commits into
masterfrom
fix/settings-narrowed-rule

Conversation

@transfix

@transfix transfix commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

With the settings: widget from #1372, any filter: kept every group open on every frame, even one made only of - patterns that just leave keys out. settings_emit.cpp set spec.narrowed for any non-empty filter, and settings_imgui.cpp then calls SetNextItemOpen(true, ImGuiCond_Always) on each header. So the user could not collapse a group, and open: / groups: had no say.

#1389 (pycvc_gl.cars' Settings window) shows it. Its filter: ["-nav_plant.vehicle", "-nav_plant.settings.", "-nav_plant.available"] only hides the plant's build keys, yet it left Vehicle, Plant and the nested plan / modulation stuck open.

On master. It was opened stacked on #1372. After #1372 squash-merged (3cdf2d3), it was rebased onto master as one commit and pushed, so CI/CD runs here. It is independent of #1389.

Change

  • spec.narrowed is now set by a search, or by a filter with at least one pattern that picks keys (one not starting with -; filter_picks). An empty pattern matches every key, so it doesn't narrow.
  • A filter of - patterns only leaves keys out. open: and groups: decide which groups start open, and each one opens and closes by hand.
  • A search, or a filter that picks keys, still draws every group open, so no match hides in a closed one.
  • docs/ARIADNE.md §4:
    • the narrowing rule;
    • the filter bullet now says what an exclude-only filter passes ("none of the - patterns and, if there are others, one of them").
  • The comments on SettingsSpec::narrowed (backend.h) and in settings_imgui.cpp are updated to match.

Tests

  • ariadne_settings_test, new AFilterThatOnlyLeavesKeysOutKeepsTheGroupsClosable:
    • an exclude-only filter is not narrowed, leaves the keys out, and keeps open: false;
    • a search narrows it, and clearing the search un-narrows it;
    • a filter with a picking pattern narrows it.
  • cvcgl_imgui_settings, two new checks on a bare ImGui context:
    • with an exclude-only filter, a click on the group's header closes it: the keys under it stop being drawn. Under the old rule the next frame reopened it, so this check fails there;
    • a filter that picks keys draws a group open even with open: false.

Checked (local Linux Release, on master after the rebase)

  • ariadne_settings_test, ariadne_loader_test, ariadne_ftxui_test and cvcgl_imgui_settings pass.
  • clang-format 18.1.8 (cvcpkg) on the changed lines: no changes.
  • Combined with cars_settings: one settings: editor over nav.reach_tol, nav.vehicle and nav_plant #1389's cars_settings (in a local pycvc_gl.cars offscreen shot, window made taller):
    • Vehicle and Plant start open, as its groups: say;
    • the nested modulation and plan start closed (I did not click them there; the ImGui test covers a header click).
  • Under the old rule, both new tests fail: the ImGui header click leaves the group open (3 rows drawn), and the core test fails its narrowed checks.

Base automatically changed from feat/ariadne-settings-editor to master November 20, 2026 07:22
@transfix
transfix force-pushed the fix/settings-narrowed-rule branch from 883de85 to 797e9d2 Compare November 20, 2026 07:42
@transfix
transfix enabled auto-merge (squash) November 20, 2026 19:44
…very group

Any filter: set the spec's narrowed flag, and ImGui then forced every group header open on
every frame. That included a filter made only of '-' patterns, which just leaves keys out. So
a user could not collapse a group, and open: / groups: had no say (pycvc_gl.cars' Settings
window hides the plant's build keys this way).

Now a search narrows the list, and so does a filter with a pattern that picks keys. Both still
draw every group open, so no match hides in a closed one. A filter of '-' patterns leaves the
groups to open: and groups:, and each one opens and closes by hand.

Tests:
- ariadne_settings_test: an exclude-only filter isn't narrowed; a search or a picking pattern
  is;
- cvcgl_imgui_settings: a click on a header closes its group under an exclude-only filter, and
  a picking filter draws a group open with open: false.
Both fail under the old rule. docs/ARIADNE.md §4 says which filters narrow.
…e test too

On Windows the test and libcvcGL each have their own imgui globals. The new filter checks open a
second and a third Session, but ImGui::CreateContext leaves an earlier context current. So the
test's own GetIO/NewFrame/Render kept going to the first context, while ImGuiBackend drew into
the new one, which never had a NewFrame: imgui.cpp asserted g.WithinFrameScope
(package-windows / libcvc-release). Each Session now calls ImGui::SetCurrentContext on its
context, as cvcgl_imgui_chat_widgets' does.
@transfix
transfix force-pushed the fix/settings-narrowed-rule branch from 89dba0f to 358b6d2 Compare November 20, 2026 22:49
@transfix
transfix merged commit 1a0775a into master Nov 21, 2026
29 checks passed
@transfix
transfix deleted the fix/settings-narrowed-rule branch November 21, 2026 04:38
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