Skip to content

fix: layout restore, agent-aware running tree, cleaner Terminal view (v7.14.4)#253

Merged
vakovalskii merged 1 commit into
mainfrom
fix/layout-restore-running-tree-toolbar
Jul 20, 2026
Merged

fix: layout restore, agent-aware running tree, cleaner Terminal view (v7.14.4)#253
vakovalskii merged 1 commit into
mainfrom
fix/layout-restore-running-tree-toolbar

Conversation

@vakovalskii

Copy link
Copy Markdown
Owner

What & why

Three fixes reported while using the desktop app:

1. Saved layouts didn't restore commands or folders

_wsCaptureLayout and the server's sanitizePane only stored a pane's cmd. Panes opened from session cards use prefill (a resume command typed but not auto-run), and every pane's cwd was dropped — so restoring a layout reopened panes in the home dir with no command. Now each pane records cmd + prefill + cwd, validated server-side (control chars rejected; the pty still re-gates cwd via isSafeLaunchPath), 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/activeactiveSessions): 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 in render().

Testing

  • node --test test/*.test.js → 184 pass, 2 skipped (added 2 layout tests for prefill/cwd preservation + rejection of control chars).
  • Browser-verified: toolbar hides in workspace/overview, shows in sessions; running tree groups by real folder and shows agent names + idle flags; full layout save→GET roundtrip preserves prefill + cwd.

🤖 Generated with Claude Code

…(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>
@vakovalskii
vakovalskii merged commit 0a4cc46 into main Jul 20, 2026
6 checks passed
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