th-d5b446: th code TUI conversation sidebar (resume + new)#182
Merged
Conversation
Adds a togglable conversation sidebar to the `th code` TUI for parity with the daemon PWA sidebar. Ctrl+B opens a left-anchored overlay (same pattern as the model picker — inline-viewport mode has no persistent pane) listing saved coding sessions newest-first with the active session highlighted, plus a "New conversation" entry. Built on the existing local session store (crate::session:: SessionManager) — Enter resumes the selected session by loading its history into the live AppState via the existing resume path, or starts a fresh conversation; `n` shortcuts new-chat; Esc closes. Current session is saved before switching so nothing is lost. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: d765c2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…th-bench The CI runner bumped stable clippy to 1.97, whose clippy::all (deny) now flags a redundant `&` on a format! argument in pr_harvest.rs that 1.96 accepted. Pre-existing code, unrelated to the sidebar, but it fails the Clippy step for every PR against main. One-char fix: drop the redundant borrow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two more pre-existing clippy::all (deny) lints newly raised by the CI runner's stable clippy bump to 1.97: - web_search.rs: question_mark — rewrite the quote-prefix if/else chain to strip_prefix().map().or_else()? - model_picker.rs test: useless_borrows_in_formatting — drop redundant & in an assert! format arg. Verified clean with `cargo +1.97 clippy --workspace --all-targets`. Unrelated to the sidebar; unblocks CI for every PR against main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The
th codeTUI had no way to browse or switch between saved coding sessions from within the UI — you had to quit and relaunch withth code --resume <query>. The daemon PWA already has a conversation sidebar; this brings the TUI to parity.Solution
A togglable conversation sidebar built entirely on the TUI's existing local session store (
crate::session::SessionManager) — no new persistence layer, no server round-trip.AppStatevia the existing resume path) or starts a fresh one;nis a new-chat shortcut; Esc closes.New module
session_picker.rs(state + selection logic),AppState::resume_from/start_new_conversation(in-place session swap), a render overlay, and Ctrl+B wiring. Footer hint updated toCtrl+B chats.Verification
cargo fmt --check,cargo clippy, andcargo test -p smooai-smooth-codeall green in an isolated target dir (257 tests pass, incl. 7 new: session ordering/selection + relative-time bucketing). No new clippy warnings attributable to this change.🤖 Generated with Claude Code