Skip to content

feat(sidebar): close a workspace terminal from its sidebar card - #87

Merged
SPhillips1337 merged 1 commit into
mainfrom
feat/sidebar-close-session
Nov 11, 2026
Merged

SPhillips1337 merged 1 commit into
mainfrom
feat/sidebar-close-session

Conversation

@SPhillips1337

Copy link
Copy Markdown
Contributor

Summary

  • Hovering or focusing a terminal card in the workspace Terminals tab replaces its ● / ○ status glyph with a × that closes the pane.
  • Uses the same closePane path as the pane header's ×, so an editor with unsaved text still asks first.
  • The card becomes two sibling buttons (open / close), like the Shared Ports rows, so the markup stays valid and keyboard-reachable. Light theme styled.
  • Screens, Connections and pending (not connected) rows are unchanged.

Verification

  • npm run typecheck ✅, npm run build ✅, npm test ✅ (134 files, 2406 passed)
  • Not yet checked live in Electron.

🤖 Generated with Claude Code

Hovering (or keyboard-focusing) a terminal card in the workspace's
Terminals tab swaps its status glyph for a cross that closes the pane,
through the same closePane path as the pane header's close button, so
an unsaved editor still prompts first. Screens, connections and pending
rows are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The implementation correctly adds a close button to workspace terminal cards in the sidebar, following the same two-sibling-button pattern as Shared Ports rows. The PR is well-structured with no merge-blocking defects found.

What was reviewed:

  • SessionRow refactoring in main.tsx: The component correctly branches on onClose presence, rendering a <div className="closable-row"> with two sibling buttons when closable. The state glyph is rendered as a sibling flex item that gets hidden on hover/focus-within via CSS.
  • CSS additions in styles.css: .closable-row, .row-open, .row-close follow the same pattern as .forward-row/.forward-open/.forward-close. Light-theme corrections for .row-close and .row-close:hover are properly included.
  • The call site (line 4231) passes onClose={() => void closePane(session)} only for workspaceSessions, consistent with the PR scope.
  • The closePane async path (unsaved-editor guard, voice cancel, listing cleanup) is reused unchanged — the sidebar close goes through the exact same code as the pane header ×.

Passes: npm run typecheck, npm run build, npm run test per PR description. No issues blocking merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@sonarqubecloud

Copy link
Copy Markdown

@SPhillips1337
SPhillips1337 merged commit e1a31de into main Nov 11, 2026
3 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