mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
* chore(react): centralize React root creation via createPluginRoot helper Every standalone React root in the plugin must wrap its tree in AppContext.Provider so descendants can rely on useApp() — PR #2466 fixed one missing wrap (QuickAskOverlay) but the contract was implicit and any new createRoot callsite could silently re-introduce the same crash. Introduce a createPluginRoot(container, app) helper that injects the provider automatically, migrate all 17 createRoot callsites to use it, and add a Jest guardrail that fails if any non-helper file imports createRoot from react-dom/client. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(lint): replace createRoot Jest guardrail with ESLint rule Switch the createPluginRoot enforcement from a Jest test (walks src/ and greps imports) to an ESLint no-restricted-syntax rule. Same invariant, faster feedback (in-editor instead of on test run), and one fewer test file to maintain. The helper file is exempted via the config block's `ignores`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| project | ||
| AddContextNoteModal.tsx | ||
| ApplyCustomCommandModal.tsx | ||
| BaseNoteModal.tsx | ||
| CachePreviewModal.ts | ||
| ConfirmModal.tsx | ||
| CopilotPlusExpiredModal.tsx | ||
| CopilotPlusWelcomeModal.tsx | ||
| CustomPatternInputModal.tsx | ||
| ExtensionInputModal.tsx | ||
| FolderSearchModal.tsx | ||
| LoadChatHistoryModal.tsx | ||
| MigrateConfirmModal.test.tsx | ||
| MigrateConfirmModal.tsx | ||
| ProjectFileSelectModal.tsx | ||
| RebuildIndexConfirmModal.tsx | ||
| ResetSettingsConfirmModal.tsx | ||
| SemanticSearchToggleModal.tsx | ||
| SourcesModal.tsx | ||
| TagSearchModal.tsx | ||
| YoutubeTranscriptModal.tsx | ||