From aa4430501aae60c8a51dfd4b83d9326d603372b2 Mon Sep 17 00:00:00 2001 From: murashit Date: Wed, 17 Jun 2026 21:38:13 +0900 Subject: [PATCH] Update message stream design docs --- docs/development.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/development.md b/docs/development.md index 97f3ac40..fc425808 100644 --- a/docs/development.md +++ b/docs/development.md @@ -30,7 +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-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. Within the lower-level modules, `src/domain/` and `src/shared/` remain below the app-server boundary: app-server code may depend on domain models to adapt protocol data, but domain and shared code must not depend on app-server modules or generated app-server bindings. -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. +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`, message content rendering and measurement, virtualizer measurement glue, diff rendering, icon rendering, `SuggestModal`, and the Obsidian `Setting`-based settings tab. + +Chat message stream rendering is split by display family. Presentation modules project domain message stream items into `text`, `detail`, and `status` views, and UI modules render those families from `text.tsx`, `detail.tsx`, and `status.tsx`. Keep Codex-specific item shape knowledge inside the presentation family projection, not in UI components. Keep imperative text content rendering and overflow measurement in the explicit `text-content.tsx` bridge rather than in the family renderer. Chat panel state belongs in `ChatStateStore`. Panel-visible state changes should dispatch named reducer actions and flow through the shell-state adapter; do not add controller-owned signals, ad hoc Preact state mirrors, generic state patch actions, or a non-Preact UI runtime without revisiting the project design notes.