The tui should keep track of the active last project #61

Closed
opened 2026-08-05 10:44:38 +00:00 by hugo · 1 comment
Owner

When closing the tui, it should persist the last selected server so it can start with that on next start.

When closing the tui, it should persist the last selected server so it can start with that on next start.
hugo added this to the first feature complete release milestone 2026-08-05 10:44:38 +00:00
hugo added the bug label 2026-08-05 10:44:38 +00:00
Author
Owner

Implemented in c1cfaa3.

  • Added tui.last_server to the shared CLI configuration and save it atomically when the TUI exits cleanly.
  • Startup now restores that server before repository-based inference; an explicit --server NAME still takes precedence and becomes the remembered server after exit.
  • Server renames migrate the remembered name, deletions choose a remaining valid profile or clear it, and stale legacy values safely fall back.
  • Updated TESTING.md and added regression coverage for round-trip persistence, rename/deletion handling, remembered startup, explicit override, and stale-name fallback.

Verification:

  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (49 passed)
  • Live normal-terminal verification with the two configured profiles: switched from git.rfc1437.de to codeberg.org in the Servers screen, quit, and confirmed a no-argument relaunch restored codeberg.org; also confirmed --server git.rfc1437.de overrides and becomes the subsequent restored profile. The original git.rfc1437.de selection was restored after testing.

This is a TUI issue, so no iPhone release build or deployment was performed, as requested.

Implemented in `c1cfaa3`. - Added `tui.last_server` to the shared CLI configuration and save it atomically when the TUI exits cleanly. - Startup now restores that server before repository-based inference; an explicit `--server NAME` still takes precedence and becomes the remembered server after exit. - Server renames migrate the remembered name, deletions choose a remaining valid profile or clear it, and stale legacy values safely fall back. - Updated `TESTING.md` and added regression coverage for round-trip persistence, rename/deletion handling, remembered startup, explicit override, and stale-name fallback. Verification: - `cargo fmt --all -- --check` - `RUSTFLAGS="-D warnings" cargo check --workspace --all-targets` - `cargo clippy --workspace --all-targets -- -D warnings` - `cargo test --workspace` (49 passed) - Live normal-terminal verification with the two configured profiles: switched from `git.rfc1437.de` to `codeberg.org` in the Servers screen, quit, and confirmed a no-argument relaunch restored `codeberg.org`; also confirmed `--server git.rfc1437.de` overrides and becomes the subsequent restored profile. The original `git.rfc1437.de` selection was restored after testing. This is a TUI issue, so no iPhone release build or deployment was performed, as requested.
hugo closed this issue 2026-08-05 15:51:06 +00:00
Sign in to join this conversation.