Repository navigation
fix(core): exclude deleted projects from listing - #39899
Closed
kitlangton wants to merge 1 commit into
Closed
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
Contributor
Author
|
Closing this prototype in favor of #39903 so we can decide the deleted-project lifecycle and validation boundary before landing an implementation. |
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.
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.tsfilters the ordered project rows through the filesystem service before returning them.packages/core/test/project.test.tscovers 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.tsfrompackages/core: 13 passed, 1 skippedbun typecheckfrompackages/core: passedbun turbo typecheck --concurrency=3: 33 packages passedbun run testfrompackages/core: 1,523 passed, 6 skipped, 1 unrelated failure because~/.config/opencode/plugins/voice.tswas discovered by the plugin-isolation test