feat(tui): api backends in the Settings Connection category#56
Merged
Conversation
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.
Completes the settings-parity ask (the bit deferred from #54). The Settings → Connection category now also exposes the active profile's
[api]vrfandroute_targetbackends as rest/graphql cycles (Left/Right/Space), alongsidepage_size/timeout_secs/exclude_config_context.Reuses the established pattern end-to-end
ConnectionSeedcarries the twoBackendPreferencevalues, seeded from the active profile'sapi_preference.apply_connection_settingsnow includes the api backends in change-detection, persists them viapersist_profile(which already writes[api]), updates the live profile'sApiConfig(build_api_config), and reconnects to hot-apply. Unchanged ⇒ no reconnect.Tests
settings_connection_api_backends_cycle_rest_graphql— the rest↔graphql cycle, independent per surface.settings_save_api_backend_persists_to_profile_and_reconnects— end-to-end save persists[api] vrf=graphqlto the active profile + emits a reconnect.Gate
fmt ✓ · clippy
--all-features✓ · clippy--no-default-features✓ · tests ✓ (950 / 855).