Conversation
The review window's content panes each `exec` a process (editor, git difftool, review agent) so the pane dies when that process exits. Quitting Vim with `:q` (or the difftool exiting) used to leave the window showing a dead/empty pane with no way back short of reloading the whole task. Recover on the normal poll cadence, split by which loop can observe the death: - Mid content pane (Vim/difftool): the review panel's own loop detects a dead middle pane via `review_ui::mid_content_pane_dead` and falls the view back to Chat through the existing `ShowChat` path (`recover_to_chat` mirrors the Chat switch click), so recovery converges with the manual path. - Nav/panel pane: the panel is run-once and can't rebuild itself, so the dashboard sidebar loop (`App::poll_review_panes` -> `review_panel_pane_dead`) rebuilds it — `poll_active_window` only fires on a window *change*, so this catches a panel that dies while its window is already current. - `ensure_editor_pane`/`ensure_diff_pane` now treat a stashed-but-dead pane id as absent (`pane_alive_anywhere`), so re-selecting a view rebuilds the pane fresh instead of swapping in a corpse. - `show_review_view` handles a dead current-mid: a killed mid pane collapses the window to just its panel, so there's nothing to swap against — join the target beside the panel instead (the clamp hook re-clamps the width). Decisions made without asking (spec was prescriptive): - Chat/agent-pane death while Chat is the mid view is left to the existing workspace supervisor (window-level auto-restart), not duplicated here — the review UI's reuse guards just avoid trusting stale ids. Reviving a crashed agent is a workspace-lifecycle concern, not review-window layout. - Recovery is gated to the *active* review window (`review_window_active`) so a Back-to-dashboard (FocusDashboard) or the quit teardown never triggers a rebuild, per the "distinguish teardown from in-place death" requirement. - Dead-mid recovery uses `join-pane` (verified against tmux 3.7b: a dead swapped-in pane strands chat in its stash window and collapses the review window) rather than a full teardown+respawn, to preserve the panel and avoid a dashboard flicker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jlong
deleted the
jlong/tui-reload-review-window-panes-when-they-exit-vim-diff-chat-nav-defaulting-the-mid-view-back-to-chat
branch
August 15, 2026 23:54
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.
Task
The review window is composed of panes (a navigation sidebar plus a "mid" view that can be Chat / Diff / Edit-in-Vim / Browser). Each content pane runs an
exec'd process (exec $EDITOR,exec git difftool, …) so the pane dies when that process exits. Today, when a pane's process quits, the review window is left with a dead/empty pane instead of recovering — the user has to leave and reload the whole task.We want the review window to detect any of its panes exiting and recover automatically, so quitting a tool never leaves a broken window.
Current Behavior
:qout of Vim → the editor pane is now dead/empty. Nothing switches the view or rebuilds the pane; the review window is left in a broken state.git difftoolexits, the chat pane's process exits, or the navigation pane dies, the window is left with a dead pane and no recovery.Expected Behavior
:q, difftool exits): detect the dead pane and switch the mid view back to Review chat (the default view). The window is never left showing a dead pane.exec'd process), not try to re-focus the dead one. The existing reuse guard should treat a dead pane as absent so the view is recreated on demand.Technical Details
crates/shelbi-orchestrator/src/review_ui.rs, keyed by tmux session vars (MID_KEY,PANEL_KEY,EDITOR_KEY,DIFF_KEY,CHAT_KEY,TASK_KEY). Theensure_*_panehelpers already reuse an existing pane id viaread_session_var; extend that so a dead pane id (tmux reports the pane no longer alive) is treated as absent and recreated, rather than reused.pane_alive); the sidebar/review loop already runs a poll tick (poll_review_load, and nowpoll_active_window) where apoll_review_panes(or equivalent) check fits.crates/shelbi-tui/src/review_panel.rs,ActiveView/PanelEffect). Falling back to Chat on a dead mid pane should reuse the existing view-switch path (PanelEffect::ShowChat/ the Chatactivate_row) so it converges with the click path, mirroring the window-switch convergence just shipped.FocusDashboard) from an in-place pane death so recovery only fires while the review window is still the active context.Acceptance Criteria
:q) in the review window auto-switches the mid view to Review chat; no dead/empty pane remains.Auto-opened by Shelbi — review at: /Users/jlong/.shelbi/projects/shelbi/tasks/tui-reload-review-window-panes-when-they-exit-vim-diff-chat-nav-defaulting-the-mid-view-back-to-chat.md