Skip to content

feat(tui): api backends in the Settings Connection category#56

Merged
lance0 merged 1 commit into
masterfrom
feat/settings-api-backend-cycles
Jun 21, 2026
Merged

feat(tui): api backends in the Settings Connection category#56
lance0 merged 1 commit into
masterfrom
feat/settings-api-backend-cycles

Conversation

@lance0

@lance0 lance0 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Completes the settings-parity ask (the bit 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 (two values → any cycle key flips).
  • 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

  • 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=graphql to the active profile + emits a reconnect.
  • Extended the seeding/category test to assert the api fields and the full five-knob Connection category.

Gate

fmt ✓ · clippy --all-features ✓ · clippy --no-default-features ✓ · tests ✓ (950 / 855).

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.
@lance0 lance0 merged commit 9fb27d8 into master Jun 21, 2026
4 checks passed
@lance0 lance0 deleted the feat/settings-api-backend-cycles branch June 21, 2026 22:02
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