Shweta-Mishra-ai
0c4a5e51fe
fix(global-discover): attribute sessions of removed Claude worktrees to their repository
...
Claude Code creates worktrees at <repo>/.claude/worktrees/<name> and they are
removed once the branch merges, but the sessions recorded under
~/.claude/projects stay. The scanner now discovers those sessions (#1315 ), but
gitProject() returns null for a cwd that no longer exists, so
resolveAndDeduplicate drops them: they are in tools.claude_code.total_sessions
and in no repository's count.
When the cwd is gone and sits at <repo>/.claude/worktrees/<name>[/...], resolve
the project from the repository it was created from. Any other missing
directory is still unattributed, and a worktree that still exists resolves
exactly as before.
Fixture with 6 sessions in a main checkout and 40 in a removed worktree
(46 discovered): repository count before 6, after 46.
2026-10-24 20:25:24 +00:00
..
2026-10-08 16:17:18 +00:00
2026-06-09 22:29:23 -07:00
2026-10-04 07:58:41 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 23:55:41 +00:00
2026-10-20 00:24:28 +00:00
2026-10-07 23:29:05 +00:00
2026-09-21 12:27:25 -04:00
2026-10-20 23:55:41 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-10 23:26:08 +00:00
2026-10-07 23:29:05 +00:00
2026-10-07 23:29:05 +00:00
2026-10-20 00:24:28 +00:00
2026-10-17 21:17:39 +00:00
2026-10-17 21:17:39 +00:00
2026-10-20 00:24:28 +00:00
2026-04-18 15:05:42 +08:00
2026-10-23 05:47:18 +00:00
2026-10-17 02:40:45 +00:00
2026-10-17 01:52:40 +00:00
2026-10-04 07:58:41 -07:00
2026-10-16 22:00:32 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-16 22:00:32 +00:00
2026-10-20 00:24:28 +00:00
2026-10-11 00:32:15 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-07 23:29:05 +00:00
2026-10-04 07:58:41 -07:00
2026-10-19 23:31:59 +00:00
2026-10-20 00:24:28 +00:00
2026-10-03 07:54:09 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-03 16:13:45 -07:00
2026-10-20 01:06:17 +00:00
2026-10-04 07:58:41 -07:00
2026-10-20 00:24:28 +00:00
2026-08-31 08:55:30 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 01:06:17 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-22 20:10:23 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 23:55:41 +00:00
2026-10-20 00:24:28 +00:00
2026-10-06 23:42:19 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-03-26 11:15:24 -06:00
2026-10-16 22:00:32 +00:00
2026-06-25 09:42:45 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-05-21 21:21:07 -07:00
2026-10-04 07:58:41 -07:00
2026-10-20 00:24:28 +00:00
2026-10-01 11:57:48 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-04-24 01:38:21 -07:00
2026-10-20 00:24:28 +00:00
2026-10-24 20:25:24 +00:00
2026-10-20 00:24:28 +00:00
2026-10-14 17:36:39 +00:00
2026-10-20 00:24:28 +00:00
2026-10-08 20:05:06 +00:00
2026-10-11 16:48:11 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-04 07:58:41 -07:00
2026-10-20 00:24:28 +00:00
2026-10-08 15:43:32 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-17 01:52:40 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-17 00:41:41 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 23:55:41 +00:00
2026-03-30 22:25:46 -06:00
2026-10-11 16:48:11 +00:00
2026-10-03 07:54:09 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 23:55:41 +00:00
2026-10-07 23:29:05 +00:00
2026-10-20 01:38:26 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-02 11:11:00 -07:00
2026-10-19 23:31:59 +00:00
2026-10-20 00:24:28 +00:00
2026-10-01 11:57:48 -07:00
2026-10-20 00:24:28 +00:00
2026-10-04 07:58:41 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-01 13:55:16 -07:00
2026-10-16 22:00:32 +00:00
2026-10-04 07:58:41 -07:00
2026-10-10 23:26:08 +00:00
2026-10-16 22:00:32 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-17 03:32:16 +00:00
2026-10-20 23:55:41 +00:00
2026-10-07 23:29:05 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-01 11:57:48 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-01 11:57:48 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-08 20:05:06 +00:00
2026-10-17 03:32:16 +00:00
2026-10-17 00:06:43 +00:00
2026-10-01 11:57:48 -07:00
2026-10-20 00:24:28 +00:00
2026-10-20 00:24:28 +00:00
2026-10-11 16:48:11 +00:00