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(breadcrumbs): machine-local NavStop persistence on IndexEntryV3

Mina Sameh6e1fd9123c1a
diff --git a/src/core/workspace-files.test.ts b/src/core/workspace-files.test.ts
index 12ed44451..93d104ca0 100644
--- a/src/core/workspace-files.test.ts
+++ b/src/core/workspace-files.test.ts
@@ -140,6 +140,38 @@ describe('per-project capability fields in the shared file', () => {
})
})
+describe('breadcrumbs are MACHINE-LOCAL, like viewport/capabilityAck', () => {
+ it('round-trips through the index entry and never reaches the shared file', () => {
+ const stop = { nodeId: 'term-abc', at: 1000, note: 'terminal · t' }
+ const p = project({ cwd: '/a/foo', breadcrumbs: [stop] })
+ const { index, files } = splitWorkspace(
+ { version: 2, activeProjectId: 'p1', projects: [p] },
+ () => 1,
+ '2026-08-15T00:00:00.000Z'
+ )
+ expect(index.entries[0].breadcrumbs).toEqual([stop])
+ expect(serializeProjectFile(files.get('/a/foo')!)).not.toContain('breadcrumbs')
+
+ const restored = fileToProject(files.get('/a/foo')!, {
+ id: 'p1', cwd: '/a/foo', breadcrumbs: [stop]
+ })
+ expect(restored.breadcrumbs).toEqual([stop])
+
+ // A file-borne `breadcrumbs` (forgery — a repo carrying navigation history) is never read.
+ const forged = fileToProject(
+ { ...files.get('/a/foo')!, breadcrumbs: [stop] } as never,
+ { id: 'p1', cwd: '/a/foo' }
+ )
+ expect(forged.breadcrumbs).toBeUndefined()
+ })
+
+ it('an entry with no breadcrumbs adds no bytes to the committed file', () => {
+ const f = projectToFile(project(), 1, 'ts')
+ expect('breadcrumbs' in f).toBe(false)
+ expect(serializeProjectFile(f)).not.toContain('breadcrumbs')
+ })
+})
+
describe('sameProjectContent', () => {
it('ignores rev and savedAt, sees node changes', () => {
const a = projectToFile(project(), 1, '2026-01-01T00:00:00.000Z')
diff --git a/src/core/workspace-files.ts b/src/core/workspace-files.ts
index 52ebd7417..4cee1655b 100644
--- a/src/core/workspace-files.ts
+++ b/src/core/workspace-files.ts
@@ -7,7 +7,7 @@ import {
stripSharedNodeExec,
type LocalNodeExecMap
} from '../shared/node-exec'
-import type { BridgeLink, CanvasNodeState, Project, ProjectKanban, Viewport, Workspace } from '../shared/types'
+import type { BridgeLink, CanvasNodeState, NavStop, Project, ProjectKanban, Viewport, Workspace } from '../shared/types'
import { projectCapabilityFields, readProjectCapabilities } from '../shared/project-capabilities'
import { loadedAgentBrowserPartition } from '../shared/browser-partition'
import { sanitizeProjectIcon, type ProjectIcon } from '../shared/project-icon'
@@ -131,6 +131,9 @@ export interface IndexEntryV3 {
* entry, so a second worktree of the same repo (a second entry) notifies again, on purpose.
*/
capabilityAck?: import('../shared/project-capability-consent').CapabilityAckMap
+ /** MACHINE-LOCAL camera navigation history for a ref'd project. Same rule as `viewport`: this
+ * user's "where was I" is not something a repo shares. See NavStop. */
+ breadcrumbs?: NavStop[]
cwd?: string
ssh?: Project['ssh']
cache?: ProjectFileV1
@@ -281,6 +284,8 @@ export function fileToProject(
defaultAccountId?: string
/** This machine's clone-notice acknowledgments for this entry (never from the file). */
capabilityAck?: import('../shared/project-capability-consent').CapabilityAckMap
+ /** This machine's navigation history for this entry (never from the file). */
+ breadcrumbs?: NavStop[]
/** This machine's own exec values for these nodes (from the local index entry). A file read
* WITHOUT them — an adopted/cloned folder, a probe — gets the safe defaults, never the file's
* own `shell`/`ssh.extraArgs`. */
@@ -319,7 +324,10 @@ export function fileToProject(
...(base.closed ? { closed: true } : {}),
// Machine-local, from the index entry ONLY: a file field named `capabilityAck` is a forgery
// attempt (the shared file cannot carry this machine's consent) and is simply never read.
- ...(base.capabilityAck ? { capabilityAck: base.capabilityAck } : {})
+ ...(base.capabilityAck ? { capabilityAck: base.capabilityAck } : {}),
+ // Machine-local, from the index entry ONLY: a file field named `breadcrumbs` is a forgery
+ // attempt (the shared file cannot carry this machine's navigation history) and is never read.
+ ...(base.breadcrumbs?.length ? { breadcrumbs: base.breadcrumbs } : {})
}
}
@@ -408,7 +416,8 @@ export function splitWorkspace(
...(p.defaultAccountId ? { defaultAccountId: p.defaultAccountId } : {}),
// The clone-notice acknowledgment rides the machine-local entry, never the shared file
// (projectToFile does not emit it — pinned by project-capability-consent.test.ts).
- ...(p.capabilityAck ? { capabilityAck: p.capabilityAck } : {})
+ ...(p.capabilityAck ? { capabilityAck: p.capabilityAck } : {}),
+ ...(p.breadcrumbs?.length ? { breadcrumbs: p.breadcrumbs } : {})
}
if (p.unavailable) {
// Placeholder (folder missing / server unreachable at load): its nodes:[] is not real
diff --git a/src/core/workspace-store.ts b/src/core/workspace-store.ts
index 7e3816dfb..3a236fe40 100644
--- a/src/core/workspace-store.ts
+++ b/src/core/workspace-store.ts
@@ -289,6 +289,7 @@ export class WorkspaceStore {
closed: e.closed,
viewport: e.viewport,
defaultAccountId: e.defaultAccountId,
+ breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck,
localExec: this.execOverlay(e, p)
})
@@ -308,6 +309,7 @@ export class WorkspaceStore {
closed: e.closed,
viewport: e.viewport,
defaultAccountId: e.defaultAccountId,
+ breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck,
localExec: this.execOverlay(e, e.cache)
})
@@ -836,6 +838,7 @@ export class WorkspaceStore {
// moment a folder is briefly unmounted.
if (old?.viewport) e.viewport = old.viewport
if (old?.defaultAccountId) e.defaultAccountId = old.defaultAccountId
+ if (old?.breadcrumbs) e.breadcrumbs = old.breadcrumbs
// The clone-notice acknowledgment must also survive an unavailable window: forgetting it
// would re-raise a notice the user already answered the moment the folder remounts.
if (old?.capabilityAck) e.capabilityAck = old.capabilityAck
@@ -972,6 +975,7 @@ export class WorkspaceStore {
closed: e.closed,
viewport: e.viewport,
defaultAccountId: e.defaultAccountId,
+ breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck,
localExec: e.localExec
})
@@ -1269,6 +1273,7 @@ export class WorkspaceStore {
closed: e.closed,
viewport: e.viewport,
defaultAccountId: e.defaultAccountId,
+ breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck,
localExec: e.localExec
})
@@ -1331,7 +1336,7 @@ export class WorkspaceStore {
this.revs.set(e.id, e.cache.rev)
return fileToProject(e.cache, {
id: e.id, ssh: e.ssh, closed: e.closed,
- viewport: e.viewport, defaultAccountId: e.defaultAccountId,
+ viewport: e.viewport, defaultAccountId: e.defaultAccountId, breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck, localExec: e.localExec
})
}
@@ -1438,7 +1443,7 @@ export class WorkspaceStore {
else this.unmirrored.delete(e.id) // pure adopt: the server copy IS the truth now — nothing owed
return fileToProject(adopted, {
id: e.id, ssh: e.ssh, closed: e.closed,
- viewport: e.viewport, defaultAccountId: e.defaultAccountId,
+ viewport: e.viewport, defaultAccountId: e.defaultAccountId, breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck, localExec: e.localExec
})
}
@@ -1453,7 +1458,7 @@ export class WorkspaceStore {
this.unmirrored.add(e.id) // the merged set must land on the server
merged = fileToProject(e.cache, {
id: e.id, ssh: e.ssh, closed: e.closed,
- viewport: e.viewport, defaultAccountId: e.defaultAccountId,
+ viewport: e.viewport, defaultAccountId: e.defaultAccountId, breadcrumbs: e.breadcrumbs,
capabilityAck: e.capabilityAck, localExec: e.localExec
})
}
diff --git a/src/shared/types.ts b/src/shared/types.ts
index 2a4a2636d..fd7ce1f8b 100644
--- a/src/shared/types.ts
+++ b/src/shared/types.ts
@@ -533,6 +533,15 @@ export interface BoardLogApi {
onChanged(projectId: string, cb: () => void): () => void
}
+/** One recorded "deliberate landing" on a node — the breadcrumb trail's unit. Frozen at record
+ * time (nodeId only, no live pointer): a deleted node is filtered at render, a renamed one shows
+ * its current title (read live), but the `note` stays a snapshot of what was happening then. */
+export interface NavStop {
+ nodeId: string
+ at: number
+ note: string
+}
+
/** A project is one canvas/page: its own nodes, viewport, and default working dir. */
export interface Project {
id: string
@@ -586,6 +595,10 @@ export interface Project {
* lineage survives restarts; deletable like any selected edge.
*/
ropes?: BridgeLink[]
+ /** Camera navigation history — deliberate node landings, newest last. MACHINE-LOCAL: rides
+ * `IndexEntryV3.breadcrumbs`, never emitted into the shared project file (a repo must not carry
+ * one person's wandering camera history). See docs/superpowers/specs/2026-08-20-breadcrumb-trail-design.md. */
+ breadcrumbs?: NavStop[]
/**
* Closed projects are hidden from the tab bar but kept on disk with all their nodes (and their
* tmux sessions left running) so they can be reopened from the start screen's "Recently closed"