Skip to content

fix(core): exclude deleted projects from listing - #39899

Closed
kitlangton wants to merge 1 commit into
v2from
stale-project-picker
Closed

kitlangton wants to merge 1 commit into
v2from
stale-project-picker

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Prevent deleted projects from appearing as selectable targets in the V2 project picker.

Before / After

Before: Project.list() returned every persisted project row, including projects whose canonical directory had been deleted. The TUI project picker exposed that stale path; selecting it could leave the prompt location and footer out of sync, and submitting a prompt failed because the directory no longer existed.

After: project listing verifies each canonical directory still exists before returning it. Deleted project rows remain persisted, but clients no longer receive them as selectable projects.

How

  • packages/core/src/project.ts filters the ordered project rows through the filesystem service before returning them.
  • packages/core/test/project.test.ts covers existing and deleted canonical directories while preserving metadata and recency ordering assertions.

Scope

This does not delete stale rows from the database or change project identity and persistence behavior. It only prevents unavailable projects from being exposed by the project listing API.

Testing

  • bun run test test/project.test.ts from packages/core: 13 passed, 1 skipped
  • bun typecheck from packages/core: passed
  • Pre-push bun turbo typecheck --concurrency=3: 33 packages passed
  • bun run test from packages/core: 1,523 passed, 6 skipped, 1 unrelated failure because ~/.config/opencode/plugins/voice.ts was discovered by the plugin-isolation test

@kitlangton

Copy link
Copy Markdown
Contributor Author

Closing this prototype in favor of #39903 so we can decide the deleted-project lifecycle and validation boundary before landing an implementation.

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.

1 participant