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(canvas): Cmd/Ctrl+1-9 jumps to the Nth project in sidebar order

Mina Sameh814f088e83c9
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsx
index 2acd89ab8..996ef0f73 100644
--- a/src/renderer/canvas/Canvas.tsx
+++ b/src/renderer/canvas/Canvas.tsx
@@ -126,6 +126,7 @@ import { WorktreeDialog } from '../components/WorktreeDialog'
import { NotifyConsentDialog } from '../components/NotifyConsentDialog'
import { SessionsSidebar } from '../components/SessionsSidebar'
import type { SessionNodeInput } from '../lib/sessionList'
+import { projectIdAtIndex } from '../lib/sessionList'
import { UsageIndicator } from '../components/UsageIndicator'
import { PresenceLayer } from '../components/PresenceLayer'
import { Facepile } from '../components/Facepile'
@@ -4640,6 +4641,14 @@ export function Canvas() {
} else if ((e.metaKey || e.ctrlKey) && e.key === '/') {
e.preventDefault()
setShortcutsOpen((v) => !v)
+ } else if ((e.metaKey || e.ctrlKey) && !e.shiftKey && /^Digit[1-9]$/.test(e.code)) {
+ const n = Number(e.code.slice(5))
+ const { projects, activeProjectId } = useProjects.getState()
+ const targetId = projectIdAtIndex(projects, n)
+ if (targetId && targetId !== activeProjectId) {
+ e.preventDefault()
+ switchProject(targetId)
+ }
} else if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.key.toLowerCase() === 'c') {
// Copy the current page selection (e.g. markdown view) to the clipboard.
const tag = (document.activeElement?.tagName || '').toLowerCase()