feat(tui): add startup session picker - #225
Conversation
Resolve workspace paths inside the isolated discovery worker so stalled canonicalization cannot block signal handling or runtime teardown. Use a portable raw pointer for the PTY window size on Linux and macOS.
There was a problem hiding this comment.
Inline rename can still prevent process exit after picker cancellation: its filesystem work runs in Tokio鈥檚 blocking pool, so stalled I/O keeps runtime teardown waiting even after the terminal is restored. This previously reported issue remains deferred; workspace-canonicalization cancellation is addressed.
Use a narrow footer fixture and wait for restored help instead of requiring an exact run of terminal clearing spaces.
There was a problem hiding this comment.
The previously reported inline-rename shutdown issue remains: filesystem I/O stalled inside the rename's spawn_blocking task can keep Tokio runtime teardown waiting after picker cancellation. The shutdown-policy change is explicitly deferred, and the existing thread remains unresolved.
Isolate cancellable rename reads and preflight from recovery state. Fence prepared replacements by revision before admitting writes. Drain admitted commits after terminal restoration to preserve recovery.
Do not invalidate prepared renames on observational status reads or provably idle recovery. Keep fencing for mutation and cleanup work. Add a regression through the production recovery path and consolidate redundant test scenarios, eliminating 27 process launches while keeping distinct storage, shutdown, and terminal behavior assertions.
|
Follow-up in 724a9a0: fixed an interaction found during the full-branch review where idle background recovery invalidated prepared renames. Observational status reads and genuinely idle recovery now preserve the revision; mutations and cleanup still invalidate it. The production-path regression failed before the fix and passes afterward. Also consolidated redundant signal/stall permutations and overlapping success/cancellation tests: 27 fewer explicit process launches, retaining all distinct storage and shutdown safety assertions. Full local macOS verification and Linux arm64 default/headless suites, lint, builds and smoke checks passed. Linux headless required one full retry after the previously observed concurrent projection-test failure; original failure logs were preserved. Independent fencing and coverage reviews found no actionable issues. |
Summary
kit tui --resume, preserving explicit-ID resume and ordinary startup.--forceprotections.Closes #219
Validation
mise run test -- -- --test-threads=1passed with temporary HOME and Git configuration isolation.mise run lintpassed: formatting and Clippy with all features and no default features.Existing test-environment issues
The ordinary full-suite run reproduced four failures on clean baseline
735409eas well as this branch: two shell assertions polluted by a missing Atuin file in the local.profile, a file-search fixture affected by global Git ignores, and an existing parallel projection-queue test race. The complete suite passes with temporary empty HOME, temporary Git configuration explicitly settingcore.excludesFile=/dev/null, and serial execution. No user configuration or unrelated tests were modified.