Skip to content

Remove project api - #52244

Closed
ljluestc wants to merge 6 commits into
anomalyco:devfrom
ljluestc:remove-project-api
Closed

ljluestc wants to merge 6 commits into
anomalyco:devfrom
ljluestc:remove-project-api

Conversation

@ljluestc

Copy link
Copy Markdown

Issue for this PR

Refs #51197 (API part only; no app UI yet)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

There was no way to remove a project: the API only had list and update. This adds Project.remove and exposes it as DELETE /project/:projectID. It returns 404 for an unknown project.

The session, project_directory, permission and workspace tables already reference project with ON DELETE CASCADE, so deleting the row is enough to clean up dependent data. Files on disk are not touched. I also regenerated the JS SDK.

The "remove project" action in the app and clearing the client-side recentlyClosed list are not included; I can follow up with those.

How did you verify your code works?

  • Added tests in test/project/project.test.ts (remove an existing project, NotFoundError for a missing one)
  • bun test test/project/project.test.ts -t "Project.remove" and bun typecheck from packages/opencode

Screenshots / recordings

N/A, no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

ljluestc and others added 6 commits July 5, 2026 17:06
Projects could not be removed through the API or UI. Add project.remove to the
Project service and expose it as DELETE /project/:projectID; dependent rows are
removed by the existing ON DELETE CASCADE foreign keys. Regenerate the SDK.

Refs anomalyco#51197
@github-actions

Copy link
Copy Markdown
Contributor

Hey! Your PR title Remove project api doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants