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
47b8179824
feat(web): wire project members CRUD to REST API
...
Add projectMembers client and role adapter; sync members from server on login and modal open; persist add/update/remove via /api/v1/projects/{id}/members.
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
3145550a59
feat(security): complete P0 release blocking remediation
...
Unify auth middleware and remove X-User-ID trust, add project_members
authorization, sandbox workspaces via resolver, and admin-only reconcile
by run_id. Introduce goose migrations with startup schema gate, fail closed
when DB unavailable outside explicit ALLOW_IN_MEMORY, bundle web/dist in
app Dockerfile, and remove frontend pseudo-login fallback.
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
f4e4357ddb
fix(agent): Chat Agent 全链路 P0-P5 整改
...
封堵鉴权旁路与导出 IDOR,DocGov 改服务端身份;对话层 PendingAction 接真实 docgov/taskrun;修复流式租约假死与会话级任务流;加固配置/doc_id/NULL;补齐 slog 与测试;前端 ErrorBoundary 与受控文档重试。
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
9d40a91f9d
feat(web): sync workflow docs from server and persist task artifact in chat
...
Pass doc_id on task runs, merge server deliverable state by task_key,
fetch controlled document content when opening non-template docs, and
map metadata.artifact after refresh.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
bbd1218922
feat(web): asset upload, task run observer, and session lineage on tasks
...
Upload binary attachments as project assets, subscribe by run_id after refresh,
and pass session_id/project_id through long-task requests.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
70493a3ed5
feat(web): wire project list and create to server API
...
Login syncs projects from GET /api/v1/projects; create project uses POST with server-assigned id while preserving local sessions and templates.
Co-authored-by: Cursor <cursoragent@cursor.com >
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 and Cursor
a8c8cba447
fix(web): keep draft when send preflight fails
...
Return accepted/error from handleSendMessage, clear InputArea only on success, and surface thinking/streaming feedback.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
f9c4f9b01b
fix(web): add secure-context-safe clientTurnId helper
...
Provide RFC 4122 v4 fallback via getRandomValues for LAN HTTP pages where randomUUID is unavailable.
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
7ab5041c59
refactor(web): stop persisting full message list to localStorage
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
d17fae0a5d
feat(web): isolate stream runtime by session and turn
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
f5ead1dcd5
feat(web): send stable client_turn_id and resume turns after disconnect
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:22 +00:00
WeiCHEN and Cursor
62ab734021
fix(web): guard chat window fetch races on session switch
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:21 +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
9f7500bb72
fix(web): disable chat stream auto-retry without idempotency
...
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:21 +00:00
WeiCHEN and Cursor
cda534a75d
feat(web): improve chat attachments, unread marks, and session UX
...
Support richer attachment payloads in input area, local read-id cache for
unread badges, and expand private-shared and chronology test coverage.
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 and Cursor
a9fe69ac16
fix(workflow): reconcile version conflicts in review mode and UI retry
...
Auto-adopt current workflow selection version in review/demo backend
paths, and retry frontend workflow switch after refreshing project version.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-09-13 02:50:21 +00:00
WeiCHEN
222b0c2dd6
feat(doc-preview): 上传文档多格式在线预览 + IndexedDB 持久化恢复
...
## 新增功能
- 支持用户上传的 Word(.docx)、PDF、Excel(.xlsx/.csv)、PPT(.pptx)、
图像(png/jpg/svg/webp等)、纯文本/代码文件的在线高保真预览
- 预览与受控工作流文档严格隔离:上传文档走 FilePreviewPanel,
工作流/对话入库文档继续走 BlockRenderer,互不干扰
## 核心 Bug 修复
- 修复页面刷新后上传文件无法预览/下载的根本问题
- 根因:File 对象无法 JSON 序列化,刷新后内存引用丢失
- 方案:新增 fileStore.ts,使用 IndexedDB 持久化文件二进制内容
- App 启动时自动 restoreFileRawToDeliverables() 从 IndexedDB 恢复 fileRaw
- 上传时 saveFile() 同步写入 IndexedDB(fire-and-forget)
## 下载按钮修复
- 优先从内存 File 对象动态创建 blob URL,避免依赖已 revoke 的旧 URL
- 文件内容不可用时按钮禁用并显示 tooltip 说明
## 存储层改进
- saveDeliverables() 序列化前剔除 fileRaw(不可持久化)和 blob: URL
避免 localStorage 保存损坏的空对象
## 新增文件
- web/src/data/fileStore.ts — IndexedDB 封装(saveFile/getFile/restore)
- web/src/components/doc/preview/FilePreviewPanel.tsx — 预览面板主组件
- web/src/components/doc/preview/renderers/DocxViewer.tsx — Word 预览
- web/src/components/doc/preview/renderers/PdfViewer.tsx — PDF 预览
- web/src/components/doc/preview/renderers/ExcelViewer.tsx — Excel 预览
- web/src/components/doc/preview/renderers/PptViewer.tsx — PPT 预览
- web/src/components/doc/preview/renderers/ImageViewer.tsx — 图像预览
- web/src/components/doc/preview/renderers/TextViewer.tsx — 文本预览
- web/src/tests/file-preview.test.ts — 预览功能单元测试
2026-09-13 02:50:21 +00:00
WeiCHEN
60d4df4319
fix(chat): resolve intent recognition, workflow auth, and message ordering
2026-09-13 02:50:21 +00:00
WeiCHEN
917740f26d
feat(project): implement modal-based project creation, creator-led member assignment, and exited-member read-only retention
2026-09-13 02:50:21 +00:00
WeiCHEN
eda2a2b32b
refactor(dialogue): implement task dispatch notifications and consecutive assistant messages with confirmation cards
2026-09-13 02:50:21 +00:00
WeiCHEN
0df8b065c2
refactor(dialogue): naturalize multi-role conversations, close chat sessions with assistant response, and set URS to project shared
2026-09-13 02:50:21 +00:00
WeiCHEN
76e538a47f
fix(doc): resolve URS viewing and private-to-shared workflow in document pane for 10 review projects
2026-09-13 02:50:21 +00:00
WeiCHEN
f48181ee0c
feat(chat): add URS requirement document upload dialogues with attachments and phase events for all 10 projects
2026-09-13 02:50:21 +00:00
WeiCHEN
27fe03a3e3
feat(chat): mount interactive review, approval, and verification confirmation cards in multi-role dialogues
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
a8f74244f5
feat(review): seed 10 real medical device projects with dual workflows, multi-role dialogues and fix account-switch chat isolation
2026-09-13 02:50:21 +00:00
WeiCHEN
42e3ece2c6
fix(workflow): fix 405/404/403 errors on workflow switcher by updating CORS, 5201 demo permissions and server restart
2026-09-13 02:50:21 +00:00
WeiCHEN
408bef6b8a
chore(release): Phase 7 全链路验收报告、测试修复与发布基线归档
2026-09-13 02:50:21 +00:00
WeiCHEN
716aa6f49a
feat(workflow): Phase 6 前端项目多工作流切换器、前置依赖横幅与文档血缘失效提醒
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
3885ef5da2
test(chat): add session turn_intent metadata assertion and chip category navigation tests
2026-09-13 02:50:20 +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
aa19926819
fix(nav): 修复点击项目会话时因 URL hash 监听重放导致被强制回弹选中第一个项目的 bug
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
487dc072f5
feat(history): 实现三模历史搜索、每日智能协同摘要与时间轴侧栏 (Phase P2)
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
fb8f57398c
feat(history): 实现超长对话历史按日归档与滑动窗口 (Phase P0)
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
658e9db65e
fix(web): wire ALL_MOCK_DOCUMENTS and project deliverables to fix document switching
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
096dc8a5b4
fix(web): distinguish recovery action styles for long-task failures
2026-09-13 02:50:20 +00:00
WeiCHEN
8292f69790
feat(web): drive long tasks from SSE with live phases and continue/restart recovery
2026-09-13 02:50:20 +00:00