chore(webui): delete the chat modules orphaned by the Preact refactor
Five files survived the Preact chat cutover with no production consumer: - ui/src/chat/chat-view.jsx, chat-catalog.jsx, chat-panels.jsx: zero importers anywhere in ui/src or ui/test. - ui/src/chat/chat.html: referenced only by chat-view.jsx, itself orphaned. - ui/src/chat/chat-stream.jsx: imported only by ui/test/chat-markdown.test.js. Its updateStreamingReply helper swaps a rendered Markdown node into the DOM -- the imperative hyperscript pattern the Preact port replaced. Corroborating evidence that these were already outside the build graph: a full "task ui" rebuild after deleting them produced NO change to the committed ui/dist bundle, so tree-shaking had already excluded all five. ui/test/chat-markdown.test.js loses only the case that exercised the deleted module. Its two renderMarkdown cases stay, because renderMarkdown is live -- ui/src/chat/chat-render.jsx and chat.jsx both call it. Not touched: chat.jsx, chat-render.jsx, chat-retry.jsx, chat-state.jsx, chat-tools.jsx, chat-update-status.jsx, markdown.jsx -- each still has at least one importer, so none of them is an orphan.
This commit is contained in:
1 parent
9373596188
commit
c8bb7910c2
6 files changed
-191
No files matched your search
@@ -2,7 +2,6 @@ import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import "./shim.js";
|
||||
import { renderMarkdown } from "../src/chat/markdown.js";
|
||||
import { updateStreamingReply } from "../src/chat/chat-stream.js";
|
||||
|
||||
test("chat Markdown renders Telegram-style rich blocks as semantic HTML", () => {
|
||||
const rendered = renderMarkdown(
|
||||
@@ -21,15 +20,6 @@ test("chat Markdown renders Telegram-style rich blocks as semantic HTML", () =>
|
||||
assert.equal(rendered.querySelector("table").querySelector("td").textContent, "Archie");
|
||||
});
|
||||
|
||||
test("streaming assistant replies keep rich Markdown in the live bubble", () => {
|
||||
const bubble = renderMarkdown("draft");
|
||||
const updated = updateStreamingReply(bubble, "# Live\n\n**bold**");
|
||||
|
||||
assert.equal(updated.querySelector("h1").textContent, "Live");
|
||||
assert.equal(updated.querySelector("strong").textContent, "bold");
|
||||
assert.equal(updated.className, "chat-bubble-text");
|
||||
});
|
||||
|
||||
test("chat Markdown renders images as img elements with src and alt", () => {
|
||||
const rendered = renderMarkdown("Here is the generated image: ");
|
||||
const img = rendered.querySelector("img");
|
||||
|
||||
Reference in new issue
Block a user