feat: show hidden folders in the folder tree on demand - #83
Merged
Merged
Conversation
Dot-prefixed entries stay out of the tree unless the view asks for them, and a hidden directory is read only once it is both shown and expanded, so the default path still touches nothing extra. Version-control, dependency and build directories join one documented denylist that is never listed or read either way. refs plannotator/herdr-annotate#53
`.` in tree focus shows or hides dot-prefixed entries for the session and says which in the status line, keeping the cursor on its row. Showing is a view choice: review files come from the records on disk, so notes inside a hidden folder are counted and sent whether or not the folder is listed. refs plannotator/herdr-annotate#53
Merged
1 task
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 plannotator/herdr-annotate#53 — a plan in
.agents/drafts/could not be opened fromannotate.open, because the folder tree skipped every dot-prefixed entry.What changed
.in tree focus shows or hides dot-prefixed entries for the session, with a status line saying which (hidden entries shown/hidden entries hidden)..was free: tree focus only boundj/k,Enter/l/RightandEsc, and no global key uses it.The default view is unchanged. Hidden entries stay off at open,
first_file_shallow(which picks the file the folder opens on) still ignores them, and the existing tree fixture test pins the default listing row for row.No new walking on the default path. The tree was already lazy — one directory level at open, a directory's children when it is expanded — so a hidden directory is read only once it is both shown and expanded. Toggling relists the root and re-expands the directories that were already open; nothing else is touched.
Denylist
One documented
SKIPPED_DIRSconst intree.rs, never listed and never read, hidden entries on or off:.cache·.direnv·.git·.hg·.jj·.svn·.venv·__pycache__·build·dist·node_modules·out·target·vendor·venvThe version-control and cache names are new; the rest were already skipped. A repo's
.gitis the one that would otherwise stall the pane, and the tree never creates a row for it, so there is no path by which it can be read.Data behaviour is unchanged
Showing or hiding is a view concern.
review_files()takes the annotated documents from the records on disk (Store::annotated_documents, restricted to the folder root) and merely adds the listed rows that have notes, so notes recorded for a file inside a hidden folder are already part of the review:E, the review counts and Finish review include them whether or not the folder is listed.Tests
.shows.agents, expands down to.agents/drafts/draft.mdand opens it; hiding again restores the default view and leaves the file open.SKIPPED_DIRSname appears when hidden entries are shown, including across a hide/show relist;.git/config.mdnever reaches the tree..agents/and.git/added to its fixture.cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspaceare clean.