feat(web): let the directory picker clear the Recents list#74
Open
dchaudhari7177 wants to merge 1 commit into
Open
feat(web): let the directory picker clear the Recents list#74dchaudhari7177 wants to merge 1 commit into
dchaudhari7177 wants to merge 1 commit into
Conversation
Recents accumulate dead paths after projects are renamed or deleted, with no way to clean them up from the UI. Adds clearRecents() to recents.ts (removes only the roamcode.recents key — favorites and branch labels survive) and a quiet Clear affordance next to the Recents section header in DirectoryPicker, confirmed via window.confirm and emptying the section without a reload. Closes burakgon#68
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.
Closes #68
What
packages/web/src/picker/recents.ts: newclearRecents()— removes only theroamcode.recentskey; favorites (roamcode.favorites) and the branch-label cache (roamcode.dir-branches) are untouched, so clearing recents never costs a pin or its branch chip.packages/web/src/picker/DirectoryPicker.tsx: a quiet Clear affordance next to the Recents section header (same bordered style as the "New folder" button, reusing thebrowse-headrow layout). Confirmed viawindow.confirm; on confirm the section empties immediately — recents are mirrored into local state so no reload is needed.recents.test.tsfollowing the existing localStorage pattern: clearing empties recents, keeps favorites + their branch labels, and recents repopulate on the next push.Verification
pnpm typecheck,pnpm -C packages/web test(336 passing),pnpm lint(only the 3 pre-existing unused-directive warnings) all green.newsessionscreenshot scene: Clear shows the confirm, empties only the Recents section without a reload (Favorites/Browse stay), and declining the confirm leaves the list intact.roamcode.recentsis removed from localStorage; favorites keys survive.