fix: layout restore, agent-aware running tree, cleaner Terminal view (v7.14.4)#253
Merged
Merged
Conversation
…(v7.14.4) - Saved layouts now capture each pane's working directory (cwd) and any prefilled-but-unrun command, and restore them — previously only cmd was stored, so restored panes opened in the home dir with no command. - Rewrote the sidebar running tree to build from real agent detection (/api/active) instead of Workspace pane initial cwd: groups running agents by their actual project folder and labels each by agent name with a live/idle dot. Fixes detection when an agent cd'd elsewhere or was started outside the app. - Hid the session toolbar in the Terminal and Overview views via a body[data-view] attribute, since neither has a session list to act on. 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.
What & why
Three fixes reported while using the desktop app:
1. Saved layouts didn't restore commands or folders
_wsCaptureLayoutand the server'ssanitizePaneonly stored a pane'scmd. Panes opened from session cards useprefill(a resume command typed but not auto-run), and every pane'scwdwas dropped — so restoring a layout reopened panes in the home dir with no command. Now each pane recordscmd+prefill+cwd, validated server-side (control chars rejected; the pty still re-gates cwd viaisSafeLaunchPath), and restore reopens each pane in its project folder and re-issues its command.2. Running tree now agent-aware
The sidebar tree was built from Workspace panes' initial cwd, so it missed agents that
cd'd elsewhere or were started outside the app, and it repeated the project name instead of naming the agent. Rewrote it to build from real agent detection (/api/active→activeSessions): groups running agents by their actual project folder, labels each by agent name (Claude, Codex, …) with a live/idle dot. Clicking jumps to a matching live pane, else opens the session.3. Cleaner Terminal / Overview
Hid the session toolbar (search / group / select / AI titles / count) in the Terminal and Overview views — neither has a session list to act on. Driven by a
body[data-view]attribute set inrender().Testing
node --test test/*.test.js→ 184 pass, 2 skipped (added 2 layout tests for prefill/cwd preservation + rejection of control chars).prefill+cwd.🤖 Generated with Claude Code