feat(tui): connection knobs in the Settings modal with hot-apply#54
Merged
Conversation
Add a Connection category to the Config modal's Settings section exposing the ACTIVE profile's page_size, timeout_secs, and exclude_config_context, seeded from the live profile. Saving a change persists it to that profile (format-preserving, reusing persist_profile) and reconnects through the existing switch path so it hot-applies — the client bakes these at construction. An unchanged connection ⇒ no reconnect, just the plain "settings saved". The widgets reuse existing Settings patterns: page_size/timeout_secs are numeric text fields (like refresh_secs), exclude_config_context is a Left/Right/Space toggle (like the cache on/off). The profile editor stays the place to manage any profile; Settings is the quick-tweak surface for the active one. Deferred: the per-surface api backends (vrf/route_target) as Settings cycles — already editable in the profile editor (Ctrl+B/Ctrl+R), low marginal value; tracked on the ROADMAP. Tests: Connection category seeding, the exclude toggle, non-numeric page_size validation, and an end-to-end save that persists page_size to the active profile + emits a reconnect; updated the two settings-save tests + the category-nav test for the new category order.
This was referenced Jun 21, 2026
lance0
added a commit
that referenced
this pull request
Jun 21, 2026
Complete the settings-parity ask (deferred from #54): the Settings → Connection category now also exposes the active profile's [api] vrf and route_target backends as rest/graphql cycles (Left/Right/Space), alongside page_size / timeout_secs / exclude_config_context. Reuses the established pattern end to end: ConnectionSeed carries the two BackendPreference values (seeded from the active profile's api_preference), the cycle mirrors the theme/toggle widgets, and on save apply_connection_settings now includes the api backends in change-detection, persists them via persist_profile (which already writes [api]), updates the live profile's ApiConfig (build_api_config), and reconnects to hot-apply. Unchanged ⇒ no reconnect. Tests: the rest↔graphql cycle (independent per surface) and an end-to-end save that persists [api] vrf=graphql to the active profile + reconnects; extended the seeding test to assert the api fields and the full five-knob category.
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.
Final item of the Settings-parity work. Adds a Connection category to the Config modal's Settings section exposing the active profile's
page_size,timeout_secs, andexclude_config_context, seeded from the live profile.Behavior
persist_profile) and reconnects through the existing switch path so it hot-applies — the client bakes these at construction.[ui]/cache path is untouched).page_size/timeout_secsare numeric text fields (likerefresh_secs);exclude_config_contextis a Left/Right/Space toggle (like cache on/off).Deferred (tracked on ROADMAP)
The per-surface
apibackends (vrf/route_target) as Settings cycles — already editable in the profile editor (Ctrl+B/Ctrl+R), so low marginal value.Tests
New: Connection-category seeding, the exclude toggle, non-numeric
page_sizevalidation, and an end-to-end save that persistspage_sizeto the active profile + emits a reconnect. Updated the two settings-save tests + the category-navigation test for the new category order.Gate
fmt ✓ · clippy
--all-features✓ · clippy--no-default-features✓ · tests ✓ (948 / 853).