2code icon indicating copy to clipboard operation
2code copied to clipboard

DeleteProjectDialog and data-flow.md still describe delete/git-only teardown (Task 15 gap)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

Parent: #429 / #394. Found while reviewing runtime cleanup (#429) on task-15-runtime-cleanup.

Task 15 made project delete forget/retain in the backend (drop 2code catalog and mappings; leave Herdr workspaces and git checkouts) and routed Herdr-mapped linked-worktree profile delete through JSON worktree.remove. Two user-facing/docs surfaces still describe the old git-only delete:

  1. DeleteProjectDialog.tsx still titles and confirms with m.deleteProject() / m.confirmDeleteProject() / m.delete(). It does not say the project is forgotten from the catalog while checkouts and Herdr workspaces are retained.
  2. docs/data-flow.md Profile System deletion flow still says teardown_script → git worktree remove + git branch -D → delete the profile row. It does not mention Herdr worktree.remove for mapped linked worktrees, Local-unmapped git teardown, or project forget/retain.

This does not block Task 16. Frontend/IPC were correctly left alone on task-15-runtime-cleanup. docs/herdr-integration.md already documents worktree.remove dirty/force/branch-kept and was correctly left alone (#407 is a different contract-docs gap).

Current text

  • DeleteProjectDialog: Trash icon + m.deleteProject() title, m.confirmDeleteProject() body, destructive m.delete() action.
  • data-flow.md Deletion Flow: "If 2code.json has teardown_script, execute in worktree directory; Run git worktree remove and git branch -D; Delete profile record from DB (cascades to sessions)."

Needed

  • Say project removal forgets the 2code catalog and retains checkouts / Herdr workspaces
  • Document mapped profile delete as JSON worktree.remove (then git branch -D) and unmapped delete as today’s git worktree remove
  • Do not treat remaining Task 15 worktree-remove or forget/retain backend work as open

Do not treat #429 as still waiting on dialog copy or data-flow.md for acceptance.

AkaraChen avatar Sep 15 '26 20:09 AkaraChen

Still real on task-10-launch-adopt; Deletion Flow fixed on task-1-verify-gaps (fd538ec).

  • Named docs: docs/data-flow.md:183-189 no longer say teardown → git worktree remove + git branch -D → delete a sqlite profiles row. They record Herdr worktree.remove / workspace.close, fail-closed no git fallback, and profiles DROPped.
  • Test: project::tests::data_flow_deletion_does_not_describe_sqlite_profiles_git_only.
  • Backend project delete is still forget/retain: src-tauri/crates/service/src/project.rs:607-630 (forget_project_session, no worktree.remove); project_delete_is_forget_retain.
  • Delete Project click/label unchanged: DeleteProjectDialog.tsx:86 m.deleteProject(), :100 m.delete().
  • Named exception not taken: messages/en.json:35 confirmDeleteProject is "Are you sure you want to delete this project? This action cannot be undone." — it does not claim irreversible destruction of checkouts / Herdr workspaces. No forget-vs-delete chooser.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen