feat(sidebar): restore remove-project functionality#225
Merged
Conversation
Contributor
There was a problem hiding this comment.
harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Contributor
There was a problem hiding this comment.
harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
#224 deleted the per-project "remove project" feature (and its tests) instead of completing the wiring #222 left half-applied. Restore it: - Sidebar: add onRemoveProject to SidebarProps, thread it to ProjectItem, re-add the removeError/isRemoving state and the confirm handler, render the "Project actions" kebab (MoreHorizontal) with a destructive "Remove project" item (Trash2), and re-add the row hover/focus/open padding + count-fade classes. - _shell: re-add the removeProject handler (DELETE /api/v1/projects/{id} + drop the project from the workspace cache) and pass it to Sidebar. - Sidebar.test: restore the confirm-before-remove and cancel-aborts coverage alongside the existing class assertions. Rebuilt on top of #224. Full renderer suite green (127 tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2256d4d to
569d967
Compare
Contributor
There was a problem hiding this comment.
harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Contributor
There was a problem hiding this comment.
harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PR #224 deleted the per-project "remove project" feature (and most of its tests) rather than completing the wiring that #222 left half-applied. The capability exists in the daemon/CLI and should be surfaced in the UI. This restores it, rebuilt on top of #224.
Changes
Sidebar.tsxonRemoveProjecttoSidebarPropsand thread it through toProjectItem.ProjectItem: re-addremoveError/isRemovingstate and the confirm handler; render the "Project actions" kebab (MoreHorizontal) with Project settings and a destructive Remove project item (Trash2); on confirm it calls the handler and falls back to the home route if the removed project was active.group-*/menu-item:pr-[34px]) and the count fade (group-*/menu-item:opacity-0) so the kebab cleanly replaces the session count._shell.tsxremoveProjecthandler:DELETE /api/v1/projects/{id}, then drop the project from the workspace query cache. Passed to<Sidebar onRemoveProject={…}>.Sidebar.test.tsxVerification
npx vitest run— 12 files, 127 passed / 0 failed.npx vite build --config vite.renderer.config.ts— builds.🤖 Generated with Claude Code