Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Background git status refreshes can take an optional index lock (e.g. via git status).
In CI this occasionally races with test git commit commands, causing commits to fail and the gitStatus UI integration test to flake.

This change sets GIT_OPTIONAL_LOCKS=0 in the generated git status script so background status checks don't contend with foreground git operations.

Validation:

  • make static-check
  • Re-ran tests/ui/gitStatus.integration.test.ts repeatedly to confirm flake is gone

Generated with mux • Model: openai:gpt-5.2 • Thinking: xhigh

Implements an IDE-like dock-lite sidebar with nested split/tabset layout:

- Terminal tab embedded in RightSidebar (stable, not destroyed on tab switch)
- Tab dragging with @dnd-kit for reliable click vs drag disambiguation
- Edge docking to create horizontal/vertical splits
- Unified sidebar width across all tabs (resizing affects all equally)
- Layout state persisted in localStorage

Technical highlights:
- Migrated from react-dnd HTML5Backend to @dnd-kit with PointerSensor
- 8px distance activation constraint prevents accidental drags
- DragOverlay for smooth cursor-following preview
- No tooltip interference (not built on HTML5 Drag API)
- Proper MUX_ROOT support for e2e tests

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
When switching between workspaces (e.g., SSH → Local), the TerminalTab
was passing the old workspace's session ID to TerminalView before the
useEffect synced the state. This caused errors like 'trying to open SSH
terminal for local project'.

Fix: Read sessionId directly from the Map instead of caching in useState.
The Map lookup always returns the correct session for the current
workspaceId, eliminating the timing bug.

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
Sidebar layout (splits, tabs, terminal instances) is now stored per-
workspace instead of globally. This allows each workspace to have its
own pane configuration, including different numbers of terminals.

Global settings that remain shared across workspaces:
- Sidebar width (prevents layout flash when switching)
- Collapsed state

Changes:
- RIGHT_SIDEBAR_LAYOUT_KEY → getRightSidebarLayoutKey(workspaceId)
- Command palette layout commands only available with workspace context
- Updated stories and tests to use workspace-specific keys

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
…handoff

- Clear output buffer when workspaceId changes to prevent cross-workspace contamination
- Add pop-out button to Terminal tab header with ExternalLink icon
- Implement seamless session handoff: pass sessionId to pop-out window so existing PTY session is preserved
- Show placeholder in embedded terminal after pop-out
- Update API schema to support sessionId in terminal.openWindow
- Extended TabType to support multiple terminal instances (terminal, terminal:2, etc.)
- Added Terminal icon to all terminal tab headers
- Terminal titles now update dynamically from OSC escape sequences (shell sets window title)
- Pop-out removes the tab entirely (session continues in new window)
- Added '+' button to add new terminals
- Added close button (X) on terminal tabs when multiple terminals exist
- Each terminal instance has its own session (keyed by workspaceId + instanceId)
- Removed terminal from default sidebar tabs (users add via '+' button)
- X close button now always visible on terminal tabs
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d56e906158

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +59 to +63
export function getDefaultRightSidebarLayoutState(activeTab: TabType): RightSidebarLayoutState {
// Default tabs exclude terminal - users add terminals via the "+" button
const baseTabs: TabType[] = ["costs", "review"];
const tabs = baseTabs.includes(activeTab) ? baseTabs : [...baseTabs, activeTab];

Choose a reason for hiding this comment

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

P1 Badge Restore default terminal tab in new sidebar layouts

The new right sidebar layout builder now seeds fresh layouts with only the Costs and Review tabs (baseTabs), explicitly omitting the terminal. With localStorage cleared or a brand-new workspace, the sidebar renders no Terminal tab, so the keyboard shortcut and the new integration tests that click the Terminal tab (and the nextTerminalIdRef assumption that terminal 1 already exists) fail—users must manually add a terminal just to see the tab.

Useful? React with 👍 / 👎.

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