From e32bff8a9b2452ba1ecc5c324ca7fe73b6849848 Mon Sep 17 00:00:00 2001 From: murashit Date: Sun, 31 May 2026 13:17:11 +0900 Subject: [PATCH] Update Preact compatibility docs --- .github/dependabot.yml | 15 --------------- docs/development.md | 4 ++-- eslint.config.mjs | 19 ++++++++++++------- .../chat/chat-message-renderer.test.ts | 2 +- .../blocks-and-messages.test.tsx | 16 ++++++++-------- .../message-stream/pending-requests.test.tsx | 2 +- .../chat/ui/message-stream/work-log.test.tsx | 10 +++++----- tests/features/chat/ui/react-root.test.tsx | 2 +- .../chat/ui/renderers/turn-diff.test.ts | 2 +- tests/features/chat/view-connection.test.ts | 2 +- .../selection-rewrite.test.ts | 2 +- 11 files changed, 33 insertions(+), 43 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 19453d07..054c5db6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -24,18 +24,3 @@ updates: update-types: - "version-update:semver-minor" - "version-update:semver-major" - # Keep React on 18.x for Obsidian Community plugin review compatibility. - # React DOM 19 bundles runtime code that Obsidian's automated review flags - # as script injection; see docs/development.md. - - dependency-name: "react" - update-types: - - "version-update:semver-major" - - dependency-name: "react-dom" - update-types: - - "version-update:semver-major" - - dependency-name: "@types/react" - update-types: - - "version-update:semver-major" - - dependency-name: "@types/react-dom" - update-types: - - "version-update:semver-major" diff --git a/docs/development.md b/docs/development.md index 93eba31c..7c4ed1cf 100644 --- a/docs/development.md +++ b/docs/development.md @@ -30,9 +30,9 @@ The source tree is organized by responsibility rather than by the original singl Keep new code near the state or API it owns. Feature code should not import from another feature directly; move shared behavior to `src/shared/`, `src/domain/`, `src/app-server/`, or `src/runtime/` when more than one feature needs it. -Codex Panel's runtime UI is React-owned. Keep chat panel UI, the Threads view, and the selection rewrite popover in React components. Imperative DOM writes are limited to explicit bridge modules or Obsidian-owned API boundaries such as `MarkdownRenderer`, diff rendering, icon rendering, `SuggestModal`, and the Obsidian `Setting`-based settings tab. ESLint enforces this boundary with allowlisted bridge files; add a new allowlist entry only when the code is genuinely bridging an external DOM API. +Codex Panel's runtime UI is Preact-owned through `preact/compat`. Keep chat panel UI, the Threads view, and the selection rewrite popover in Preact components, using the React-compatible adapter layer until a targeted compat-removal pass is worthwhile. Imperative DOM writes are limited to explicit bridge modules or Obsidian-owned API boundaries such as `MarkdownRenderer`, diff rendering, icon rendering, `SuggestModal`, and the Obsidian `Setting`-based settings tab. ESLint enforces this boundary with allowlisted bridge files; add a new allowlist entry only when the code is genuinely bridging an external DOM API. -React is pinned to 18.x for Obsidian Community plugin review compatibility. React DOM 19 currently bundles runtime code that creates `