You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/diataxis/en/explanation/agent-conversation-focus-mode-plan.md
+35-42Lines changed: 35 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,43 +13,31 @@ This is the current product-facing priority because it connects the existing lea
13
13
single, discoverable interaction loop instead of leaving tutor, path, and focus behaviors split
14
14
across separate UI surfaces.
15
15
16
-
## 2026-05-27 Tauri-First Reply Direction
16
+
## 2026-05-27 Tauri-First Reply Delivery
17
17
18
-
Current branch reality is now asymmetric:
18
+
The Tauri-first reply-rendering baseline is now implemented.
19
19
20
-
- the conversation contract is real,
21
-
- the knowledge-point/action shell is real,
22
-
- Tauri reader hardening is real,
23
-
- scoped knowledge-workspace hydration is real,
24
-
- but assistant reply rendering is still not real in the same sense.
20
+
Delivered now:
25
21
26
-
If Tauri is temporarily allowed to lead and Godot is treated as a later adaptation target, the
27
-
correct architecture center shifts:
28
-
29
-
- Tauri becomes the rich-render baseline,
30
-
- the Reader markdown/math/mermaid pipeline becomes the render substrate,
31
-
- Godot later consumes downgraded/materialized output instead of constraining Tauri-first UX now.
32
-
33
-
### Current code gap
34
-
35
-
The current backend/frontend contract is only partially product-complete:
36
-
37
-
-`src/learning/KnowledgeLearningPlatform.ts` returns `assistantMessage`, `citations`, `knowledgePoints`, memory signals, and trace data.
38
-
-`src/frontend/agent_workspace.js` still consumes `assistantMessage` as a flat string.
39
-
-`src/frontend/workspace_panes.js` still mounts conversation messages through plain `textContent`.
22
+
-`src/learning/types.ts` and `src/learning/KnowledgeLearningPlatform.ts` now expose backward-compatible `assistantBlocks` beside legacy `assistantMessage`,
23
+
-`src/frontend/markdown_runtime.js` now provides a shared markdown/math/mermaid runtime extracted from the Reader-side logic,
24
+
-`src/frontend/workspace_panes.js` now mounts structured assistant replies through typed blocks instead of only plain text when structured payloads are present,
25
+
-`src/frontend/agent_workspace.js` keeps the legacy fallback path so older `assistantMessage`-only responses still work,
26
+
-`html_artifact` rendering now has a sandboxed preview path instead of requiring arbitrary full-HTML injection into the main chat DOM.
40
27
41
-
That means:
28
+
If Tauri is temporarily allowed to lead and Godot is treated as a later adaptation target, the
29
+
architecture center is now aligned as intended:
42
30
43
-
-grounded retrieval works,
44
-
-action orchestration works,
45
-
-but markdown, KaTeX, Mermaid, and structured HTML do not yet reach the agent reply surface.
31
+
-Tauri is the rich-render baseline,
32
+
-the Reader markdown/math/mermaid pipeline is the render substrate,
33
+
-Godot can later consume downgraded/materialized output instead of constraining Tauri-first UX now.
46
34
47
-
### Tauri-first implementation program
35
+
### Delivered implementation program
48
36
49
37
1.**Response contract evolution**
50
-
-Keep `assistantMessage` as a compatibility fallback.
51
-
-Add an `assistantBlocks`shape for typed reply rendering.
52
-
-Start with:
38
+
-`assistantMessage` remains as a compatibility fallback.
39
+
-`assistantBlocks`is now present for typed reply rendering.
40
+
-Current block baseline:
53
41
-`main_markdown`
54
42
-`citations`
55
43
-`knowledge_actions`
@@ -62,34 +50,39 @@ That means:
62
50
-`src/server.ts`
63
51
64
52
2.**Shared render runtime extraction**
65
-
-Reuse the mature Reader pipeline instead of creating a fourth markdown path.
66
-
-Extract the reusable markdown/math/mermaid runtime from:
53
+
-The mature Reader pipeline is now reused instead of creating a fourth markdown path.
54
+
-The reusable markdown/math/mermaid runtime is extracted from:
67
55
-`src/frontend/reader.js`
68
56
-`src/frontend/app.js`
69
57
-`src/reader_renderer.ts`
70
58
-`src/routes/render.ts`
71
-
- The shared runtime should remain browser/Tauri-friendly and later support Godot materialization without being designed around it now.
59
+
- The shared runtime remains browser/Tauri-friendly and preserves a later Godot materialization boundary.
72
60
73
61
3.**Message block renderer in the agent workspace**
74
-
-Replace plain message mounting with a typed block renderer.
- Do not inject arbitrary full HTML into the main chat DOM.
84
-
- Treat large HTML payloads as artifacts with a sandboxed preview flow.
85
-
- This should mirror the existing product direction already proven in external references like Cherry Studio, while staying stack-native to NoteConnection.
71
+
- Arbitrary full HTML is not injected into the main chat DOM.
72
+
- Large HTML payloads are treated as artifacts with a sandboxed preview flow.
86
73
87
74
5.**Streaming and transition safety**
88
-
- Keep current SSE + sync fallback behavior.
89
-
- Stream into `main_markdown` blocks rather than directly mutating plain-text message nodes.
90
-
- Preserve current `knowledgePoints` and capability execution behavior during the transition so the upgrade is forward-compatible rather than a rewrite.
75
+
- SSE + sync fallback behavior is preserved.
76
+
- Structured replies now flow through `main_markdown` blocks while legacy replies still fall back cleanly.
77
+
- Current `knowledgePoints` and capability execution behavior stays forward-compatible.
- keep the new render substrate honest through real browser/Tauri verification,
83
+
- decide later whether Reader itself should delegate more of its internal rendering helpers to the shared runtime rather than only sharing extracted logic.
91
84
92
-
### Acceptance criteria for this next slice
85
+
### Acceptance criteria for this delivered slice
93
86
94
87
1. Tauri agent replies can render markdown headings, lists, tables, KaTeX, and Mermaid without leaving persistent error overlays in the visible chat surface.
95
88
2. The reply surface still works when only legacy `assistantMessage` is present.
Copy file name to clipboardExpand all lines: docs/diataxis/en/explanation/development-progress-dashboard.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,18 @@ Implemented now at current HEAD:
33
33
- Debug and evidence tooling:
34
34
- the repository now ships runtime/webview/window capture helpers plus Mermaid stage/export tooling under `scripts/`, so live Tauri failures can be inspected with first-party evidence commands instead of one-off manual probing.
35
35
36
-
Current Tauri product gap:
36
+
Tauri-first reply rendering baseline delivered:
37
37
38
-
- The agent reply area is still plain-text oriented.
39
-
-`src/frontend/agent_workspace.js` still consumes `assistantMessage` as a flat string, and `src/frontend/workspace_panes.js` still mounts conversation messages via `node.textContent = message`.
40
-
- This means the current Tauri chat shell can issue grounded requests and action cards, but it still does not reuse the mature Reader markdown/math/mermaid rendering path for assistant replies.
41
-
- The next delivery step is therefore not another generic shell expansion. It is a Tauri-first reply-rendering upgrade that preserves the current contract while introducing a richer message model.
38
+
-`src/learning/types.ts` and `src/learning/KnowledgeLearningPlatform.ts` now expose backward-compatible `assistantBlocks` alongside legacy `assistantMessage`,
39
+
-`src/frontend/markdown_runtime.js` now carries a shared markdown/math/mermaid runtime extracted from the Reader-side logic,
40
+
-`src/frontend/workspace_panes.js` now mounts assistant replies through typed blocks instead of only plain text when structured payloads are present,
41
+
-`src/frontend/agent_workspace.js` keeps legacy fallback behavior intact, so older `assistantMessage`-only flows still render.
- keep the new render substrate honest under real browser/Tauri runtime verification,
47
+
- preserve a clean downgrade/materialization boundary for later Godot reuse.
42
48
43
49
Code-vs-plan reality for this slice:
44
50
@@ -48,7 +54,7 @@ Code-vs-plan reality for this slice:
48
54
| Tauri markdown reader parity | markdown, math, and Mermaid should survive real runtime conditions without persistent error overlays | reader/runtime paths now render Mermaid with frontend-first + backend-PNG fallback and suppress leaked error artifacts | Operational |
49
55
| Provider settings | provider/model/API-key controls should be isolated and write durable TOML configuration | dedicated agent/provider settings surface plus preset/TOML template helpers are now present | Operational |
50
56
| Conversation retry transport | turn/replay headers should survive browser/Tauri preflight | CORS now allows both conversation turn headers | Closed |
51
-
| Tauri agent reply rendering | assistant replies should render rich markdown instead of plain text |reply area still uses `assistantMessage` + `textContent` and therefore remains rendering-incomplete|Open|
57
+
| Tauri agent reply rendering | assistant replies should render rich markdown instead of plain text |backward-compatible `assistantBlocks` plus shared markdown runtime now power rich assistant replies, while legacy `assistantMessage`remains supported|Operational|
52
58
53
59
## 2026-05-26 Program F Closure
54
60
@@ -169,8 +175,8 @@ Current branch status for this slice:
169
175
- graph-focus fullscreen now promotes the real graph workspace instead of only enlarging a metadata card (`src/frontend/workspace_panes.js`, `src/frontend/styles.css`),
170
176
- the scoped-knowledge conversation flow is now materially more honest about corpus readiness: active folder target flows into the request contract, the server selectively hydrates likely title-matching documents into the workspace, and conversation traces now include readiness + miss diagnostics instead of only returning an empty top-k result (`src/frontend/source_manager.js`, `src/frontend/agent_workspace.js`, `src/server.ts`, `src/routes/data.ts`, `src/learning/KnowledgeLearningPlatform.ts`),
171
177
- the new agent workspace shell now has i18n coverage for static shell strings plus runtime button/empty-state messaging, existing knowledge-card actions / localized system messages now re-render on language change instead of staying in the previous locale, conversation card rerender is now centralized through a card-kind renderer registry, and a source-level parity guard now checks append-kind vs registry alignment (`src/frontend/index.html`, `src/frontend/locales/en.json`, `src/frontend/locales/zh.json`, `src/frontend/workspace_panes.js`, `src/frontend/agent_workspace.js`, `src/agent_workspace.frontend.test.ts`),
172
-
- provider/model/API-key settings are now isolated into a dedicated agent settings page with preset-template and TOML-template flows, but reply rendering in that same workspace still remains plain-text and is therefore the next obvious Tauri-first closure item (`src/frontend/index.html`, `src/frontend/settings.js`, `src/notemd/AppConfigToml.ts`, `src/notemd/providerTemplates.ts`),
173
-
- the reader/runtime render stack is now substantially more robust for Tauri markdown usage: raw markdown, KaTeX, Mermaid frontend render, Mermaid backend PNG fallback, and leaked Mermaid error suppression are all present; the missing step is to reuse that stack inside the agent reply surface instead of keeping it isolated to the Reader (`src/frontend/reader.js`, `src/frontend/app.js`, `src/reader_renderer.ts`, `src/routes/render.ts`, `src/notemd/MermaidProcessor.ts`),
178
+
- provider/model/API-key settings are now isolated into a dedicated agent settings page with preset-template and TOML-template flows, and the same agent workspace now also has a typed rich-reply baseline instead of staying plain-text-only (`src/frontend/index.html`, `src/frontend/settings.js`, `src/notemd/AppConfigToml.ts`, `src/notemd/providerTemplates.ts`, `src/frontend/markdown_runtime.js`, `src/frontend/workspace_panes.js`, `src/frontend/agent_workspace.js`),
179
+
- the reader/runtime render stack is now substantially more robust for Tauri markdown usage: raw markdown, KaTeX, Mermaid frontend render, Mermaid backend PNG fallback, leaked Mermaid error suppression, and a shared markdown runtime for agent replies are all present (`src/frontend/reader.js`, `src/frontend/app.js`, `src/frontend/markdown_runtime.js`, `src/reader_renderer.ts`, `src/routes/render.ts`, `src/notemd/MermaidProcessor.ts`),
174
180
- locale governance now includes backend-to-frontend capability label-key parity blocking: emitted conversation capability `labelKey` values must resolve to non-empty bilingual `agentWorkspace.actions.*` entries (`src/learning/KnowledgeLearningPlatform.ts`, `src/frontend/locales/en.json`, `src/frontend/locales/zh.json`, `src/agent_workspace.locale.contract.test.ts`),
175
181
- modular knowledge-route closure now includes live browser strict proof instead of snapshot-only recovery: conversation response wiring, capability-triggered request routes, card-title localization, and graph-focus compatibility now pass `STRICT`, `UI_STRICT`, and `UI_DYNAMIC_STRICT` against real browser/network traces (`src/routes/knowledge.ts`, `src/learning/KnowledgeLearningPlatform.ts`, `src/frontend/app.js`, `src/frontend/locales/en.json`, `src/frontend/locales/zh.json`, `scripts/verify-agent-workspace-browser.js`),
176
182
- locale governance now also blocks capability failure-message drift: emitted `failure.messageKey` values must resolve to bilingual `agentWorkspace.messages.*` entries with aligned interpolation placeholders and stable fallback placeholder sets (`src/learning/KnowledgeLearningPlatform.ts`, `src/frontend/locales/en.json`, `src/frontend/locales/zh.json`, `src/agent_workspace.locale.contract.test.ts`),
0 commit comments