fix(workspaces): see a session's work in a Windows folder #25
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Tooling!25
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Tooling:fix/workspaces-windows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Windows,
workspaces.pynever sees a session working in a workspace, socleantreats a workspace someone is in as unused once it hasn't been touched for 24 hours. On a Windows PC with 13 worktrees, sessions of the last day had worked in 12 of them;mainsaw none.Why it missed them:
recent_mentionslooked for each folder exactly as given (E:\x), but a Claude Code transcript never writes it that way on Windows. A session's cwd and the files it edits are JSON ("cwd":"E:\\x"), and commands use forward slashes (E:/x) or Git Bash's/e/x, quoted whenever the path has a space (cd "E:/Dev Work/x").What changed
recent_mentionslooks for each folder in each of those forms (path_forms), with the drive letter in either case, after a quote or not. A listing of folders still counts as no work, and the rule that a session sweeping through more than 8 workspaces works in none of them is unchanged.on_ramdecides from a mount table it's given on any system, so its check runs on Windows too. Without a table it still answers no on Windows, as before.USERPROFILEas well asHOME. On Windows~isUSERPROFILE, so they read the PC's own~/.claude/projectsrather than the made-up one, and failed there.Tests
test_windows_paths: a Windows folder written each of those ways, plus one only named in a listing. It fails onmainon any system (none of the forms is found) and passes here.python -I -B tests/run_all.pyon Windows 11: 6 of 6 pass (main: 4 of 6, withtest_workspaces.py's two Windows failures counted as one file, plus the new check failing).test_workspaces.py's jj check is skipped: jj isn't installed on this PC.Measured (Windows 11, 1.6 GB of transcripts from the last day, 13 worktrees,
recent_mentions(roots, 24)):mainThe time is reading the transcripts (other sessions were using the disk), the same for both; the extra forms cost nothing that shows. Reading every recent transcript whole is the cost to look at separately.
🤖 Generated with Claude Code