Skip to content

feat(sidebar): in-flight loading state for archive and project delete#255

Open
sidimed-bahan wants to merge 2 commits into
mainfrom
blocked-lockfile-371
Open

feat(sidebar): in-flight loading state for archive and project delete#255
sidimed-bahan wants to merge 2 commits into
mainfrom
blocked-lockfile-371

Conversation

@sidimed-bahan

Copy link
Copy Markdown
Contributor

Summary

  • Project delete: project rows in the sidebar now show a spinner avatar + "Deleting…" subtitle while the IPC delete is in-flight, with pointer-events-none to prevent re-clicks. A new deletingProjects signal in src/store/projects.ts tracks the in-flight set via addDeleting/removeDeleting around the ipc.deleteProject(id) call in a try/finally.
  • Task archive: task rows now swap their subtitle line for "Archiving…" while isTaskArchiving(id) is true.

Adjacent infra (needed to land this safely)

  • scripts/check.sh strips inherited GIT_DIR, GIT_INDEX_FILE, GIT_WORK_TREE, and GIT_AUTHOR_* / GIT_COMMITTER_* env vars before running tests. Without this, Rust tests (ipc::tests::git_check_ignore_matching_detects_ignored_paths, all five github_remote::tests::* tests) shell out to git init in tempdirs and end up re-initializing the host worktree's gitdir, corrupting its index and aborting the commit.
  • Two descending sort_by calls (in mcp.rs and resource_monitor.rs) switched to sort_by_key(|x| std::cmp::Reverse(x.field)) to satisfy the newly-promoted `clippy::unnecessary_sort_by` lint that's now blocking `cargo clippy -- -D warnings`.

Related to #150 — partial fix: the sidebar loading affordance is in place, but the archive button itself in `GitActions` still unmounts the moment archive starts (since the optimistic `archived=true` filter hides the task), so the in-button spinner from issue #150 is a separate follow-up.

Test plan

  • Delete a project → row stays mounted with a spinning avatar and "Deleting…" subtitle until the IPC returns, then disappears.
  • Archive a task that's currently visible (e.g. via a context where the task isn't auto-deselected) → row subtitle reads "Archiving…" until the IPC completes.
  • `make check` passes with the new `check.sh` env-strip in place.
  • Pre-commit hook completes without re-initializing the worktree.

Verun Tests added 2 commits May 19, 2026 16:33
- Project rows show a spinner avatar + "Deleting…" subtitle while delete is in-flight, with pointer-events disabled to prevent re-clicks
- Track deleting projects in a new signal so the UI can react to delete latency
- Task rows show "Archiving…" subtitle while isTaskArchiving(id) is true

Adjacent infra to unblock the pre-commit hook:
- scripts/check.sh strips inherited GIT_* env vars before running tests, so cargo tests that shell out to `git init` in tempdirs no longer re-init the host worktree's gitdir (was corrupting the index during pre-commit)
- Switch two descending `sort_by` calls to `sort_by_key(|x| Reverse(x.field))` in mcp.rs and resource_monitor.rs to satisfy the newly-promoted clippy::unnecessary_sort_by lint

Related to #150
…g task visible

Run the destroy hook inline so archive_task does not return until the worktree
hook finishes and the last commit message is persisted. Preserve in-store task
order across loadTasks so an in-flight archived task does not jump position,
and keep it in the active list while archiving so the loading row stays put.
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