A project whose directory is gone leaves the sidebar (#1140) - #1716
Merged
Conversation
A registered repo the user renamed or deleted stayed in the Projects sidebar as a grey "not activated" entry with no files (#1142) — the same look as a repo that merely lost its marker — and nothing in the dashboard could remove it. The registry-backed provider now checks each record's directory on every read: a project whose directory is missing is not listed and its id resolves to no path, exactly as if it had never been registered. The registry entry itself is kept, so a directory that comes back (renamed back, a volume remounted) is a project again on the next read; a directory check that fails for any reason counts as missing. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Dogfooded on this branch's build with an isolated daemon (
🤖 automated · Fable 5, effort high |
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.
Fixes #1140. Fixes #1142.
What
A registered repo whose directory was renamed or deleted leaves the Projects sidebar on the next refresh (the projects poll, 30s), and comes back when the directory does. Before, it stayed as a grey "not activated" entry with no files — the
Filestab hides when the file list is empty, andgit ls-filesin a missing directory yields an empty list, which is #1142 — indistinguishable from a repo that merely lost its.the-framework/marker, and with nothing to click to make it go away. A URL naming the vanished project now lands on the existing "not registered" view.The registration is kept: the record is skipped, not pruned, so a renamed-back folder or a remounted volume needs no re-adding.
How
src/dashboard/projects.ts:defaultProjectsProviderfilters the registry records through a directory stat (nodeFs().isDirectory) before bothlist()andresolvePath(); a failing stat counts as gone. Readers are injectable (ProviderDeps) so the provider is testable off the user's registry.Left alone: the daemon's own
listProjectscallers (boot reconcile, bridge session list, Discord summaries) — each already tolerates a missing path per project, and none of them is what the user sees.Tests
projects.test.ts: gone → not listed; gone → no path resolved (present one still resolves); back → listed again; a throwing directory check → gone, no error. Broken on purpose (filter removed): all four fail, the rest pass.Specs
src/dashboard/projects.SPEC.md(new "Vanished project" section + TL;DR line),projects.test.SPEC.md,FEATURES-SPEC.md(Projects sidebar).🤖 automated · Fable 5, effort high