[Obsidian review blockers] - Step 1: Use the vault config directory - #2787
Conversation
a797282 to
06fa64b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06fa64b4d0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Conservative-scope risk note before merge: This layer currently does more than the Obsidian review error requires. In particular, load-time validation can silently replace an already-persisted copilotFolder with the default, making existing Copilot data appear missing, and the declarative settings host relies on layout-neutralizing CSS that does not arrive until a later PR. I am revising this PR so it is independently safe:
Errors remain the priority. Warning-only cleanup will be left alone when it adds behavior or UI risk. |
06fa64b to
d58fcb1
Compare
d58fcb1 to
a1be02a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1be02a7a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Conservative risk dispositionRisk: High, but retained because it addresses an error-level review finding. This PR changes user input validation, so it is the only surviving layer that can intentionally change behavior. It has been reduced to validating a newly selected Copilot root against the vault's actual configuration directory. The warning-only searchable-settings implementation was removed; persisted roots, storage formats, labels, and rendered settings UI are unchanged. Recommendation: keep this as Step 1 with focused validation tests and review it independently before the type/lint and CI layers. |
a1be02a to
9f650b5
Compare
Relates to logancyang/obsidian-copilot-preview#285
Why
The Copilot root validator assumes the conventional Obsidian configuration-folder name. Vaults can use a different configuration directory, so the current check can reject a harmless folder while allowing a newly selected Copilot root to overlap the real configuration directory.
What
New Copilot-root selections are validated against the active vault configuration directory. Existing persisted roots remain addressable during settings loading and are not reset, moved, or migrated.
Non goal
Screenshot
Not applicable — this PR does not change rendered settings UI.
Risk
High
Review: inspect validateCopilotFolder in src/settings/model.ts, applyCopilotRootChange in src/settings/copilotRootChange.ts, and applyFolderChange in src/settings/v2/components/BasicSettings.tsx; then follow Verification steps 1–3.
Verification