Track container-only tokens and tab focus for cmd+j ranking

Previously ranked by whether any container-only matches existed (boolean);
now counts tokens matching only containers for finer-grained ranking. Tab
focus recency is now tracked explicitly so recent refocuses rank above
stale worktree activity. Preserves worktree grouping by input order while
applying focused-group MRU within each block.
This commit is contained in:
Jinjing
2026-08-24 09:02:30 -07:00
parent f5fd7303ab
commit 52c5675da0
12 changed files with 211 additions and 30 deletions
+2
View File
@@ -147,6 +147,8 @@ const tabSchema = z.object({
color: z.string().nullable(),
sortOrder: z.number(),
createdAt: z.number(),
// Why: corrupt optional recency must not discard the whole persisted tab.
lastFocusedAt: z.number().finite().nonnegative().optional().catch(undefined),
isPreview: z.boolean().optional(),
isPinned: z.boolean().optional(),
// Why: persist the per-tab native-chat view mode so 'chat' survives reload /