getFoldersMatching adds root "/" even when it is not an inclusion
@jgclark arbeitet bereits daran.
Seit 17.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Summary
getFoldersMatching() in helpers/folders.js adds the root folder / to its result whenever / is not an exclusion, even when the caller passed a non-empty inclusion list that does not contain /.
That is why a Dashboard perspective that includes only CCC and excludes Notes still lists / in perspectiveScopeUnion.json (seen via Projects + Reviews test: log perspective scope union). Root notes (a filename with no /) then match that scope.
resolvePerspectiveFolders() in jgclark.Dashboard/src/perspectiveScopeUnion.js calls getFoldersMatching() whenever a perspective has a non-empty include list, so it inherits this.
Proposed change
When the inclusion list is non-empty, include / only if / is one of the inclusions. Keep the existing special case where the only inclusion is / (return ['/'], unless / is excluded).
When the inclusion list is empty, keep today's meaning: every folder, including /, unless / is excluded. Folder pickers rely on that.
The tests in helpers/__tests__/folders.test.js currently expect / on a CCC inclusion (the case titled "does not include root folder" asserts toContain('/')). Those would need to change with this.
@dwertheimer -- does this match how you want getFoldersMatching() to treat root? In particular, should an empty inclusion list still return /?
Plugins and commands this would change
Only callers that pass a non-empty inclusion list that does not contain /.
Dashboard (jgclark.Dashboard)
Live folder filter (getCurrentlyAllowedFolders, filterParasByRelevantFolders, tag sections):
- Show Dashboard
- Show Demo Dashboard
- Explain selected item filters
- Generate Diagnostics file
- test Perspective Filter
perspectiveScopeUnion.json, via resolvePerspectiveFolders():
- showPerspective
- Add new Perspective
- Update current Perspective
- Delete Perspective
- Delete all Perspective Settings
- onUpdateOrInstall
Projects + Reviews (jgclark.Reviews)
getFilteredFolderList() calls getFoldersMatching() when foldersToInclude is set (from the active perspective when Use Perspectives is on). The union file is also read when FFlag_UseCacheOfAllPerspectives is on, and always by the two test commands:
- project lists
- start reviews
- next project review
- finish project review
- finish project review and start next
- skip project review
- weeklyProjectsProgress
- heatmaps for weekly Projects Progress
- migrate all projects
- Projects: update plugin settings
- test: log perspective scope union
- test: force rebuild allProjectsList from union
Folder pickers that pass a start folder
chooseFolder() in helpers/userInput.js passes [startFolder] as the inclusion list when a start folder is given. Those pickers would stop offering / unless the start folder is /:
- Templating (
np.Templating), when a template uses<select:SomeFolder> - shared.AI, the "Move to which directory?" prompt when
researchDirectoryis set
chooseFolder() with no start folder, and the getFolders handlers in np.Shared, dwertheimer.Forms, and dwertheimer.ReactSkeleton, pass an empty inclusion list. Under the proposal above they would still include /.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 204
- Forks
- 81
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NotePlan/plugins
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
Task Sorting & Tools: support other line typesEvtl. vergeben @dwertheimer hat das vor 5 Tagen übernommen. Offenenhancement
-
enhancement question
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
newMeetingNoteFromEventID always opens earliest occurrence for Google Calendar recurring eventsEvtl. wieder frei @EduardMe hat das vor 131 Tagen übernommen, und es ist kein Pull Request offen. Offenbug
-
Calendar Plugin v1.0.3: Start Day of WeekEvtl. wieder frei @EduardMe hat das vor 89 Tagen übernommen, und es ist kein Pull Request offen. Offen
Alle Issues in NotePlan/plugins
Ähnliche Issues
-
external-plugin ready-for-review third party
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
github/awesome-copilot#5259 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlineEvtl. vergeben @r2jaff hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ComposioHQ/composio#5054 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
addyosmani/agent-skills#717 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
[Bug] Certificate expiry sorting can reverse UTC order across a viewer daylight-saving gapEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
apache/rocketmq-dashboard#7318 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
W3cOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
web-platform-tests/wpt#64017 ·
Maintainer antworten meist innerhalb von 1 Tag