Skip to content

feat: added terminal docking to right#1774

Open
atmikshetty wants to merge 4 commits intopingdotgg:mainfrom
atmikshetty:feat/terminal-right-dock
Open

feat: added terminal docking to right#1774
atmikshetty wants to merge 4 commits intopingdotgg:mainfrom
atmikshetty:feat/terminal-right-dock

Conversation

@atmikshetty
Copy link
Copy Markdown

@atmikshetty atmikshetty commented Apr 6, 2026

What Changed

  • Added a terminal dock toggle button next to the existing split terminal action in the thread terminal toolbar.
  • Terminals can now be docked either:
    • below the chat view, or
    • on the right side of the chat view.
  • Terminal dock position and right-dock width are persisted per thread.

Why

  • The terminal could previously only be docked below the chat view, which limited layout flexibility and made it harder to use alongside the conversation in wider desktop layouts.
  • The change fixes that by allowing the terminal to be docked to the right.
  • Also, the dock state persists, so users won't have to manually do it every time they open the app.

UI Changes

Terminal Docked to the right:
image

Works when the app is minimised as well:
image

Redocking back to below the chat:
image

Small Video showing the full change:
https://github.com/user-attachments/assets/3a6f0f84-5040-4dd1-b139-7c2e94650050

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

Medium Risk
Moderate UI/state changes: introduces persisted terminal dock/width with a storage migration and alters terminal resize/open behavior, which could regress layout or terminal sizing across existing users.

Overview
Adds a dock toggle to the thread terminal drawer so terminals can be displayed either below the chat view or docked to the right, including right-side resize handling and updated split-pane layout when docked right.

Persists the new per-thread terminalDock and terminalWidth in the terminal Zustand store (with a storage version bump + migration/normalization), updates ChatView to render right-docked drawers alongside the main content while keeping bottom-docked drawers below, and extends tests to cover dock/width behavior.

Additionally, the desktop electron-launcher now attempts to automatically run Electron’s install.js when require('electron') fails with the known “failed to install correctly” error, and package.json marks electron as a trusted dependency.

Reviewed by Cursor Bugbot for commit 4f328b1. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add right-side docking to the terminal drawer

  • Adds a dock toggle button to ThreadTerminalDrawer so users can switch the terminal between bottom and right-side docking.
  • Introduces terminalDock and terminalWidth to ThreadTerminalState, persisted per thread and migrated from legacy snapshots. Closing the last terminal now preserves dock/size preferences.
  • ChatView partitions mounted terminal drawers by dock position and renders right-docked terminals alongside the main layout, bottom-docked terminals below.
  • Adds clampTerminalDockWidth and resolveTerminalSplitGridStyle helpers to constrain right-dock widths and switch split-terminal grid orientation based on dock side.
  • Behavioral Change: selectThreadTerminalState now normalizes returned state, which may differ from raw persisted values for older stored states.

Macroscope summarized 4f328b1.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 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: 4957175e-4337-44d5-97a7-7945f6eb89f7

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 vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Apr 6, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 6, 2026

Approvability

Verdict: Needs human review

This PR adds a new user-facing feature (terminal docking to right side) with new state properties, storage migration logic, and UI layout changes. While well-tested and scoped to the terminal drawer area, new features introducing user-facing behavior warrant human review.

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

Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

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

probably wanna support vertical splits with this as well?

@atmikshetty
Copy link
Copy Markdown
Author

Yes, that should be added as well. @juliusmarminge should I implement this?

@juliusmarminge
Copy link
Copy Markdown
Member

Go for it!

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ea5a7fd. Configure here.

Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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.

2 participants