CanvasAnvil is an open source AI diagram maker and flowchart generator - an infinite-canvas diagram editor and self-hosted drawio alternative that writes editable .drawio files. Text to diagram, then fix nodes, layout and labels in place. Also AI presentations, interior design CAD/BOM, posters and infographics.
TypeScript ai-agentsai-diagramai-presentationbomcadcanvasdiagramdiagram-generatordrawioflowchartinfographicspptppt-generatorpresentation-generatorreactsvgedittext-to-diagramtypescriptworkflow
docs: bring the READMEs up to what this branch actually changed
codingFeng10115a103199a21
diff --git a/README.md b/README.mdindex d864f3e..9c3fe3a 100644--- a/README.md+++ b/README.md@@ -115,13 +115,35 @@ Generate full presentations through a controlled pipeline: outline first, visualCurrent release: `v2.1.0`-Unreleased on `main`:+Unreleased on this branch — a structural refactor of the whole project, plus the+fixes that came out of it. See [CHANGELOG.md](CHANGELOG.md) for the full list.-- Narrowed the product to three canvases: Flow, Interior Design, and PPT.-- Removed the embedded `pptist-lab` editor; editable decks now export directly as `.pptx`.-- Consolidated model access on a single OpenAI-compatible request path.+**Narrowed**-See [CHANGELOG.md](CHANGELOG.md) for the full list.+- Three canvases only: Flow, Interior Design and PPT. The poster, product and infographic canvases are gone.+- The embedded `pptist-lab` editor is gone; editable decks export directly as `.pptx`.+- One OpenAI-compatible request path. The provider list is gone from the app *and* from the `cad-skill` and `ppt-skill` bundles, which had carried a nine-vendor image registry of their own — eight of them with no reachable endpoint.+- The Next.js port that shadowed the Vite client is gone, along with roughly 900 lines of unreachable code the old `PptWorkspace` was hiding.++**Restructured**++- The repository now separates `client/`, `server/`, `contracts/` and `resources/`, and every workspace has the same three layers: pure modules, per-feature hooks, one file per screen. Written down in [docs/architecture.md](docs/architecture.md).+- `PptCanvas.tsx` went from 5,300 lines to roughly 2,250 and renders no UI of its own.+- The shared UI kit, storage layer, file pipeline, chat plumbing and i18n each exist once instead of per workspace.+- TypeScript strict mode is on and the bundle is split: initial load dropped from 2.89 MB to roughly 700 KB raw.+- 260 tests (`npm test`, node:test) cover the pure logic the refactor had to preserve.++**PPT workflow**++- Editable export is immediate. It used to open a text-box review and then spend three model calls per slide; a two-slide deck took over five minutes, and now takes about a second.+- The planner is given the deck template and writes slide descriptions that match it. It used to invent its own palette, which then outvoted the template at render time — a deck built on a dark template came out white.+- Material images attached to a slide, and pictures attached in the chat panel, now actually reach the image model. Both were being dropped before the API call.+- The chat toolbar has two toggles for pinning whether a message edits the current slide image or redraws it; leaving both off keeps the router in charge.+- The slideshow has a way in again — it was complete but had no entry point.++**Fixed**++Twenty-one defects found along the way, including an infinite render loop in every chat panel, four CAD catch blocks that swallowed a failed patch apply, and server-side debug logging that wrote entire conversations to the console.## 🌐 Online Accessdiff --git a/README.zh-CN.md b/README.zh-CN.mdindex 7aabe8c..044984a 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -115,13 +115,34 @@当前版本:`v2.1.0`-`main` 上尚未发布的改动:+本分支未发布内容 —— 整个项目的结构性重构,以及重构过程中发现并修复的问题。完整列表见 [CHANGELOG.md](CHANGELOG.md)。-- 产品收敛为三个画布:流程绘制、室内设计、PPT 演示-- 移除内嵌 `pptist-lab` 编辑器,可编辑演示稿改为直接导出 `.pptx`-- 模型访问统一收敛到单一 OpenAI 兼容请求路径+**做减法**-完整列表见 [CHANGELOG.md](CHANGELOG.md)。+- 只保留三个画布:流程绘制、室内设计、PPT 演示。海报、产品、信息图画布已移除。+- 移除内嵌的 `pptist-lab` 编辑器;可编辑演示稿直接导出 `.pptx`。+- 统一为一条 OpenAI 兼容请求路径。厂商列表不仅从应用中移除,也从 `cad-skill` 和 `ppt-skill` 两个 skill 包中移除 —— 它们各自还带着一份九厂商的图像注册表,其中八个根本没有可用的接口地址。+- 移除与 Vite 客户端重复的 Next.js 移植版本,以及旧 `PptWorkspace` 藏着的约 900 行不可达代码。++**做结构**++- 仓库拆分为 `client/`、`server/`、`contracts/`、`resources/`;每个工作区都是同样的三层:纯函数模块、按功能划分的 hook、一个界面一个文件。规范写在 [docs/architecture.md](docs/architecture.md)。+- `PptCanvas.tsx` 从 5,300 行降到约 2,250 行,并且自身不再渲染任何界面。+- 共享 UI 组件、存储层、文件处理链路、聊天基础设施和多语言各自只存在一份,不再每个工作区一套。+- 开启 TypeScript 严格模式并做了分包:首屏加载从 2.89 MB 降到约 700 KB(未压缩)。+- 260 个测试(`npm test`,node:test)覆盖重构必须保持不变的纯逻辑。++**PPT 工作流**++- 可编辑导出改为即时完成。此前会先进入文本框校对界面,再为每页跑三次模型调用;两页的演示稿要五分钟以上,现在约一秒。+- 大纲规划智能体现在能看到模板,并据此撰写每页画面描述。此前它凭空发明配色,生图时又压过模板 —— 用深色模板做出来的演示稿是白底的。+- 挂在某一页上的素材图、以及在交互区上传的图片,现在能真正送达生图模型。此前它们都在调用接口前被丢弃。+- 交互区工具栏新增两个开关,可指定本次消息是「改图」还是「重画」;两个都不选则仍由模型自行判断。+- 放映功能重新有了入口 —— 它一直是完整的,只是没有任何地方能进去。++**修复**++沿途发现并修复 21 处缺陷,包括每个聊天面板都存在的无限渲染循环、CAD 中四处吞掉补丁失败的 catch 块,以及会把整段对话写进控制台的服务端调试日志。## 🌐 在线使用