Skip to content

feat(desktop): terminal zoom in/out - #2607

Closed
z3thon wants to merge 87 commits into
ParadevAI:mainfrom
z3thon:feat/terminal-zoom
Closed

z3thon wants to merge 87 commits into
ParadevAI:mainfrom
z3thon:feat/terminal-zoom

Conversation

@z3thon

@z3thon z3thon commented Mar 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add Terminal Zoom In (Cmd+Shift+=) and Terminal Zoom Out (Cmd+Shift+-) to the View menu
  • Adjusts the terminal font size setting (10-24px range) independently of the app zoom level
  • Works via menu items and keyboard shortcuts
  • Changes are persisted and apply to all terminal panes reactively

Test plan

  • View menu shows "Terminal Zoom In" and "Terminal Zoom Out" items
  • Cmd+Shift+= increases terminal font size
  • Cmd+Shift+- decreases terminal font size
  • Font size clamps at 10px (min) and 24px (max)
  • App zoom level (Cmd+=/Cmd+-) is unaffected
  • Terminal font size persists across app restarts
  • Works in both main and focus windows

Summary by cubic

Adds Terminal Zoom and project-focused windows, plus a draggable file-tree pane, independent left/right panels, and a safer worktree flow with optional mode and Trash-based cleanup. Rebrands the app to K2SO.

  • New Features

    • Terminal zoom in/out; adjusts only terminal font size (10–24 px), persists; menu items and hotkeys Cmd+Shift+= / Cmd+Shift+-.
    • Project Focus windows: one project per window with a dockable focus bar; “Open in Focus Window” from sidebar; New Window (Cmd+Shift+N); cross‑window tab and project update sync.
    • Worktrees: global and per‑project Worktree Mode (always/optional/disabled) with a choice dialog; auto‑init Git when disabled; recycle worktrees to Trash on close.
    • Tabs/layout: new file-tree pane with “Split with File Tree”; independent left/right panels with top‑bar toggle buttons; Files and Changes can both be active on separate sides.
    • Projects: split‑view Projects settings; icon auto‑discovery with deeper patterns and Detect/Refresh/Upload; branch‑only thumbnails gain hover shortcuts and agent status rings.
  • Bug Fixes

    • macOS: destroy auto‑restored windows on launch to prevent external browser tabs.
    • Project windows: unregister on “closed” to prevent orphaned windows; close‑all waits for per‑window cleanup.
    • Git: consistent upstream remote handling; checkout target branch before creating branch workspaces when worktrees are disabled.
    • Worktree choice dialog/drag‑and‑drop open: better error handling; navigate correctly and refresh lists.
    • Workspace list: the X button opens a close dialog with a recycle‑to‑Trash option; branch‑only projects clear review status on click; removed duplicate Projects section and the back button in project settings.

Written for commit 0bd9b2f. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Project-focused windows & "Open in Focus Window"
    • Worktree Mode setting (always/optional/disabled) with per-project controls and choice dialog
    • File Tree pane and "Split with File Tree"
    • Close Workspace dialog with recycle-to-trash option
    • Terminal zoom shortcuts and New Window hotkey
  • Improvements

    • Dual left/right side panels with movable tabs, persistent sizes, toggle buttons and project focus bar
    • Cross-window sync for projects, tabs and settings; favicon discovery/refresh

z3thon and others added 30 commits March 17, 2026 17:00
Add a `worktreeMode` setting (global + per-project override) with three
values: "always" (current behavior), "optional" (user chooses per
workspace via a toggle in the New Workspace modal), and "disabled"
(never create worktrees — open directly in main repo).

- Add WorktreeMode type and WORKTREE_MODES constant to local-db schema
- Add worktree_mode column to both settings and projects tables
- Add getWorktreeMode/setWorktreeMode tRPC procedures for global setting
- Add worktreeMode to project update procedure for per-project override
- Modify workspace create procedure to respect effective worktree mode
- Add Worktree Mode dropdown to global Git & Worktrees settings page
- Add per-project Worktree Mode override in project settings
- Register GIT_WORKTREE_MODE in settings search
- Show worktree toggle in New Workspace modal when mode is "optional"
- Hide branch prefix/worktree location settings when mode is "disabled"
Overhaul the worktree optional flow:
- Show worktree choice dialog when opening any new project ("With
  Worktrees" vs "Without Worktrees")
- Remove "Open without worktree" button from new workspace modal
- Filter worktree-disabled projects from new workspace project picker
- Branch-only projects render as single unified sidebar item with
  project name, branch, and diff stats inline (no +, no collapse)

Project settings reorganization:
- Project section (top): worktree on/off toggle + appearance
- Workspace Defaults section (below, hidden when worktrees off):
  branch prefix, base branch, worktree location/import
- Indented sections with left border for visual separation

Close project/workspace with worktree cleanup:
- Close Project dialog: 3 buttons (Cancel / Close Project / Recycle
  Worktrees) — Recycle moves worktree dirs to macOS Trash
- Close Workspace: new context menu item + dialog with same 3-button
  pattern for individual workspaces
- Uses shell.trashItem() for recoverable trash, git worktree prune
  for cleanup

Other improvements:
- Prompt textarea placeholder: "What do you want to do? (optional)"
- worktreeMode exposed in getAllGrouped query for sidebar detection
- Auto-init git silently when opening project without worktrees
…ct open

- Add `trash` option to workspaces.delete procedure — uses
  shell.trashItem() + git worktree prune instead of permanent delete
- "Disable & Recycle" in project settings now sends worktrees to Trash
- "Recycle Worktree" in workspace close dialog also uses Trash
- Invalidate getAllGrouped + getRecents after worktree choice dialog
  so new projects appear in the sidebar immediately
- Capitalize "Worktrees" in dialog titles, use "Enable"/"Disable"
  button labels instead of "With/Without Worktrees"
Branch-only projects now show the same hover UX as worktree workspaces:
diff stats fade out and keyboard shortcut (⌘1-9) fades in on hover.
Uses the same CSS grid overlay pattern as WorkspaceListItem.
When an agent is running in a branch-only project's workspace, the
project thumbnail in the sidebar gets a colored ring:
- Working (amber): pulsing ring while agent is processing
- Permission (red): pulsing ring when agent needs user input
- Review (green): static ring when agent finished but user hasn't seen it
Uses the same tabs store status aggregation as WorkspaceListItem.
When a project is opened or created, automatically search for
favicon/logo files in the repo (favicon.ico, logo.png, public/favicon,
etc.) and set it as the project icon. Only runs if no icon is already
set. Manually uploaded icons take priority. Fire-and-forget so it
doesn't block project creation.
Add patterns for Next.js app directory (app/favicon.ico, app/icon.png),
monorepo nested public directories (**/public/favicon.*), and increase
glob depth to 4 levels. Fixes discovery for projects where the favicon
is in a subdirectory like NEXTapp/app/ or peliguard-website/app/.
Replace the individual project collapsibles in the settings sidebar with
a single "Projects" link that opens a clean project list page. Selecting
a project navigates to its settings. This scales much better when users
have many active projects.

- Replace per-project collapsibles in sidebar with single "Projects" nav item
- Create /settings/projects route with a searchable project list
- Each project shows name, color indicator, and repo path
- Clicking a project navigates to /settings/project/$projectId/general
- Projects list page shows workspace count badges and workspace list
  per project (local branch + worktree workspaces)
- Branch-only projects show "no worktrees" badge and single branch row
- Project settings page gains "Workspaces" section between Project
  and Workspace Defaults, listing all workspaces with type badges
- Rebased onto per-project-worktree-mode for all worktree UX changes
- Convert projects page to master-detail split view (project list on
  left, settings on right) instead of two-page drill-down
- Always expand workspace/worktree sub-items under each project
- Branch-only projects show collapsed (no sub-items, just project row)
- Worktree items indented with left border line showing hierarchy
- Move "Projects" into the "Editor & Workflow" sidebar group right
  after "Git & Worktrees" instead of its own separate section
- Add workspace listing section to project settings detail view
- Replace color dots with ProjectThumbnail in the settings project list
  (shows favicon, GitHub avatar, or letter badge)
- Add "Detect" button to project icon section that clears the current
  icon and re-discovers favicon from the project directory
- Spinning icon while detection is in progress
- Upload and Remove buttons still available alongside Detect
Add a new "file-tree" pane type to the react-mosaic pane system, so the
file tree can be opened as a draggable, splittable pane alongside
terminals, editors, and chat — instead of being confined to the sidebar.

- Add "file-tree" to PaneType union and SplitPaneOptions
- Add createFileTreePane() factory function
- Update split operations in store to handle "file-tree" pane creation
- Create FileTreePane component wrapping existing FilesView
- Register pane routing in TabView's renderPane
- Add "Split with File Tree" to pane context menu
- Wire up context menu action in TabPane and TabContentContextMenu
react-dnd's connectDragSource requires native DOM elements, not React
components. Wrapping PaneToolbarActions in a <div> fixes the error.
- Right-click Changes or Files tab to move it to left or right side
- Each tab can be independently positioned (e.g. Files on left,
  Changes on right, or both on one side)
- Left panel renders with its own resizable handle
- Close left panel: tabs return to right side
- Close right panel with lone tab: resets all tabs to right
- Expand/collapse button moved from tab bar into ChangesHeader
  toolbar (only relevant to Changes view)
- Tab positions persisted in sidebar store
* Update colors

* Refine theme tests

* Lint
Add multi-window support so users can focus on a single project in its
own BrowserWindow. Right-clicking a project in the sidebar shows
"Open in New Window" which creates a project-focused window filtered
to just that project's workspaces. Re-selecting the same project
focuses the existing window instead of creating a duplicate.

Key pieces:
- WindowManager singleton tracks main + project windows
- ProjectWindow factory creates lightweight BrowserWindows
- tRPC context gains callingWindow via createIPCHandler's createContext
- useProjectFocus hook reads projectFocus query param from hash URL
- Both V1 and V2 sidebars filter by project in focus mode
- Project close procedure also closes its dedicated window
- App quit handler closes all project windows cleanly
- Add cross-window tab state synchronization via tRPC subscription
  (tabs.subscribe emitter + useTabsSync hook mirroring useHotkeysSync)
- Sync structural state (tabs, panes) but keep activeTabIds/focusedPaneIds
  per-window so each window can view different tabs independently
- Add "New Window" to View menu (Cmd+Shift+N) for full clone windows
- Rename "Open in New Window" to "Open in Focus Window" for project-focused
  windows that hide the left sidebar navigation
- Add ProjectFocusBar in RightSidebar showing the real ProjectSection
  with status indicators and worktree list, movable left/right via
  context menu with vertical resize handle
- Capture projectFocus param before router overwrites hash URL
- Fix macOS window restoration opening Chrome tabs on relaunch by
  destroying zombie windows and setting restorable: false
- Persist/restore focus window project IDs across app sessions
- Smart panel close behavior: focus bar stays put when its panel closes,
  tabs migrate to focus bar panel when the opposite side closes
…ides

When Changes is on the left panel and Files is on the right (or vice
versa), both should show their content simultaneously. Previously the
shared rightSidebarTab state caused only one to be visible at a time.

Now when a tab is the only one on its side, it's always active
regardless of the global rightSidebarTab value.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx:405">
P2: Only one close trigger was migrated to the new close dialog; middle-click/collapsed paths still use legacy delete flow, causing inconsistent close behavior.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

onClick={(e) => {
e.stopPropagation();
handleDeleteClick();
setShowCloseDialog(true);

@cubic-dev-ai cubic-dev-ai Bot Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Only one close trigger was migrated to the new close dialog; middle-click/collapsed paths still use legacy delete flow, causing inconsistent close behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx, line 405:

<comment>Only one close trigger was migrated to the new close dialog; middle-click/collapsed paths still use legacy delete flow, causing inconsistent close behavior.</comment>

<file context>
@@ -402,7 +402,7 @@ export function WorkspaceListItem({
 													onClick={(e) => {
 														e.stopPropagation();
-														handleDeleteClick();
+														setShowCloseDialog(true);
 													}}
 													className="flex items-center justify-center text-muted-foreground hover:text-foreground"
</file context>
Fix with Cubic

z3thon added 19 commits March 20, 2026 07:30
Move windowManager.unregisterProjectWindow from the "close" event
(fires before close, can be intercepted) to the "closed" event (fires
after window is actually closed). This prevents orphaned windows that
are untracked but still open.

Also fix closeAllProjectWindows to let each window's "closed" handler
do the map cleanup instead of deleting during iteration.
# Conflicts:
#	apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/TopBar.tsx
…rktree-mode

# Conflicts:
#	apps/desktop/src/lib/trpc/routers/workspaces/procedures/create.ts
#	apps/desktop/src/renderer/components/NewWorkspaceModal/components/PromptGroup/PromptGroup.tsx
#	apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/ProjectSection/ProjectSection.tsx
# Conflicts:
#	apps/desktop/src/renderer/routes/_authenticated/layout.tsx
- Replace app name "Superset" → "K2SO" in productName, appId, dialogs,
  tray, terminal TERM_PROGRAM, shared constants
- Replace icon assets (icns, ico, png, tray) with K2SO logo
- Update sign-in page welcome text and logo component
- Update author email to rosson@alakazamlabs.com
- Keep superset protocol scheme and session partition for auth compat
@Kitenite Kitenite closed this Jul 11, 2026
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.

2 participants