fix(terminals): show script tabs alongside terminals in the drawer - #3107
Open
claude[bot] wants to merge 2 commits into
Open
fix(terminals): show script tabs alongside terminals in the drawer#3107claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
Drop the Terminals/Scripts mode toggle from the terminal drawer tab bar and render both groups in the same row: terminal tabs and the new-terminal button in the scrolling region on the left, script tabs pinned right after the divider. The divider and script group are omitted when no scripts are configured. The panel no longer keeps a separate mode state; the active terminal, script, session, and pane-scope store are derived from the persisted active drawer item instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X72hpiKUWt5CvF1YBiuChd
Contributor
Greptile SummaryThis PR removes the terminal/script mode toggle and displays lifecycle-script tabs beside terminal tabs while deriving panel state directly from the persisted active item.
Confidence Score: 4/5The layout overflow should be fixed before merging because narrowing the drawer can make terminal or script controls unreachable. The new always-visible script group cannot shrink or scroll inside an overflow-clipped row, so configured scripts can consume the available drawer width and hide interactive controls. Files Needing Attention: apps/emdash-desktop/src/core/features/terminals/browser/task-terminal/terminal-drawer-tab-bar.tsx
|
| Filename | Overview |
|---|---|
| apps/emdash-desktop/src/core/features/terminals/browser/task-terminal/terminal-drawer-tab-bar.tsx | Renders terminal and script tablists concurrently, but the pinned non-scrollable script group can make controls unreachable in a narrow drawer. |
| apps/emdash-desktop/src/core/features/terminals/contributions/browser/task-terminal/terminal-panel.tsx | Removes mode state and consistently derives the active session and pane-scope provider from the resolved active item. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Drawer[Terminal drawer row]
Terminals[Scrollable terminal tabs]
NewTerminal[New-terminal control]
Divider[Divider]
Scripts[Pinned script tabs]
Drawer --> Terminals
Terminals --> NewTerminal
Drawer --> Divider
Divider --> Scripts
Prompt To Fix All With AI
### Issue 1
apps/emdash-desktop/src/core/features/terminals/browser/task-terminal/terminal-drawer-tab-bar.tsx:145
**Pinned scripts overflow the drawer**
When the drawer is narrow and several lifecycle scripts are configured, this non-shrinking script group consumes the available width inside an overflow-clipped row, collapsing the terminal region and clipping rightmost script controls with no way to scroll to them.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(terminals): show script tabs alongsi..." | Re-trigger Greptile
The pinned script group did not shrink, so in a narrow drawer it pushed the terminal tablist down to nothing and the outer overflow-hidden row clipped the rightmost script tab with no way to scroll to it. Let the script group shrink and scroll like the terminal tablist, and give the terminal tablist a minimum width so its tabs and the new-terminal button stay usable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X72hpiKUWt5CvF1YBiuChd
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.
Requested via Slack thread
Description
Before: The terminal drawer tab row shows either terminal tabs or script tabs, chosen with a Terminals/Scripts toggle on the right. Reaching a script's Run/Stop control takes an extra click, and script status is not visible while the terminals view is showing.
After: Both groups are always in the row. Terminal tabs (creation order) and the new-terminal button sit in the scrolling region on the left; script tabs (Prepare, Setup, Run, Teardown, configured ones only) are pinned on the right after the divider, with their status icons and Run/Stop actions as before. When no scripts are configured, the divider and script group are not rendered.
How:
terminal-drawer-tab-bar.tsxdrops theTabstoggle and themode/onModeChangeprops and renders the tworole="tablist"groups side by side.terminal-panel.tsxremoves themodestate (and the effect and handler that kept it in sync) and derives the active terminal, script, session, and pane-scope store fromactiveItem.kind, which already comes from the persisted drawer memento. The unreachable "No scripts configured" empty state is removed.Related issues
None.
Testing
pnpm run format:check,pnpm run lint,pnpm run typecheckinapps/emdash-desktopvitest run --project node src/core/features/terminals src/core/features/workspaces/browser/lifecycle-scripts.test.ts(9 files, 51 tests)vitest run --project browserforterminal-panel-focus.browser.test.tsxandterminal-shell-menu.test.tsx(2 files, 4 tests)Screenshot/Recording (if applicable)
Not yet captured.
Checklist
messages and, when possible, the PR title
馃 Generated with Claude Code
https://claude.ai/code/session_01X72hpiKUWt5CvF1YBiuChd
Generated by Claude Code