Repository navigation
refactor(projects): share safe dashboard and CLI operations - #602
Conversation
eddb3e3 to
d8b4b7c
Compare
|
Thanks for splitting this so carefully, and for keeping the safeguards from #591 intact. The lock coverage, read-only loading and partial-failure reporting all held up when I traced them. A few things before this can land: Needs a change
Please double-check
Optional
Happy to talk through any of these. If one of them is intentional, a short note in the description is fine. |
d1a5efb to
0fa2d6d
Compare
runkids
left a comment
There was a problem hiding this comment.
Thanks for the quick turnaround. I checked all five against 0fa2d6d2:
- The lock is now in
<state>/projects/, andlock_test.gochecks that nothing gets created next to the config. Service.Putno longer detaches, so saving from the dashboard behaves as it does onmain.- The CLI-only surface is gone.
ExecuteTargetsnow has a single caller, the dashboard, and is the dashboard's existing flow moved intointernal/sync. - Your reasoning on
PathsEqualholds, and having it listed as deliberate with a Windows test is exactly what I was hoping for. - Agents-only remove matches
mainagain, and thesafeguards_test.gocase covers it.
Keeping the save_candidate.go writer separate is fine. Preserving the mode and honoring the umask on first create is a real difference.
Approving. For #603: once it's rebased on this commit and project sync reuses the skillshare sync flow, I'll review it again along with the points from my earlier comment there. Thanks again for the careful work.

What changed
internal/projectsservice, with the detach and bounded sync execution the CLI in part 2 builds on. This PR holds only what the dashboard uses today.Config.Save()callers keep their existing path.gofrs/flockand reload after acquisition. The lock lives in the state dir, like the MCP and hooks locks, so it never lands in a pushed config folder.Deliberate behavior changes:
SkillsPathKeptBycompares paths withPathsEqual. On Windows a case-different spelling is the same folder, sotarget removekeeps it for the other target instead of unlinking it.Why
Repository and worktree setup currently needs a YAML edit or the dashboard to register a global project. This prepares the shared operations the CLI needs while keeping the existing dashboard contracts.
Usage
No usage change.
Part 1 of the two-PR implementation approved in #591 and proposed in #592. Part 2 is #603, which adds all six commands, edit-time detach, completions, docs and end-to-end coverage.
Type
Linked Issue
Refs #591 and #592.
Checklist
make check): focused runs below, CI for the restFocused project, config, sync, sourcefs and server tests pass in the devcontainer, along with Windows cross-vet. The git-backed check and web-ref tests fail there on the base commit too, because a linked worktree's git dir isn't mounted, so CI covers them. A local Roborev review of the final commit is clean.