Skip to content

fix(work-files): dedupe projects by projectPath - #15

Merged
JeanBaptisteRenard merged 1 commit into
mainfrom
fix/work-files-dedup-projects
May 24, 2026
Merged

JeanBaptisteRenard merged 1 commit into
mainfrom
fix/work-files-dedup-projects

Conversation

@JeanBaptisteRenard

Copy link
Copy Markdown
Collaborator

Bug

The .work-files/ sidebar tab rendered the same project header + file list N times (where N was the number of worktree folders for that repo under ~/.claude/projects/).

For the user reporting this, the skaleet-ai project alone had ~30 worktree-derived folders, all of which resolveWorktreePath collapses to /home/jean-baptiste/workspace/skaleet-ai. The get-work-files IPC pushed one entry per source folder without dedup → 30× same header in the UI.

Fix

One-line guard in main.js:get-work-files: a Set<projectPath> skips already-seen entries.

Verification

  • npm test — 53/53 pass
  • npm run lint — 0 errors (217 pre-existing warnings, unchanged)
  • Manual: on user's machine, the .work-files tab will now show one entry per unique repo instead of repeating per-worktree.

Multiple ~/.claude/projects/ folders can derive to the same projectPath
when resolveWorktreePath collapses worktree paths back to their parent
repo (e.g. ~30 skaleet-ai worktree folders all → /workspace/skaleet-ai).
Without a dedup, the get-work-files IPC pushed one entry per source
folder, producing N copies of the project header and its file list in
the UI.
@JeanBaptisteRenard
JeanBaptisteRenard merged commit e1a99fc into main May 24, 2026
6 checks passed
@JeanBaptisteRenard
JeanBaptisteRenard deleted the fix/work-files-dedup-projects branch May 24, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant