Skip to content

feat(sidebar): restore remove-project functionality#225

Merged
harshitsinghbhandari merged 2 commits into
mainfrom
session/aa-99
Jun 13, 2026
Merged

feat(sidebar): restore remove-project functionality#225
harshitsinghbhandari merged 2 commits into
mainfrom
session/aa-99

Conversation

@harshitsinghbhandari

@harshitsinghbhandari harshitsinghbhandari commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

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.tsx

  • Add onRemoveProject to SidebarProps and thread it through to ProjectItem.
  • ProjectItem: re-add removeError/isRemoving state 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.
  • Re-add the row hover/focus/open padding (group-*/menu-item:pr-[34px]) and the count fade (group-*/menu-item:opacity-0) so the kebab cleanly replaces the session count.

_shell.tsx

  • Re-add the removeProject handler: DELETE /api/v1/projects/{id}, then drop the project from the workspace query cache. Passed to <Sidebar onRemoveProject={…}>.

Sidebar.test.tsx

  • Restore the confirm-before-remove and cancel-aborts coverage alongside the existing class assertions.

Verification

  • npx vitest run — 12 files, 127 passed / 0 failed.
  • npx vite build --config vite.renderer.config.ts — builds.

🤖 Generated with Claude Code

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@harshitsinghbhandari harshitsinghbhandari changed the title fix(renderer): remove orphaned spawn-modal refs crashing the shell fix(frontend): clean up #222 regressions (shell crash, sidebar remove-project, typecheck gate) Jun 13, 2026
#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>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@harshitsinghbhandari harshitsinghbhandari changed the title fix(frontend): clean up #222 regressions (shell crash, sidebar remove-project, typecheck gate) feat(sidebar): restore remove-project functionality Jun 13, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@harshitsinghbhandari harshitsinghbhandari merged commit cc29d85 into main Jun 13, 2026
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