Repository navigation
feat(notes): show recently opened notes first in List Notes - #102
Merged
Merged
Conversation
A note opened often, like todo.md, sat wherever its name put it in List Notes (#18). Like Quick Open, the notes opened most recently now come first under "recently opened", newest first, then the others under "other notes". - a note counts as opened when it becomes the active editor from anywhere: Notes, List Notes, the Explorer, Quick Open; previews and viewers count too - the history is the last 50 notes, kept in the extension's state on this machine, never in settings or the notes folder; it follows moved notes and folders, and deleted notes are left out - while typing, VS Code ranks the matches itself (sortByLabel is a proposed API), so the headings are only shown for the full list, where they're right - Notes: Clear Recently Opened forgets the history
This was referenced Oct 7, 2026
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.
A note opened often, like
todo.md, sat wherever its name put it in Notes: List Notes (Alt+L) (#18). Like VS Code's Quick Open, the notes you opened most recently now come first.Changes
While typing
VS Code ranks matches itself while you type (keeping our order would need
sortByLabel, which is still a proposed API), so a better match comes before a recent one. With the headings in place, "recently opened" then labelled notes that weren't recent, so the headings are only shown for the full list. Once you type, it's VS Code's ranked matches, as in any quick pick.Testing
npm test: 35 passing, 5 new tests for the history (newest first without duplicates, the limit, a moved note, a renamed folder versus a folder with a similar name, clearing). With the folder check loosened to a plain prefix, the renamed-folder test fails.End to end in VS Code 1.140 on macOS:
project.md,alpha.md,b-todo.md,todo.md,zz.md(no headings)zz.md, thentodo.mdtodo.md,zz.md; other notes: the resttotodo.md,b-todo.md, Create entries, no headingsproject.mdfrom the Explorerproject.mdfirst under recently openedtodo.mdintoarchiveThe List Notes scenarios from Combine search for notes and create new notes #34 (create from the list, typed extensions, both sections, Escape) gave the same results.
Closes #18.