fix(sidebar): stamp lastActivityAt on first worktree discovery (#905)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-05-05 16:17:51 -07:00
committed by GitHub
co-authored by Orca
parent 55d3a42079
commit 8de43cd3b4
10 changed files with 497 additions and 15 deletions
+7
View File
@@ -101,6 +101,11 @@ export type Worktree = {
isPinned: boolean
sortOrder: number
lastActivityAt: number
/** Set once when Orca creates the worktree. Absent for worktrees discovered
* on disk or persisted before this field existed. Used by the sidebar to
* grant newly-created worktrees a short grace window at the top of Recent,
* immune to ambient PTY-bump reordering in other worktrees. */
createdAt?: number
sparseDirectories?: string[]
sparseBaseRef?: string
/** ID of the saved preset this worktree was created from, if any. Cleared
@@ -121,6 +126,8 @@ export type WorktreeMeta = {
isPinned: boolean
sortOrder: number
lastActivityAt: number
/** See {@link Worktree.createdAt}. Persisted to orca-data.json. */
createdAt?: number
sparseDirectories?: string[]
sparseBaseRef?: string
sparsePresetId?: string