fix(desktop): remove stale recent projects (PRD-7464) (#2827)#779
Merged
Conversation
* fix(desktop): remove stale recent projects (PRD-7464) Bring recent-project removal to VS Code "Open Recent" parity across every surface, over the single canonical recentProjects list. - Switcher dropdown + command palette: per-row remove (hover × sibling + right-click "Remove from recent projects"), shared recent-remove-controls. - Missing recents are no longer badged/disabled; they stay openable and self-clean on open (main prunes the stale entry, toasts the window). - New ok:project:recent-removed-missing push + onRecentRemovedMissing bridge method (all three contract mirrors) drive the toast + Navigator list drop. - removeRecentProject already clears projectSessions / projectWindowBounds / lastOpenedProject alongside the list row. * Stop tracking the OpenKnowledge project skill The `open-knowledge` skill is regenerated per machine and version-stamped per app build, so tracking it causes recurring sync conflicts. It is now git-ignored. * fix(desktop): type the recent-removed-missing channel and gate prune on genuine-missing Two review-found corrections to the PRD-7464 recents removal: - Register ok:project:recent-removed-missing in EventChannels so the typed sendToRenderer call type-checks (was a TS2345 that reddened desktop typecheck / the Open Knowledge validation gate). - Replace the raw existsSync gate in pruneRecentIfMissing with an errno-aware checkProjectDirExists probe so a recent whose folder is present but momentarily unreadable (EACCES, unmounted volume, restricted parent) is no longer wrongly dropped; only a genuine ENOENT miss prunes. Adds 5 checkProjectDirExists unit tests (exists / ENOENT / file / EACCES / unsafe). * fix(desktop): add onRecentRemovedMissing to the file-tree e2e mock bridge installRecentRemovedListener (installed at main.tsx boot) subscribes via bridge.onRecentRemovedMissing unguarded, matching the sibling-listener pattern where the test mocks mirror the real bridge. The inline addInitScript mock in file-tree-create.e2e.ts is untyped, so it escaped the OkDesktopBridge type check and was missing the new method. Booting the app in that test threw, the restored tabs never rendered, and "desktop refresh preserves restored tabs" failed deterministically in CI. handoff-mocks.ts was already updated by the feature; this completes the one inline mock that was missed. * fixup! local-review: address findings (pass 1) * fixup! local-review: address findings (pass 2) GitOrigin-RevId: f8e1d38f6e047857efca4d1ef769d8e50aca54cd
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.
Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.