Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

feat(menus): share add-node menu spec

Darren Kattan4b1db6e01bc3
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index af62dcb21..7c7d74767 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -137,6 +137,12 @@ import {
decideExternalChange,
mergeIncomingNodes
} from '../lib/externalChange'
+import {
+ CONTENT_ADD_ITEMS,
+ contentAddItemsToMenuItems,
+ type AddHandlers
+} from '../lib/addMenuSpec'
+import { transferConversationItems } from '../lib/transferItems'
import { viewportAtZoom1 } from '../lib/zoomReset'
import { isSpaceRelease, spacePanKeydown } from '../lib/spacePan'
import { UpdateCard } from '../components/UpdateCard'
@@ -7481,35 +7487,36 @@ export function Canvas() {
[renameSession]
)
+ // The sessions-sidebar project-header "+": opens the SAME content menu the pane right-click
+ // uses (terminal + agents + browser/web/sticky/dino/file/worktree), so adding to a project from
+ // the sidebar is no longer a bare-terminal-only affordance that lags the canvas menu. For a
+ // non-active project, switch FIRST (synchronous) so the menu's account rows resolve against the
+ // clicked project; the node is only added on the user's later click, well after that project's
+ // canvas has loaded, so there is no load-race.
const addToProject = useCallback(
(projectId: string, e?: { clientX: number; clientY: number }) => {
- // The sessions-sidebar "+" used to open a bare terminal. It now opens the SAME agent menu
- // the canvas right-click uses (with "New terminal" kept on top so the old behavior is a
- // deliberate pick, not lost) — so adding to a project picks an agent instead of always a
- // shell. For a non-active project, switch FIRST (synchronous) so the menu's account rows
- // resolve against the clicked project; the node is only added on the user's later click,
- // well after the project's canvas has loaded, so there is no load-race.
+ // The sessions-sidebar "+" used to open a bare terminal. It now opens the SAME content menu
+ // the pane right-click uses (terminal + agents + browser/web/sticky/dino/file/worktree), so
+ // adding to a project from the sidebar is no longer a bare-terminal-only affordance that
+ // lags the canvas menu. For a non-active project, switch FIRST (synchronous) so the menu's
+ // account rows resolve against the clicked project; the node is only added on the user's
+ // later click, well after that project's canvas has loaded, so there is no load-race.
if (projectId !== activeProjectId) switchProject(projectId)
const pos = e ? { x: e.clientX, y: e.clientY } : { x: 80, y: 120 }
+ const [terminalItem, ...restContent] = contentAddItemsToMenuItems(
+ CONTENT_ADD_ITEMS,
+ addHandlers,
+ addCtx,
+ undefined,
+ pos
+ )
setMenu({
x: pos.x,
y: pos.y,
- items: [
- {
- label: 'New terminal',
- icon: <IconTerminal />,
- onClick: () => {
- // For a non-active project the switch happened above; addTerminal targets the
- // active project, which is now this one.
- addTerminal()
- }
- },
- { type: 'separator' },
- ...agentCreationItems()
- ]
+ items: [terminalItem, ...agentCreationItems(), ...restContent]
})
},
- [activeProjectId, addTerminal, switchProject, agentCreationItems]
+ [activeProjectId, switchProject, addHandlers, addCtx, agentCreationItems]
)
// Sidebar drag-to-group: reparent a session into a canvas group (groupId) or out (null).
@@ -9358,6 +9365,10 @@ export function Canvas() {
onOpenFile={() => void openFileDialog()}
onAddRemote={() => openRemotePicker({ x: window.innerWidth / 2, y: window.innerHeight / 2 })}
onConnectRemote={() => void connectRemote()}
+ onAddBrowser={() => addBrowser()}
+ onAddWeb={() => void addWebView()}
+ onNewFile={() => void newProjectFile()}
+ onAddWorktree={() => openWorktreeDialog(null)}
onSave={persist}
onFitView={fitAll}
onZoomIn={() => zoomIn({ duration: 150 })}
diff --git a/src/renderer/components/Dock.tsx b/src/renderer/components/Dock.tsx
index be2e43d2e..0e241d209 100644
--- a/src/renderer/components/Dock.tsx
+++ b/src/renderer/components/Dock.tsx
@@ -7,6 +7,7 @@ import { AgentIcon } from '../lib/agentIcons'
import { useSettings } from '../state/settings'
import { useProjects } from '../state/projects'
import { accountsForProject, sshAccountsHint } from '../state/workspace'
+import { CONTENT_ADD_ITEMS, contentAddItemsToDockRows, type AddHandlers } from '../lib/addMenuSpec'
const isMac = /Mac/i.test(navigator.platform || navigator.userAgent)
@@ -22,6 +23,12 @@ interface DockProps {
onOpenFile: () => void
onAddRemote: () => void
onConnectRemote: () => void
+ // Content nodes the Dock used to omit (it lagged the pane menu). Now derived from the same
+ // spec as every other add-menu, so the Dock "+" and the canvas right-click stay in parity.
+ onAddBrowser: () => void
+ onAddWeb: () => void
+ onNewFile: () => void
+ onAddWorktree: () => void
onUndo: () => void
onRedo: () => void
onSave: () => void
@@ -48,6 +55,10 @@ export function Dock({
onOpenFile,
onAddRemote,
onConnectRemote,
+ onAddBrowser,
+ onAddWeb,
+ onNewFile,
+ onAddWorktree,
onUndo,
onRedo,
onSave,
@@ -96,6 +107,28 @@ export function Dock({
setMenuOpen(false)
}
+ // Derive the content rows from the shared add-menu spec (the same list the pane right-click and
+ // the sidebar "+" use), so the Dock can no longer lag the canvas menu on which kinds are addable.
+ // Terminal + agents + "New Remote Connection" stay Dock-local (agents have bespoke flyouts;
+ // remote-connection is a different flow than the pane menu's remote picker).
+ const hasCwd = !!(activeProject?.ssh?.remoteCwd ?? activeProject?.cwd)
+ const isSshProject = !!activeProject?.ssh
+ const dockAddHandlers: AddHandlers = {
+ terminal: onAddTerminal,
+ remote: onAddRemote,
+ browser: onAddBrowser,
+ web: onAddWeb,
+ sticky: onAddSticky,
+ dino: onAddDino,
+ openFile: onOpenFile,
+ newFile: onNewFile,
+ worktree: onAddWorktree
+ }
+ const contentRows = contentAddItemsToDockRows(CONTENT_ADD_ITEMS, dockAddHandlers, {
+ hasCwd,
+ isSshProject
+ })
+
return (
<>
{menuOpen && <div className="dock-backdrop" onClick={() => setMenuOpen(false)} />}
@@ -209,18 +242,17 @@ export function Dock({
<span>{c.label}</span>
</button>
))}
- <button onClick={pick(onAddSticky)}>
- <NoteIcon />
- <span>Sticky Note</span>
- </button>
- <button onClick={pick(onAddDino)}>
- <DinoIcon />
- <span>Dino Game</span>
- </button>
- <button onClick={pick(onOpenFile)}>
- <EditorIcon />
- <span>Open file…</span>
- </button>
+ {contentRows.map((row) => (
+ <button
+ key={row.kind}
+ disabled={row.disabled}
+ title={row.hint}
+ onClick={pick(row.onClick)}
+ >
+ {row.icon}
+ <span>{row.label}</span>
+ </button>
+ ))}
<button onClick={pick(onConnectRemote)}>
<RemoteIcon />
<span>New Remote Connection</span>
@@ -341,34 +373,6 @@ function TerminalIcon() {
</svg>
)
}
-function NoteIcon() {
- return (
- <svg {...S}>
- <path d="M4 4h16v11l-5 5H4z" />
- <path d="M20 15h-5v5" />
- </svg>
- )
-}
-function DinoIcon() {
- return (
- <svg width={18} height={18} viewBox="0 0 24 24" fill="currentColor" stroke="none">
- <rect x="3" y="11" width="6" height="3" />
- <rect x="8" y="9" width="11" height="7" />
- <rect x="14" y="3" width="7" height="7" />
- <rect x="21" y="7" width="2" height="2" />
- <rect x="18" y="12" width="2" height="3" />
- <rect x="9" y="16" width="2" height="5" />
- <rect x="14" y="16" width="2" height="5" />
- </svg>
- )
-}
-function EditorIcon() {
- return (
- <svg {...S}>
- <path d="M9 8l-4 4 4 4M15 8l4 4-4 4" />
- </svg>
- )
-}
function MicIcon() {
return (
<svg {...S}>
diff --git a/src/renderer/components/SessionsSidebar.tsx b/src/renderer/components/SessionsSidebar.tsx
index b41ba9bf5..2fd88138c 100644
--- a/src/renderer/components/SessionsSidebar.tsx
+++ b/src/renderer/components/SessionsSidebar.tsx
@@ -39,8 +39,8 @@ export interface SessionsSidebarProps {
* or the outgoing project's unsaved edits are dropped by the active-project reload and the
* new activeProjectId never reaches disk (the app reopens on the old project). */
onSwitchProject(projectId: string): void
- /** "+" on a project header: open the agent-creation menu at the cursor (switching to the
- * project first if it isn't active). The event positions the menu. */
+ /** "+" on a project header: open the add-node menu at the cursor (switching to the project
+ * first if it isn't active). The event positions the menu. */
onAddToProject(projectId: string, e: { clientX: number; clientY: number }): void
/** Move a node into a canvas group (groupId) or out to the top level (null). */
onMoveToGroup(projectId: string, nodeId: string, groupId: string | null): void
@@ -537,7 +537,7 @@ export function SessionsSidebar(props: SessionsSidebarProps): JSX.Element | null
<span className="ss-group__count">{projectCount(g)}</span>
<button
className="ss-group__add"
- title="New agent in this project"
+ title="Add a node to this project"
onClick={(e) => {
e.stopPropagation()
props.onAddToProject(g.projectId, { clientX: e.clientX, clientY: e.clientY })
diff --git a/src/renderer/lib/addMenuSpec.test.tsx b/src/renderer/lib/addMenuSpec.test.tsx
new file mode 100644
index 000000000..d5ed34ffa
--- /dev/null
+++ b/src/renderer/lib/addMenuSpec.test.tsx
@@ -0,0 +1,129 @@
+import { describe, it, expect } from 'vitest'
+import {
+ CONTENT_ADD_ITEMS,
+ contentAddItemsToMenuItems,
+ contentAddItemsToDockRows,
+ type AddItem,
+ type AddHandlers
+} from './addMenuSpec'
+
+const noop = () => {}
+const handlers = (overrides: Partial<AddHandlers> = {}): AddHandlers => ({
+ terminal: noop,
+ remote: noop,
+ browser: noop,
+ web: noop,
+ sticky: noop,
+ dino: noop,
+ openFile: noop,
+ newFile: noop,
+ worktree: noop,
+ ...overrides
+})
+
+const allKinds: AddItem['kind'][] = [
+ 'terminal',
+ 'remote',
+ 'browser',
+ 'web',
+ 'sticky',
+ 'dino',
+ 'open-file',
+ 'new-file',
+ 'worktree'
+]
+
+describe('CONTENT_ADD_ITEMS', () => {
+ it('lists every content kind in the canonical order', () => {
+ expect(CONTENT_ADD_ITEMS.map((i) => i.kind)).toEqual(allKinds)
+ })
+})
+
+describe('contentAddItemsToMenuItems', () => {
+ it('emits a MenuItem for every kind that should show (cwd + non-ssh)', () => {
+ const items = contentAddItemsToMenuItems(CONTENT_ADD_ITEMS, handlers(), {
+ hasCwd: true,
+ isSshProject: false
+ })
+ const labels = items.map((i) => ('label' in i ? i.label : null))
+ // "New file…" shows because hasCwd; worktree is enabled (not ssh).
+ expect(labels).toEqual([
+ 'New terminal',
+ 'New remote…',
+ 'New browser',
+ 'New web view…',
+ 'New sticky note',
+ 'New dino game',
+ 'Open file…',
+ 'New file…',
+ 'New worktree…'
+ ])
+ })
+
+ it('hides "New file…" when the project has no cwd', () => {
+ const items = contentAddItemsToMenuItems(CONTENT_ADD_ITEMS, handlers(), {
+ hasCwd: false,
+ isSshProject: false
+ })
+ expect(items.some((i) => 'label' in i && i.label === 'New file…')).toBe(false)
+ })
+
+ it('disables "New worktree…" on an SSH project and surfaces the hint', () => {
+ const items = contentAddItemsToMenuItems(CONTENT_ADD_ITEMS, handlers(), {
+ hasCwd: true,
+ isSshProject: true
+ })
+ const worktree = items.find((i) => 'label' in i && i.label === 'New worktree…')
+ expect(worktree).toBeDefined()
+ expect(worktree && 'disabled' in worktree && worktree.disabled).toBe(true)
+ expect(worktree && 'hint' in worktree && worktree.hint).toBeTruthy()
+ })
+
+ it('wires each handler to its item', () => {
+ const calls: string[] = []
+ const h = handlers({
+ terminal: () => calls.push('terminal'),
+ browser: () => calls.push('browser'),
+ web: () => calls.push('web'),
+ sticky: () => calls.push('sticky'),
+ dino: () => calls.push('dino'),
+ worktree: () => calls.push('worktree')
+ })
+ const items = contentAddItemsToMenuItems(CONTENT_ADD_ITEMS, h, {
+ hasCwd: true,
+ isSshProject: false
+ })
+ for (const item of items) {
+ if ('onClick' in item) item.onClick()
+ }
+ expect(calls.sort()).toEqual(['browser', 'dino', 'sticky', 'terminal', 'web', 'worktree'])
+ })
+})
+
+describe('contentAddItemsToDockRows', () => {
+ it('omits the remote picker (the Dock has its own remote-connection flow) but keeps the rest', () => {
+ const rows = contentAddItemsToDockRows(CONTENT_ADD_ITEMS, handlers(), {
+ hasCwd: true,
+ isSshProject: false
+ })
+ expect(rows.map((r) => r.kind)).toEqual([
+ 'terminal',
+ 'browser',
+ 'web',
+ 'sticky',
+ 'dino',
+ 'open-file',
+ 'new-file',
+ 'worktree'
+ ])
+ expect(rows.some((r) => r.kind === 'remote')).toBe(false)
+ })
+
+ it('hides "new-file" when there is no cwd', () => {
+ const rows = contentAddItemsToDockRows(CONTENT_ADD_ITEMS, handlers(), {
+ hasCwd: false,
+ isSshProject: false
+ })
+ expect(rows.some((r) => r.kind === 'new-file')).toBe(false)
+ })
+})
diff --git a/src/renderer/lib/addMenuSpec.tsx b/src/renderer/lib/addMenuSpec.tsx
new file mode 100644
index 000000000..fd8840091
--- /dev/null
+++ b/src/renderer/lib/addMenuSpec.tsx
@@ -0,0 +1,233 @@
+/**
+ * The single declarative source of truth for the "add node" content items that appear in every
+ * creation menu: the canvas pane right-click, the sessions-sidebar project-header "+", the bottom
+ * Dock "+", and the kanban column "+ New session".
+ *
+ * The duplication this kills: each of those four surfaces used to hand-maintain its own list of
+ * which node kinds you can add, so they drifted out of parity (the pane menu had "New browser" but
+ * the Dock and the sidebar "+" did not, etc.). Now they all derive their CONTENT items from
+ * {@link CONTENT_ADD_ITEMS}, filtered by project context (cwd / SSH). Agent entries are layered on
+ * by each surface from its own source — the ContextMenu-based menus already share
+ * `agentCreationItems()`, and the Dock's agent-account hover flyouts are intentionally bespoke UX —
+ * so this spec owns the CONTENT list only, not the agents.
+ *
+ * Two render adapters map the same {@link AddItem} list to the two menu worlds:
+ * - {@link contentAddItemsToMenuItems} → the {@link MenuItem} type the `ContextMenu` component
+ * consumes (pane menu, project-header "+").
+ * - {@link contentAddItemsToDockRows} → the Dock's custom `<button>` JSX.
+ *
+ * The handlers are passed in (not imported) so this module stays pure, renderer-side, and testable.
+ */
+import type { ReactNode } from 'react'
+import type { MenuItem } from '../components/ContextMenu'
+import {
+ IconBranch,
+ IconDino,
+ IconEditor,
+ IconNote,
+ IconRemote,
+ IconTerminal,
+ IconWeb
+} from '../components/icons'
+
+/** A flow-space position; `undefined` means "wherever the surface's default is". */
+export type AddPos = { x: number; y: number } | undefined
+
+/**
+ * Every addable CONTENT node kind (agents are handled separately — see the module doc). The
+ * `kind` discriminator is the only required field; conditionals (`requiresCwd`, `disabledOnSsh`)
+ * are checked by the adapters against the project context.
+ */
+export type AddItem =
+ | { kind: 'terminal' }
+ | { kind: 'remote' }
+ | { kind: 'browser' }
+ | { kind: 'web' }
+ | { kind: 'sticky' }
+ | { kind: 'dino' }
+ | { kind: 'open-file' }
+ | { kind: 'new-file' } // requiresCwd
+ | { kind: 'worktree' } // disabledOnSsh
+
+/**
+ * The canonical content list, in the order the pane menu established (the most-complete surface):
+ * sessions first (terminal, remote), then content nodes (browser, web, sticky, dino, open/new
+ * file), then the worktree affordance. Separators between these groups are the CALLER's concern —
+ * a surface may want to inject agents between terminal and remote, so the spec returns flat items
+ * and the caller places separators around the agent block it layers in.
+ */
+export const CONTENT_ADD_ITEMS: readonly AddItem[] = [
+ { kind: 'terminal' },
+ { kind: 'remote' },
+ { kind: 'browser' },
+ { kind: 'web' },
+ { kind: 'sticky' },
+ { kind: 'dino' },
+ { kind: 'open-file' },
+ { kind: 'new-file' },
+ { kind: 'worktree' }
+] as const
+
+/** Project context that gates which items show / are disabled. */
+export interface AddCtx {
+ /** Whether the active project has a cwd (local folder or SSH remoteCwd). Gates "New file…". */
+ hasCwd: boolean
+ /** Whether the active project is an SSH project. Disables "New worktree…". */
+ isSshProject: boolean
+}
+
+/**
+ * The bag of creation callbacks every surface already has. Passed in (not imported) so the spec
+ * stays free of Canvas-side state. Each takes the cursor position the menu was opened at, so a node
+ * lands where the user clicked rather than at a default.
+ *
+ * `remote` takes a SCREEN position (the picker opens at the cursor in screen coords, not flow
+ * coords) — the caller is responsible for the coordinate space, matching today's pane menu.
+ */
+export interface AddHandlers {
+ terminal: (at?: AddPos) => void
+ remote: (screenPos: { x: number; y: number }) => void
+ browser: (at?: AddPos) => void
+ web: (at?: AddPos) => void
+ sticky: (at?: AddPos) => void
+ dino: (at?: AddPos) => void
+ openFile: (at?: AddPos) => void
+ newFile: (at?: AddPos) => void
+ worktree: (at?: AddPos) => void
+}
+
+/** The SSH worktree hint shown on the disabled row — kept here so every surface shows the same one. */
+export const WORKTREE_SSH_HINT = 'Not supported in SSH projects yet'
+
+/**
+ * Map the canonical content list to {@link MenuItem}s for the `ContextMenu` component.
+ *
+ * @param at the flow-space position the menu was opened at (passed to each handler), or
+ * `undefined` for surfaces with no cursor (the Dock).
+ * @param screenPos the SCREEN position, only for the `remote` picker (which opens at the cursor
+ * in screen coords). When `at` is undefined, falls back to the window center.
+ */
+export function contentAddItemsToMenuItems(
+ items: readonly AddItem[],
+ handlers: AddHandlers,
+ ctx: AddCtx,
+ at?: AddPos,
+ screenPos?: { x: number; y: number }
+): MenuItem[] {
+ // The remote picker opens at the cursor in SCREEN coords. Callers with a cursor pass `screenPos`;
+ // the fallback (no cursor — no current caller hits this) is the origin, which the picker clamps
+ // on-screen anyway. Avoids touching `window` here so the function is testable in a node env.
+ const remotePos = screenPos ?? { x: 0, y: 0 }
+ const out: MenuItem[] = []
+ for (const item of items) {
+ switch (item.kind) {
+ case 'terminal':
+ out.push({ label: 'New terminal', icon: <IconTerminal />, onClick: () => handlers.terminal(at) })
+ break
+ case 'remote':
+ out.push({ label: 'New remote…', icon: <IconTerminal />, onClick: () => handlers.remote(remotePos) })
+ break
+ case 'browser':
+ out.push({ label: 'New browser', icon: <IconRemote />, onClick: () => handlers.browser(at) })
+ break
+ case 'web':
+ out.push({ label: 'New web view…', icon: <IconWeb />, onClick: () => handlers.web(at) })
+ break
+ case 'sticky':
+ out.push({ label: 'New sticky note', icon: <IconNote />, onClick: () => handlers.sticky(at) })
+ break
+ case 'dino':
+ out.push({ label: 'New dino game', icon: <IconDino />, onClick: () => handlers.dino(at) })
+ break
+ case 'open-file':
+ out.push({ label: 'Open file…', icon: <IconEditor />, onClick: () => void handlers.openFile(at) })
+ break
+ case 'new-file':
+ // "New file…" needs a project folder to create into — hidden when the project has no cwd.
+ if (ctx.hasCwd) {
+ out.push({ label: 'New file…', icon: <IconEditor />, onClick: () => void handlers.newFile(at) })
+ }
+ break
+ case 'worktree':
+ out.push({
+ label: 'New worktree…',
+ icon: <IconBranch />,
+ disabled: ctx.isSshProject,
+ hint: ctx.isSshProject ? WORKTREE_SSH_HINT : undefined,
+ onClick: () => handlers.worktree(at)
+ })
+ break
+ }
+ }
+ return out
+}
+
+/** A content row for the Dock (the JSX renderer in Dock.tsx maps over these). */
+export interface DockContentRow {
+ kind: AddItem['kind']
+ label: string
+ icon: ReactNode
+ onClick: () => void
+ disabled?: boolean
+ hint?: string
+}
+
+/**
+ * Map the canonical content list to the Dock's custom `<button>` rows. The Dock keeps its own
+ * agent-account hover-flyout JSX (bespoke UX with no `ContextMenu` equivalent); this only produces
+ * the CONTENT rows, in the same order as every other surface, so the Dock and the pane menu can no
+ * longer drift on which kinds are addable.
+ *
+ * The Dock has no cursor position, so every handler is called with `undefined` (the Dock's default
+ * placement). `remote` is omitted from the Dock today via the `items` filter the caller passes —
+ * the Dock surfaces "New Remote Connection" (a different flow) rather than the remote picker.
+ */
+export function contentAddItemsToDockRows(
+ items: readonly AddItem[],
+ handlers: AddHandlers,
+ ctx: AddCtx
+): DockContentRow[] {
+ const out: DockContentRow[] = []
+ for (const item of items) {
+ switch (item.kind) {
+ case 'terminal':
+ out.push({ kind: 'terminal', label: 'Terminal', icon: <IconTerminal />, onClick: () => handlers.terminal() })
+ break
+ case 'remote':
+ // The Dock uses its own "New Remote Connection" affordance, not the remote picker. Skip
+ // here so the Dock's content rows don't duplicate it.
+ break
+ case 'browser':
+ out.push({ kind: 'browser', label: 'Browser', icon: <IconRemote />, onClick: () => handlers.browser() })
+ break
+ case 'web':
+ out.push({ kind: 'web', label: 'Web View', icon: <IconWeb />, onClick: () => handlers.web() })
+ break
+ case 'sticky':
+ out.push({ kind: 'sticky', label: 'Sticky Note', icon: <IconNote />, onClick: () => handlers.sticky() })
+ break
+ case 'dino':
+ out.push({ kind: 'dino', label: 'Dino Game', icon: <IconDino />, onClick: () => handlers.dino() })
+ break
+ case 'open-file':
+ out.push({ kind: 'open-file', label: 'Open file…', icon: <IconEditor />, onClick: () => void handlers.openFile() })
+ break
+ case 'new-file':
+ if (ctx.hasCwd) {
+ out.push({ kind: 'new-file', label: 'New file…', icon: <IconEditor />, onClick: () => void handlers.newFile() })
+ }
+ break
+ case 'worktree':
+ out.push({
+ kind: 'worktree',
+ label: 'Worktree…',
+ icon: <IconBranch />,
+ disabled: ctx.isSshProject,
+ hint: ctx.isSshProject ? WORKTREE_SSH_HINT : undefined,
+ onClick: () => handlers.worktree()
+ })
+ break
+ }
+ }
+ return out
+}
diff --git a/src/renderer/lib/ui-visibility.test.ts b/src/renderer/lib/ui-visibility.test.ts
index 45b6a528c..9307777fe 100644
--- a/src/renderer/lib/ui-visibility.test.ts
+++ b/src/renderer/lib/ui-visibility.test.ts
@@ -23,7 +23,7 @@ describe('isHidden', () => {
describe('hideable inventories', () => {
it('list the agreed ids and nothing destructive', () => {
expect(HIDEABLE_MENU_ITEMS.map((r) => r.id)).toEqual([
- 'group', 'remove-from-group', 'colors', 'duplicate', 'align-grid', 'collapse',
+ 'group', 'remove-from-group', 'colors', 'duplicate', 'collapse',
'markdown-view', 'refresh-terminal'
])
expect(HIDEABLE_HEADER_BUTTONS.map((r) => r.id)).toEqual(['refresh', 'mic', 'ai-name', 'comments'])
diff --git a/src/renderer/lib/ui-visibility.ts b/src/renderer/lib/ui-visibility.ts
index f9d2e64db..9e0c56c41 100644
--- a/src/renderer/lib/ui-visibility.ts
+++ b/src/renderer/lib/ui-visibility.ts
@@ -23,7 +23,6 @@ export const HIDEABLE_MENU_ITEMS: readonly HideableRow[] = [
{ id: 'remove-from-group', label: 'Remove from group' },
{ id: 'colors', label: 'Colors' },
{ id: 'duplicate', label: 'Duplicate' },
- { id: 'align-grid', label: 'Align to grid' },
{ id: 'collapse', label: 'Collapse / Expand' },
{ id: 'markdown-view', label: 'Markdown view' },
{ id: 'refresh-terminal', label: 'Refresh terminal' }