Problem
DiffState.loadForWorktree() and loadForProject() are near-identical — both cancel the previous task, set state, launch a task that calls fetchUnstaged + fetchPRs, and start watching. The only differences are which path/branch they use and which current* property they set.
Location
apps/purepoint-macos/purepoint-macos/State/DiffState.swift — lines 30-60
Suggested Fix
Extract a shared load(path:branch:) and have both public methods call it after setting the appropriate current* properties.
🤖 Generated with Claude Code
Problem
DiffState.loadForWorktree()andloadForProject()are near-identical — both cancel the previous task, set state, launch a task that callsfetchUnstaged+fetchPRs, and start watching. The only differences are which path/branch they use and whichcurrent*property they set.Location
apps/purepoint-macos/purepoint-macos/State/DiffState.swift— lines 30-60Suggested Fix
Extract a shared
load(path:branch:)and have both public methods call it after setting the appropriatecurrent*properties.🤖 Generated with Claude Code