getFoldersMatching adds root "/" even when it is not an inclusion
@jgclark がすでに取り組んでいます。
2026年10月17日 から。
評価
この issue はまだ評価されていません。
説明
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 /.
- 主要言語
- JavaScript
- スター
- 204
- フォーク
- 81
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NotePlan/plugins のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Task Sorting & Tools: support other line types対応中かも @dwertheimer が 5 日前に担当しました。 オープンenhancement
-
enhancement question
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
newMeetingNoteFromEventID always opens earliest occurrence for Google Calendar recurring events再び着手できるかも @EduardMe が 132 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
-
Calendar Plugin v1.0.3: Start Day of Week再び着手できるかも @EduardMe が 90 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
NotePlan/plugins の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Jason-Vaughan/TangleClaw#2546 ·
メンテナーはふだん 1 日以内に返信
-
area:integration enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
Documentation status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mastra-ai/mastra#28194 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-authored
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
security(chat): require user confirmation before executing assistant-suggested package installationsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
francordel/myrtia#77 ·
メンテナーはふだん 1 日以内に返信