Skip to content

fix(tui): don't clear transcript when focusing a welcome-screen split pane#444

Merged
edwin-zvs merged 1 commit into
mainfrom
fix/split-welcome-transcript-clear
Jun 23, 2026
Merged

fix(tui): don't clear transcript when focusing a welcome-screen split pane#444
edwin-zvs merged 1 commit into
mainfrom
fix/split-welcome-transcript-clear

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary

  • When a session is deleted in a split layout, its pane reverts to the welcome screen (Selection::None)
  • Switching focus to that welcome-screen pane called transcript.clear() + transcript_session = None
  • selected_needs_hydration() short-circuits immediately for None so the transcript was never reloaded
  • Every other split pane then rendered render_chat against the empty transcript, showing "No structured chat events for this session. Use Terminal Mode to view PTY output." for all sessions

Fix: guard the transcript.clear() / transcript_session = None block behind selection.session_id().is_some(). The welcome screen pane returns from render_detail at render_empty_session_state before ever reaching render_chat, so leaving a stale transcript in memory is harmless.

Repro steps

  1. Open TUI with a split layout (two sessions visible)
  2. Delete one of the sessions — its pane shows the welcome screen
  3. Switch focus to the other (live) session pane, then switch back to the welcome-screen pane
  4. Before fix: all split panes now show "No structured chat events"
  5. After fix: the live session panes continue to render correctly

Test plan

  • Reproduce the steps above and confirm live session panes remain intact after focusing the welcome-screen pane
  • Confirm the welcome screen still renders correctly when focused
  • cargo check passes with no new errors

🤖 Generated with Claude Code

… 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.
@edwin-zvs
edwin-zvs merged commit c2dff6a into main Jun 23, 2026
1 of 2 checks passed
@edwin-zvs edwin-zvs mentioned this pull request Jun 23, 2026
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