fix(tui): don't clear transcript when focusing a welcome-screen split pane#444
Merged
Merged
Conversation
… pane When a session is deleted in a split layout, its pane shows the welcome screen (Selection::None). Switching focus to that pane called transcript.clear() + transcript_session = None, but selected_needs_hydration() short-circuits for None so the transcript was never reloaded. Every other split pane then rendered render_chat against the empty transcript and showed "No structured chat events for this session." Fix: only clear the transcript when focusing a pane that has a real session to hydrate. The welcome screen never reaches render_chat so a stale transcript in memory is harmless.
Merged
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.
Summary
Selection::None)transcript.clear()+transcript_session = Noneselected_needs_hydration()short-circuits immediately forNoneso the transcript was never reloadedrender_chatagainst the empty transcript, showing "No structured chat events for this session. Use Terminal Mode to view PTY output." for all sessionsFix: guard the
transcript.clear()/transcript_session = Noneblock behindselection.session_id().is_some(). The welcome screen pane returns fromrender_detailatrender_empty_session_statebefore ever reachingrender_chat, so leaving a stale transcript in memory is harmless.Repro steps
Test plan
cargo checkpasses with no new errors🤖 Generated with Claude Code