feat(agents-cli): add recent-projects management with stale entry detection and pruning#3469
Draft
amikofalvy wants to merge 1 commit into
Draft
feat(agents-cli): add recent-projects management with stale entry detection and pruning#3469amikofalvy wants to merge 1 commit into
amikofalvy wants to merge 1 commit into
Conversation
…ection and pruning Implements state management for desktop recent-project entries: - Add/remove/list recent projects with path tracking - Validate project paths exist on disk (detect stale entries) - Auto-prune stale entries whose directories no longer exist - Clean up associated projectSessions, projectWindowBounds, and lastOpenedProject - CLI commands: recent-projects list, remove, prune - Comprehensive unit tests (17 tests) Resolves PRD-7464
🦋 Changeset detectedLatest commit: 558275a The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
amikofalvy
requested a deployment
to
inkeep-oss-sync
July 18, 2026 08:42 — with
GitHub Actions
Waiting
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.
Summary
Resolves [PRD-7464] — Desktop: stale recent-project entries remain after project directory is deleted.
Adds a
recent-projectsstate management module and CLI commands to theagents-clipackage. This provides the core infrastructure for detecting, listing, and removing stale project entries whose filesystem paths no longer exist.What's included
State management (
agents-cli/src/utils/recent-projects.ts)getRecentProjects()— Read the recent projects list fromstate.jsonaddRecentProject()— Add/move a project to the top of the recents listremoveRecentProject()— Remove a project and clean upprojectSessions,projectWindowBounds, andlastOpenedProjectvalidateRecentProjects()— Check which entries have missing directory pathspruneStaleProjects()— Auto-remove all entries whose paths no longer exist on diskgetRecentProjectsState()— Read the full state fileCLI commands (
inkeep recent-projects)inkeep recent-projects listinkeep recent-projects remove <path>inkeep recent-projects prunePlatform-aware state directory
Follows the OS-native application data convention:
~/Library/Application Support/OpenKnowledge/state.json%APPDATA%/OpenKnowledge/state.json~/.config/OpenKnowledge/state.jsonCleanup scope
When removing a project entry, all associated keys are cleaned:
recentProjects— the project entry itselfprojectSessions— any session data keyed by pathprojectWindowBounds— any window geometry data keyed by pathlastOpenedProject— reset to the next most recent project (or cleared)Tests
17 unit tests covering all functions and edge cases (malformed JSON, empty state, nested directory creation, multi-project interactions, stale detection with real filesystem paths).
Changeset
patchbump for@inkeep/agents-cli.Linear Issue: PRD-7464