Skip to content

feat(web): add workspace-aware terminal panel layout#1690

Open
justsomelegs wants to merge 4 commits intopingdotgg:mainfrom
justsomelegs:t3code/terminal-layout-and-shell
Open

feat(web): add workspace-aware terminal panel layout#1690
justsomelegs wants to merge 4 commits intopingdotgg:mainfrom
justsomelegs:t3code/terminal-layout-and-shell

Conversation

@justsomelegs
Copy link
Copy Markdown

@justsomelegs justsomelegs commented Apr 2, 2026

What Changed

Added workspace-aware terminal layout options in the web app.

Screenshot 2026-04-02 154906 Screenshot 2026-04-02 162503
example.mp4

This PR:

  • adds terminal position settings for bottom and right
  • adds bottom terminal scope settings so the bottom terminal can either:
    • match the chat width, or
    • span the full workspace width
  • moves terminal placement out of ChatView and into the route/workspace layout
  • replaces the old terminal drawer naming with ThreadTerminalPanel
  • adds a shared right-side workspace panel so diff and terminal can use the same right rail
  • makes the wide right rail use the shared sidebar primitive again, with an inline/workspace mode
  • keeps narrow right-side behavior as a sheet
  • adds persistence for linked vs independent right-rail widths
  • fixes Windows startup issues caused by invalid terminal open/resize dimensions
  • removes the left terminal position after trying it and deciding it was not a good fit

Why

The built-in terminal was previously hard-wired to a bottom drawer inside the chat area. That caused a few UX problems:

  • the bottom terminal could not span the full workspace when the diff panel was open
  • there was no way to place the terminal on the right
  • the right-side diff and terminal could not share one clean panel
  • terminal layout logic was tied too closely to chat rendering

This approach keeps the bottom workspace-scoped terminal working while making the terminal placement a real workspace concern instead of a chat-only concern. It also reuses the shared sidebar primitive for the wide right rail so the panel behavior is much closer to the existing main-branch sidebar behavior instead of relying on a separate custom animation system.

UI Changes

Before:

  • terminal only opened as a bottom drawer inside the chat area
  • bottom terminal width was constrained by the chat column
  • no right-side terminal option
  • diff and terminal could not share a single right panel

After:

  • terminal can be positioned at the bottom or on the right
  • bottom terminal can either match chat width or span the full workspace
  • right-side terminal uses the same right workspace rail as diff
  • on narrow screens, right-side terminal falls back to a sheet
  • right rail width can be linked with diff or remembered separately

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add workspace-aware terminal panel with bottom and side layout support

  • Renames ThreadTerminalDrawer to ThreadTerminalPanel and adds layout prop ('bottom' | 'side'); side layout fills available height without a resize handle, bottom layout preserves draggable height clamped to workspace bounds.
  • Adds resolveWorkspacePanels and useWorkspacePanelController to centrally derive panel visibility, toggle states, and terminal dock target (bottom-inline, bottom-workspace, right, or null).
  • Introduces WorkspaceRightRail, WorkspaceSideSheet, and WorkspacePanelLayout components; the chat thread route mounts diff and terminal in a shared right rail with persisted widths.
  • Adds three new client settings — terminalPosition, terminalBottomScope, and terminalRightRailWidthMode — with UI controls in the General settings panel and legacy 'left' position migrated to 'bottom'.
  • Updates isTerminalFocused and xterm CSS selectors to use .thread-terminal-panel instead of .thread-terminal-drawer.
  • Risk: duplicate gitCreateWorktreeMutationOptions import in ChatView.tsx will cause a TypeScript compile error.

Macroscope summarized 2c154b3.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9a779115-1e8b-46ab-907a-75a52c339a52

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 2, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 2, 2026

Approvability

Verdict: Needs human review

This PR introduces a substantial new feature for terminal panel layout with multiple positioning options (bottom/right), workspace-spanning modes, and new settings. The ~1400 additions include 6 new files with new components, hooks, a portal system, and schema changes. New user-facing capabilities of this scope warrant human review.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant