From eb5885f7cd5fc271c45c180e398241ba6daccda4 Mon Sep 17 00:00:00 2001 From: murashit Date: Sat, 13 Jun 2026 20:59:02 +0900 Subject: [PATCH] Trim development UI guidance --- docs/development.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/development.md b/docs/development.md index c6b02e63..9d796506 100644 --- a/docs/development.md +++ b/docs/development.md @@ -31,11 +31,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-to-feature imports are allowed when the imported feature owns a concrete capability or integration point, such as thread export, thread title generation, or an Obsidian view. Do not use another feature as a generic utility bucket; move truly feature-neutral behavior to `src/shared/`, `src/domain/`, or `src/app-server/`. Lower-level modules in `src/app-server/`, `src/domain/`, and `src/shared/` must remain independent from `src/features/`; ESLint enforces that dependency direction. -Codex Panel's runtime UI is Preact-owned through the direct Preact APIs. Keep chat panel UI, the Threads view, and the selection rewrite popover in Preact components. The chat panel shell is a single Preact tree; toolbar, goal, message stream, and composer content should be composed as Preact nodes rather than mounted through HTMLElement region renderers. Use `preact/hooks` for hooks, `preact` for component types and fragments, and the shared root adapter for mounting and unmounting Preact subtrees. Imperative DOM writes are limited to explicit bridge modules or Obsidian-owned API boundaries such as `MarkdownRenderer`, TanStack Virtual measurement/lifecycle glue, 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 direct Preact APIs. Keep chat panel UI, the Threads view, and the selection rewrite popover in Preact components; use imperative DOM writes only for explicit bridge modules or Obsidian-owned API boundaries such as `MarkdownRenderer`, virtualizer measurement glue, diff rendering, icon rendering, `SuggestModal`, and the Obsidian `Setting`-based settings tab. -Chat panel state has one owner: `ChatStateStore`. Panel-visible interaction state, including toolbar confirmations, inline rename drafts, generation progress, active-thread metadata, message stream state, and composer state, belongs in the chat reducer as named actions. Signals are allowed only in `src/features/chat/ui/shell-state.tsx`, where they adapt reducer snapshots into Preact updates for the single chat shell. Do not add controller-owned signals, ad hoc Preact state mirrors, or generic state patch actions. Normal chat state changes should dispatch to the store and flow through the shell-state adapter; `mountOrRepairShell` is reserved for initial mount, root repair, and settings-driven shell prop refresh. - -The bundled UI runtime should stay on direct Preact APIs. This avoids browser runtime code that creates `