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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(palette): tell a team tab apart from the SSH project it was shared from
review0d0413696870
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex d3c717be1..567512740 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -660,6 +660,7 @@ import {recentlyClosedProjects,stateToReopenSnapshot} from '../lib/closedHistory'+import { projectSwitchHint } from '../lib/projectSwitchHint'import { uuid } from '../lib/uuid'import { CANVAS_LAYOUTS_CAP, findLayoutByName, type CanvasLayout } from '@shared/canvas-layout'import { applyLayout, captureLayout } from '../lib/canvasLayout'@@ -18148,19 +18149,23 @@ export function Canvas() {store.projects// Skip unavailable projects: activating one lets edits commit to the store but they're// dropped on save (the ref emits header-only), so switching there silently loses work.- // The TabBar already guards its own click; this covers the palette (⌘K) path.- .filter((p) => p.id !== store.activeProjectId && !p.unavailable)- .forEach((p) =>+ // The TabBar already guards its own click; this covers the palette (⌘K) path. A closed team+ // tab is skipped too (its reopen is refused), and the hint tells a team tab apart from the+ // SSH project it was shared from, which carries the same name.+ .filter((p) => p.id !== store.activeProjectId)+ .forEach((p) => {+ const hint = projectSwitchHint(p)+ if (hint === null) returncmds.push({id: `proj-${p.id}`,label: `Switch to ${p.name}`,- hint: 'project',+ hint,icon: <IconSwitch />,// A closed project is REOPENED (tab restored), never activated behind a hidden tab — and// the reopen is the guarded one, which asks first for a project handed to a hosted team.run: () => (p.closed ? void reopenProject(p.id) : switchProject(p.id))})- )+ })const cs = useAgentStatus.getState()// Labels replaced free-text tags — search matches label NAMES now (unified system).const searchKanban = useProjects.getState().getProject(useProjects.getState().activeProjectId)?.kanbandiff --git a/src/renderer/lib/projectSwitchHint.test.ts b/src/renderer/lib/projectSwitchHint.test.tsnew file mode 100644index 000000000..bf77b3907--- /dev/null+++ b/src/renderer/lib/projectSwitchHint.test.ts@@ -0,0 +1,26 @@+import { describe, it, expect } from 'vitest'+import { projectSwitchHint } from './projectSwitchHint'++describe('projectSwitchHint', () => {+ it('labels an ordinary open project as before', () => {+ expect(projectSwitchHint({})).toBe('project')+ })++ // After a share the closed SSH project and the team tab carry the same name, and the palette+ // showed two identical "Switch to <name> · project" rows (device run, 2026-10-03, finding G).+ it('tells a team tab apart from the SSH project it was shared from', () => {+ expect(projectSwitchHint({ remote: true })).toBe('team project')+ expect(projectSwitchHint({ closed: true, handedOffTo: { at: 1 } })).toBe('closed · shared with a team')+ })++ it('says a closed project is closed (choosing it reopens it)', () => {+ expect(projectSwitchHint({ closed: true })).toBe('closed project')+ })++ // A closed team tab is never reopened (its reopen is refused), and "Recently closed" does not+ // list it either: a palette row for it could only answer with a refusal.+ it('omits a closed team tab and an unavailable project', () => {+ expect(projectSwitchHint({ closed: true, remote: true })).toBeNull()+ expect(projectSwitchHint({ unavailable: true })).toBeNull()+ })+})diff --git a/src/renderer/lib/projectSwitchHint.ts b/src/renderer/lib/projectSwitchHint.tsnew file mode 100644index 000000000..3e0385411--- /dev/null+++ b/src/renderer/lib/projectSwitchHint.ts@@ -0,0 +1,21 @@+import { isClosedTeamTab } from './closedHistory'++/** What a project row in the command palette says beside "Switch to <name>", or null when the+ * palette must not offer the project at all.+ *+ * After "Share with team" the closed SSH project and the team's tab carry the same name, so a+ * bare "project" hint showed two identical rows that did different things (reopen the SSH copy,+ * or switch to the team tab). A closed team tab is omitted: its reopen is refused, and "Recently+ * closed" does not list it either. An unavailable project is omitted as before: edits made there+ * are dropped on save. */+export function projectSwitchHint(p: {+ closed?: boolean+ remote?: boolean+ unavailable?: boolean+ handedOffTo?: unknown+}): string | null {+ if (p.unavailable || isClosedTeamTab(p)) return null+ if (p.remote) return 'team project'+ if (p.closed) return p.handedOffTo ? 'closed · shared with a team' : 'closed project'+ return 'project'+}