weichen and Cursor
916931f5d8
feat(web): surface duty_policy author_only badge end-to-end
...
Propagate summary.duty_policy into deliverables/AST and show 编制人兼任 on the action bar.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-17 13:48:59 +00:00
weichen and Cursor
855363fd60
fix(web): gate demo seeds and reclaim mock deliverables
...
Stop shipping hard-coded demo docs/projects into production builds,
drop local mock items on authoritative empty server lists, and purge
stale demo seed residue from localStorage on boot.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-16 02:50:34 +00:00
weichen and Cursor
29bb63f766
feat(web): render PLAN_CONFIRM from PlanView without local AST writes
...
Plan actions post to the decision API and reconcile on 409 instead of mutating documents.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-16 01:09:05 +00:00
weichen and Cursor
bebe1e3690
test(e2e): open UI-11 prelim_design by registered doc_proj id
...
Card title is 系统初步设计方案, not 系统设计输入; select doc_proj*_prelim_design so the template slot cannot be mistaken for the generated document.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 18:46:21 +00:00
weichen and Cursor
56e052f3cb
fix(web): prefer named deliverable over negated 需求
...
Explicit aliases (including 系统设计输入) must win before keyword fallback so UI-11 does not route to intake.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 18:42:44 +00:00
weichen and Cursor
cf3d126436
feat(web): never name-escalate server controlled zero duty ids
...
Mark server summaries dutiesAuthoritative so id 0 stays fail-closed
viewer instead of matching names like a legacy local document.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 17:08:35 +00:00
weichen and Cursor
eefdd4c4fd
feat(web): keep server duties and PATCH with hydrate ETag
...
Retain ledger author/reviewer/approver, fail-closed unknown users to
viewer, and send the opened revision ETag instead of a fresh GET.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 17:02:23 +00:00
weichen and Cursor
6f0057c014
fix(docgov): pin task routing to active controlled doc on current-doc deixis
...
When the user refers to the current document, keep task_key/doc_id on the selected registered doc_proj instead of rerouting by domain keywords.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 15:43:42 +00:00
weichen and Cursor
76e2028761
fix(docgov): UI-03 post-task doc sync, claim idempotency, schema30
...
Restore controlled-doc merge after task terminal states, prioritize intake
template match, ClaimRun before chat writes, and extend chk for
pending_author_confirmation via goose 00030. Real volume migrate + UI
re-run remain pre-merge gates.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 13:39:07 +00:00
weichen
95ab2badf6
fix(chat): preserve intent and task runtime state
2026-09-13 03:51:18 +00:00
weichen and Cursor
0c5256c60c
fix(web): bind task API to resolved intake key when URS-only pool
...
When deliverables only expose user_requirements templates, requirement phrases still must POST intake on V0.1. Re-resolve task_key on retry and skip auto-retry for stage gate errors.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 03:30:13 +00:00
weichen and Cursor
d08cbdc2de
fix(web): route 初始需求 to intake and map stage 403 errors
...
Debug logs showed task runs used user_requirements on V0.1 while the active stage only allows intake. Prefer intake for 初始需求/摸底 phrasing and surface DOC_TASK_NOT_IN_ACTIVE_STAGE instead of SESSION_FORBIDDEN.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 03:28:36 +00:00
weichen and Cursor
d7a144de26
feat(taskrun): resume interrupted runs and harden P1 security gaps
...
Add confirm-gated resume API with resumable flag, Phase 5 finalize fault
and rolling-restart replay tests, Mermaid strict mode, request body limits,
and optional Runner Bearer auth between app and pi-agent.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:23 +00:00
weichen and Cursor
a56d033d3c
feat(web): fail-closed capabilities and admin roles from server API
...
Stop persisting roles to localStorage as authority; AdminSettingsModal reads
and writes role matrices via /api/v1/admin/roles; hasPermission denies when
capabilities are not loaded from /auth/me.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
weichen
844bfd2803
feat(web): consume server capabilities for RBAC decisions
...
Fetch and cache capabilities from /auth/me on login and session restore; hasPermission prefers server capabilities over local role definitions.
2026-09-13 02:50:22 +00:00
weichen
d612c1193e
fix(web): remove identity simulation and stop sending X-User-ID
...
Product UI no longer switches sessions locally; API clients attach Bearer
tokens only and LocalAuthClient stays test-only outside the prod bundle.
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
636eb0ccf1
fix(web): align workbench user ids with auth seed
...
Unify MOCK_USERS with backend auth (admin id=1), merge session identity on login, and migrate demo seeds/tests to id 2/3/4 for 张工/李/王.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN
eea28f0be4
feat(task): inject uploaded documents into task materials and enable LAN host access
...
- backend: add Materials field to TaskRunRequestDTO and forward to ExecuteTask
- backend: add TestTaskStream_MaterialsInjection test case in taskstream_test.go
- web: serialize materials in buildTaskRequest and add unit test
- web: improve isSameMessage identity comparison in messageIdentity.ts
- web: configure host: '0.0.0.0' in vite.config.ts for LAN collaboration access
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
7c830146f5
test(web): cover real temp vs server message identity
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:21 +00:00
WeiCHEN and Cursor
e1a9b302ba
fix(web): merge live and history by serverId and clientTurnId
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:21 +00:00
WeiCHEN and Cursor
6f4e8c0933
feat(web): align project templates with official reference skeletons
...
Replace ad-hoc markdown stubs with reference-system template baselines,
free-text device type input, and add template quality regression tests.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:21 +00:00
WeiCHEN
2e3e43be8f
fix(frontend): align MockDocumentMeta markdown property and guard nullish input in markdownToBlockAST
2026-09-13 02:50:21 +00:00
WeiCHEN
1fc7d0d01f
feat(export): 实现单次智能体回复导出、私密文档保存与隐私防泄露全套闭环 (Phase 0 - Phase 2)
...
- Phase 0: 实现服务端回复导出策略矩阵引擎 (replyexport.EvaluatePolicy)、数据库迁移 (2026-09-11-message-export-policy.sql)、SSE done 事件挂载与能力探测 API
- Phase 1: 构建前端 ReplyDocumentIR 语法树解析与渲染管道,支持 Markdown / DOCX 文件下载及带格式富文本剪贴板复制
- Phase 2: 实现私密自由文档 (freeform_documents) 领域服务、PostgreSQL 乐观锁版本管理、ACL 隐私隔离、一键共享与右侧栏编辑联动
- 专项修复:
1. 修复后台 API 路由注册并加入双向拉取同步,确保私密保存实时进入我的私密列表
2. 实现轻量回复专属 DOCX 生成与静默下载逻辑 (downloadDocxReply)
3. 将 LaTeX 公式转为标准 MathML 矢量标记,支持粘贴到 Microsoft Word / WPS 自动识别为原生公式
2026-09-13 02:50:21 +00:00
WeiCHEN
e8002b2243
feat(category): implement recategorize backfill engine and fallback mapping (Spec §3.4-3.5 A4-A5)
2026-09-13 02:50:20 +00:00
WeiCHEN
7d293833bf
feat(chat): 完成分类锚点坞(CategoryDock)与双轨制未读重构 (含方案A轮次归一化与起始位置居中)
2026-09-13 02:50:20 +00:00
WeiCHEN
1cfe3f9f02
feat(history): 完成 Phase P3 虚拟滚动、聊天记录导出与协同未读提醒
...
- 虚拟滚动:接入 @tanstack/react-virtual,封装 useVirtualMessages 动态测高与 overscan 预渲染,迁移 anchorNavigator 锚点定位与 SSR 兼容降级
- 聊天记录导出:基于既有 docx 与 xlsx 依赖实现 chatExporter 与 ChatExportModal,新增服务端 /api/v1/chat/export/messages 支持按条件导出
- 协同未读标记:新增 useUnreadMarks 30s 轮询与服务端 /api/v1/chat/unread 接口,日历格与工具栏支持橙色未读徽标提示
- 测试与验证:新增 chat_unread_and_export_api_test.go,前端全量 126 项单元/组件测试及生产打包 100% 通过
2026-09-13 02:50:20 +00:00
WeiCHEN
54f1c88791
feat(history): 实现多级历史导航、分类筛选、日历联动与消息双向引用 (Phase P1)
...
- 后端核心与 API:
- 实现 ChatCategoryStat 结构体与 ListChatCategories 统计引擎 (Postgres + In-Memory 内存降级双轨)
- 注册 GET /api/v1/chat/categories 聚合接口
- 增强 GetChatDayMessages 支持自动根据 anchor_id 逆查 day_key,实现免猜测跨日检索
- 前端锚点导航引擎:
- 实现 anchorNavigator 模块 (快路径 DOM scrollIntoView + 1.8s 发光脉冲、慢路径跨日拉取、深链 Hash 解析)
- 编写 anchorNavigator.test.ts 单元测试并 100% 通过
- 分类过滤与轻量月历:
- 实现 CategoryFilterBar 水平分类筛选栏 (8 类业务标签,暗淡/高亮模式)
- 实现 HistoryCalendar 零依赖原生悬浮月历组件 (热度点与消息数,jumpToDate 快速定位)
- 消息引用与双向追溯:
- 消息气泡悬浮“引用”入口,点击提取发言人与摘要至输入框
- 实现 QuoteChip 待发引用标签与 QuoteCard 已发引用卡片
- 引用卡片点击直连锚点定位,快慢路径自动回溯
2026-09-13 02:50:20 +00:00
WeiCHEN
e5e80a6fc6
feat(core): update backend coordinator, docgov lease, squad workflow and web governance integration
2026-09-13 02:50:20 +00:00
WeiCHEN
b83e3de401
fix(web): render step_failed phase as failed strip node with retry reset
2026-09-13 02:50:20 +00:00
WeiCHEN
4dd799c785
feat(web): add task SSE client and live phase-event mapper
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
545765c409
fix(web): escape HTML in chat markdown rendering
...
Prevent self-XSS when chat bubbles render user/LLM markdown via
dangerouslySetInnerHTML by escaping raw HTML after math/code
extraction and sanitizing link href schemes.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
aef1d79060
docs(test): archive auth and dual settings test report
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
793efd31d2
feat(web): add LoginView and FirstLoginPasswordModal components
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
e1c1d03a85
feat(web): wire rbac permission enforcement into left rail and rights modal
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
bd52108c8a
feat(rbac): implement permission evaluation engine and unit test suite
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
cd4d0a19e5
test(engine): add integration tests and archive test report for project template cloning
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:20 +00:00
WeiCHEN and Cursor
3da2324e7c
fix(engine): 修复 DOCX 公式因 undefined 虚根在 Word 中丢失的缺陷
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
258a8dacd2
feat(engine): add project template cloning factory and unit tests
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
2faddab7ac
refactor(types): extend deliverable item with projectId and isTemplateOnly
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
c5d53c28fa
test(engine): 增加 cleanSvgForCanvas 净化与防污染单元测试
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
3c147ed7db
fix(engine): 修复 Mermaid 导出时的 Canvas Tainted 污染与 toBlob 异常
...
- 配置 Mermaid flowchart.htmlLabels 为 false,禁用 foreignObject 嵌入式 HTML 标签
- 实现 cleanSvgForCanvas 深度净化 SVG,剥离 @import 与将 foreignObject 转为原生 SVG <text>
- 替换异步 toBlob/FileReader 为同步 toDataURL + atob,并在 img.onload 中增加安全沙箱 try/catch 兜底
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
808d706180
test(engine): 增加 DOCX 行内 OMML 复合解析与公式转换单元测试
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
80383269e9
feat(engine): 实现 DOCX 原生 OMML 数学公式、Mermaid 高清渲染与出版级公文排版
...
- 集成 mathml2omml 与 KaTeX,实现展示级公式 (<m:oMathPara>) 与行内公式 (<m:oMath>) 的微软原生矢量公式渲染
- 实现 svgToPngData 将 Mermaid 矢量图光栅化为 2.5x 视网膜清晰度的 PNG 图片嵌入 Word
- 重构公文抬头、4列受控签署栏、出版级三线表、keepNext 防孤行与带分割线的受控页眉页脚
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
d4ddd61443
feat(web): integrate interactive cards into chat stream and wire docgov actions
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
ff1eaab820
test(workbench): 增加 DOCX/XLSX 导出与会话隔离单元测试
...
- 验证 DOCX 二进制 Buffer 生成、TextRun 解析与 Blob 输出
- 验证 XLSX 多表提取、自适应列宽与工作簿 Sheet 命名规范
- 验证 sess-001 与 sess-002 对话隔离及动态追加互不串线
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
fefb53ef30
feat(engine): 实现 DOCX 与 XLSX 客户端原生渲染导出引擎
...
- 引入 docx 与 xlsx 依赖,纯前端无损编译 Block AST 交付物
- buildDocxModel: 自动生成两行四列受控签署栏、多级编号标题、Markdown富文本、医疗标准三线表、Cambria Math公式与动态页眉页脚
- buildXlsxWorkbook: 自动提取文档概览与全部数据表格,生成带自适应列宽的 Excel 工作簿并支持直接下载
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
9e84ba71e3
fix(doc): 完善文档系统各层级标题、图表公式与有序列表自动编号引擎
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
f6e4edcb08
feat(intent): add interactive card payload and extended intent contracts
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
f00bf14ab4
test(doc): 完善三分类隐私隔离与流转单元测试并归档全量测试报告
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00
WeiCHEN and Cursor
c46f5422b9
feat(types): 升级交付物数据契约支持工作流/共享/私密三分类与创作者属性
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:19 +00:00