lhl
|
82c435a9b2
|
fix(server,ui): 根治 HTML/资源版本错配——/ 每请求现读 chat.html+现算 ?v;侧边栏布局双保险;Vite 插件实时转换(去 index.html)
|
2026-09-12 22:53:23 +08:00 |
|
lhl
|
26302866cf
|
docs: 更新 AI 使用日志(侧边栏滚动/输入区钉底修复)
|
2026-09-12 22:14:28 +08:00 |
|
lhl
|
574c366efd
|
fix(ui): 侧边栏项目+其他会话共用单一滚动容器(side-scroll);锁定 #main/#composer 使输入区永钉底部
|
2026-09-12 22:14:28 +08:00 |
|
lhl
|
10499abed0
|
docs: AGENTS/README 增服务启动与前端热更新说明 + AI 使用日志
|
2026-09-12 18:59:38 +08:00 |
|
lhl
|
8188f08f1b
|
feat(frontend): 引入 Vite dev server(HMR)+代理; chat.css 纳入前端源; esbuild 改 outdir 产出 chat.js/chat.css
|
2026-09-12 18:59:38 +08:00 |
|
lhl
|
df1faeb99f
|
docs: 更新 AI 使用日志(前端自动化 verify)
|
2026-09-12 18:40:30 +08:00 |
|
lhl
|
e04b727acf
|
chore(frontend): 新增 npm run verify(typecheck+test+build) 与 watch 脚本;AGENTS.md 要求改前端后必跑 verify
|
2026-09-12 18:40:29 +08:00 |
|
lhl
|
0e56ef347e
|
docs: 更新 AI 使用日志(AGENTS.md 同步)
|
2026-09-12 18:37:26 +08:00 |
|
lhl
|
6abee41bd2
|
docs(agents): 更新技术栈为 TypeScript+esbuild、补充 frontend/ 结构与前端构建步骤
|
2026-09-12 18:37:26 +08:00 |
|
lhl
|
7becc8265d
|
docs: README 前端构建说明 + AI 使用日志(TS 迁移)
|
2026-09-12 18:07:54 +08:00 |
|
lhl
|
6793fa3658
|
refactor(frontend): 迁移到 TypeScript + esbuild 单一 ESM 打包(删除 chat_state.js/chat_ws.js,chat.html 改 module 入口)
|
2026-09-12 18:07:54 +08:00 |
|
lhl
|
56b79fb646
|
docs: 更新 AI 使用日志(favicon + 抽屉蒙版)
|
2026-09-12 17:50:33 +08:00 |
|
lhl
|
b25ed4809c
|
feat(ui): favicon(svg+204 路由) + 抽屉删左栏/宽度变量520/蒙版0.5(点蒙版关闭带未保存确认)
|
2026-09-12 17:50:32 +08:00 |
|
lhl
|
71ecc177ee
|
docs: 更新 AI 使用日志(侧边栏项目树 + 对齐 + 空态)
|
2026-09-12 17:09:17 +08:00 |
|
lhl
|
2def01563e
|
feat(ui): 侧边栏项目树(项目/其他会话)+配置按钮+追加项目; 气泡与输入框对齐; 空态发送后清除; 移除底部新建项目与项目管理菜单
|
2026-09-12 17:09:17 +08:00 |
|
lhl
|
7b8ffea564
|
docs: 更新 AI 使用日志(缓存错配修复 + 输入区布局)
|
2026-09-12 15:48:28 +08:00 |
|
lhl
|
9946823f0a
|
fix(ui): 修复资源缓存错配白屏(no-store+资源版本号+setText空值防御) + 豆包式输入区(去分割线/输入框铺满/图标发送/textarea自增高)
|
2026-09-12 15:48:28 +08:00 |
|
lhl
|
1e8b6ba6cb
|
docs: 更新 AI 使用日志(豆包式布局重构)
|
2026-09-12 14:36:08 +08:00 |
|
lhl
|
0f4b34f46f
|
test: 静态资源测试改走 /static(与 56a2ff8 统一挂载一致)
|
2026-09-12 14:36:08 +08:00 |
|
lhl
|
2ec347d905
|
feat(ui): 豆包式布局—顶栏会话名/空态有什么可以帮到你的/底部工具栏(项目+新建+上传+影响调查)/历史项⋯重命名/上传去zip
|
2026-09-12 14:36:07 +08:00 |
|
lhl
|
8a3dc8826a
|
docs(superpowers): 豆包式布局重构设计文档与实施计划
|
2026-09-12 14:36:07 +08:00 |
|
lhl
|
a8c178ef1e
|
feat(server): PATCH /api/sessions/{sid} 会话重命名 + service.rename_session
|
2026-09-12 14:27:53 +08:00 |
|
lhl
|
b14c2213bc
|
docs(superpowers): 补录前端美化与交互改造的设计规范与实施计划
- docs/superpowers/specs/2026-08-30-frontend-beautify-design.md
前端美化与交互改造设计(深色指挥中心 + 文档工作台混合风格,
单一青绿 #5EEAD4 强调色,chat.html 拆为 chat.html + chat.css + chat.js,
8 项交互改善,用户决策 10 项)
- docs/superpowers/plans/2026-08-30-frontend-beautify.md
前端美化与交互改造 Implementation Plan(三步走:机械拆分 → 视觉重塑 →
交互改造,Task 独立 commit,浏览器手测验证)
按项目文档规则存入 docs/superpowers/ 目录。
|
2026-08-31 22:33:46 +08:00 |
|
lhl
|
19d214039c
|
fix(frontend): 完整恢复 chat.js UI 业务逻辑 + 折叠按钮图标/标题切换
背景:之前 commit a16996b 从 git 520c9e2 恢复 chat.html 内联 JS 段到 chat.js
时,提取过程因 PowerShell 5.1 `>` 重定向默认按 UTF-16 LE 写入文件、
后续 UTF-8 解码时字节被错误解读,导致 chat.js 包含大量乱码字符和未关闭
的字符串字面量。Node.js 解析时报 `Unexpected token ':'` 错误。
本次重新提取:
- 用 `git cat-file -p` 直接获取原 chat.html 的 UTF-8 原始字节
- 找到内联 `<script>...</script>` 段(从 byte 24765 到 54899,共 30134 字节)
- 按 UTF-8 解码后写回 chat.js(30279 字节)
- 验证 Node.js 解析通过
变更:
- chat.js 整体重写:27094 字节 → 30306 字节
- 恢复正确的简体中文 UI 文案("请新建项目或者选择项目"等)
- 恢复正确的字符串字面量(之前是乱码字符)
同时恢复 commit 264054b 的折叠按钮增强:
- toggleSidebar 切换图标 '«' / '»'
- 切换 title "折叠侧边栏" / "展开侧边栏"
- 切换 data-state 'expanded' / 'collapsed'
零行为变更:JS 内容完全从 git 520c9e2 恢复,
只是 264054b 的 toggleSidebar 增强被应用。
验证(node --check):
- chat.js 0 errors
- /static/chat.js 服务端响应 200, 30306 bytes
后续浏览器手测清单:
- [ ] 侧边栏折叠按钮:点击正常切换 + 图标/标题变化
- [ ] 项目下拉:弹出 + 切换项目
- [ ] 新建项目抽屉:滑入
- [ ] 发送消息:用户气泡 + 自动滚动
- [ ] 上传:选文件 + 上传进度
|
2026-08-31 12:15:57 +08:00 |
|
lhl
|
264054ba44
|
feat(ui): 折叠按钮位置统一到侧边栏内下边 + 状态切换图标
背景:原折叠按钮位置 top: 18px; right: -14px(顶部右外侧),
折叠态切换到底部左下角(top: auto; bottom: 14px; left: 14px),
导致两个问题:
- 折叠/展开状态位置不一致
- 按钮图标始终是 «,折叠态下也应该显示 »(UX 错误)
变更:
- chat.css #sidebar-toggle
- top: 18px; right: -14px → top: auto; bottom: 14px; left: 14px
- 折叠态位置规则 #sidebar.collapsed #sidebar-toggle 改为注释占位
(不再切换位置,按钮始终在侧边栏内下边)
- chat.html #sidebar-toggle
- 加 data-state="expanded" 属性
- title 从「折叠/展开侧边栏」改为「折叠侧边栏」
- chat.js toggleSidebar(force)
- 末尾加 8 行:根据 willCollapse 切换 textContent ('«' / '»')、
title ('折叠侧边栏' / '展开侧边栏')、data-state ('expanded' / 'collapsed')
- _AI_USAGE_LOG.md +1 条记录本轮所有 Agent 实现
副作用:折叠态下按钮因容器变窄(56px)且 left:14px,
视觉上自动居中(14+28+14=56),展开态下偏左。
这符合「侧边栏内下边」的语义(折叠态下按钮成为唯一视觉元素,居中更平衡)。
零行为变更:除位置/图标/title/data-state 切换逻辑外,
toggleSidebar 原有逻辑(classList toggle + localStorage 写入)完全保留。
验证(serve --fake @ http://127.0.0.1:8000):
- GET /static/chat.js -> 200 (text/javascript, 33669 bytes)
- GET / HTML 含 data-state="expanded" -> True
- GET / HTML 含 title="折叠侧边栏" -> True
|
2026-08-31 08:51:25 +08:00 |
|
lhl
|
a16996b377
|
fix(frontend): 拆分 chat.html 内联 JS 到 chat.js + 恢复 UI 业务逻辑
背景:上一轮 chat.html 拆分 CSS 到 chat.css 时(commit 561f7ee),
误把行 509-1180 的整段内联 <script>(约 670 行 UI 业务逻辑)当 CSS 一起删了。
同时 rm 掉了 chat.js。导致 chat.html 引用 chat.js 404,所有 UI 交互失效:
- 侧边栏折叠按钮:click 监听丢失
- 项目下拉 / 抽屉打开:openProjectDrawer 调用丢失
- 上传 / 发送 / 输入框:所有 addEventListener 丢失
- RAG 开关 / 影响调查按钮:监听丢失
本 commit 恢复所有 UI 业务逻辑(从 git 历史 520c9e2 拿原 chat.html 内容):
变更:
- 新增 src/genesis/server/static/chat.js(670 行,含 28 个函数 / 1 个 IIFE)
- addMsg / esc / showTyping / api
- refreshSessions / deleteSession / loadProjects
- applyProjectContext / renderProjectSwitcher / toggleProjectSwitcher
- openProjectDrawer / closeProjectDrawer / loadDrawerForm
- drawerSnapshotNow / isDrawerDirty / guardDrawerDirty
- clearPfInvalid / flagPfInvalidByMessage / renderDrawerList
- saveDrawerProject / deleteDrawerProject / toggleSidebar
- updateUploadBar / renderEmptyOrWelcome
- newSession / loadSession / send
- readRagFlag / writeRagFlag / refreshRagStats / updateImpactButton
- pickExt / projectHasPrefixedType
- 启动 IIFE:恢复侧边栏折叠态 + 加载项目 + 恢复上次会话
- chat.html +1 行:<script src="/static/chat.js" defer></script>
- defer 保证 DOM 解析完成后执行
- 放在 chat_ws.js 之后(依赖 GenesisState / GenesisWS 全局)
零行为变更:JS 内容逐行恢复,仅拆出到独立文件。
chat.js 不动 chat_state.js / chat_ws.js(保持职责单一)。
验证(serve --fake @ http://127.0.0.1:8000):
- GET /static/chat.js -> 200 text/javascript; charset=utf-8 (33286 bytes)
- GET /static/chat.css -> 200 text/css; charset=utf-8 (20803 bytes)
- GET /static/chat_state.js -> 200 text/javascript; charset=utf-8
- GET /static/chat_ws.js -> 200 text/javascript; charset=utf-8
- GET / HTML 含 chat.js defer 引用 -> True
|
2026-08-31 06:36:45 +08:00 |
|
lhl
|
56a2ff82a5
|
fix(server): 挂载 StaticFiles 统一提供 chat.css / chat_state.js / chat_ws.js
背景:上一轮把 chat.html 的内联 CSS 拆到 chat.css,并新增 <link href="/chat.css">
引用,但 app.py 只为 chat_state.js / chat_ws.js 注册了 FileResponse 端点,
/chat.css 没有对应路由,浏览器加载返回 404,整个页面无样式。
修复:
- app.py 删除 chat_state.js / chat_ws.js 显式端点
- 改用 app.mount('/static', StaticFiles(directory=static_dir))
- chat.html 三处 URL 改为 /static/chat.{css,state.js,ws.js}
优点:未来 chat.js 拆分无需再改 app.py。
验证(serve --fake @ http://127.0.0.1:8000):
- GET /static/chat.css -> 200 text/css; charset=utf-8
- GET /static/chat_state.js -> 200 text/javascript; charset=utf-8
- GET /static/chat_ws.js -> 200 text/javascript; charset=utf-8
- GET /chat.css(旧路径) -> 404(已废弃,HTML 中无引用)
|
2026-08-31 03:16:07 +08:00 |
|
lhl
|
4feaea6e1d
|
docs(frontend): 同步前端 UI 设计规范 + AI 使用日志
- docs/design.md 追加「前端 UI 设计规范」章节(设计系统、文件结构、兼容约束、本轮交付 vs 计划)
- _AI_USAGE_LOG.md 追加 5 条本轮记录(架构设计 / Agent 实现 / 反馈迭代 三个范式步骤)
参考:docs/superpowers/specs/2026-08-30-frontend-beautify-design.md
|
2026-08-30 22:59:43 +08:00 |
|
lhl
|
5eac6480cf
|
feat(frontend): 视觉重塑 - 深色指挥中心 + 文档工作台混合风格
- 颜色令牌替换 Material 蓝 → 深空灰底 (#0B0F17) + 唯一青绿强调色 (#5EEAD4)
- 字体策略:Google Fonts → 系统字体栈(-apple-system, PingFang SC, Microsoft YaHei 等)
- 六大区域样式全部按 spec §二 重写:侧边栏 / 顶栏 / 聊天 / 上传 / 输入 / 抽屉
- 气泡去掉阴影改细边;用户消息左侧 2px accent 竖条;助手消息顶头 6px accent 圆点
- 顶栏 backdrop-filter: blur(12px) 毛玻璃;抽屉 backdrop-filter: blur(8px) 遮罩
- 字号阶梯 11/12/13/14/15/17;圆角阶梯 6/10/14
spec: docs/superpowers/specs/2026-08-30-frontend-beautify-design.md
plan: docs/superpowers/plans/2026-08-30-frontend-beautify.md
|
2026-08-30 22:51:40 +08:00 |
|
lhl
|
561f7ee747
|
refactor(frontend): 拆分 chat.html 内联 CSS 到 chat.css(机械拆分,行为零变更)
|
2026-08-30 22:46:06 +08:00 |
|
lhl
|
520c9e25b0
|
feat(ui): 前端整改 —— RAG 入口产品化、放开 select、高级字段折叠、字段级红框
按"不考虑时间、考虑正确合理"原则逐块实施。
P0-B 放开 select
- chat_state.js: shouldHideUploadSelect 始终 false; resolveUploadType 尊重用户选择
- chat.html: 选项目时 select 不再隐藏 + 不再强改 file_type=requirements
- 客户端 file_type↔扩展名校验(existing_system=.zip, requirements=.xlsx 等)
- 项目已预置同类型时 confirm() 显式覆盖确认(不藏起入口)
P0-C 高级字段折叠 + 字段级红框
- 项目抽屉主面板仅留 项目名/显示名;4 个服务器路径字段收进 details.advanced
- saveDrawerProject 错误时按 ProjectConfigError label 关键字(模板/做成说明书/
既有系统代码库/既有设计文档目录/项目名)给对应输入加 .invalid 3s 清除
- 删除按钮 pf-delete 改用 hidden 而非 style.display
P0-A RAG 入口产品化
- 后端 RagStore.count(scope) 线程安全读加锁
- GenesisService.rag_stats(sid) 含 except 兜底(count 抛错返回 0)
- GET /api/sessions/{sid}/rag-stats 端点
- 前端顶栏:RAG 开关 + RAG 已索引 N 片段 状态徽标 + 开始影响调查按钮
- 上传 existing_system 后自动 refreshRagStats 刷新徽标
- 开关持久化到 localStorage(genesis_rag_enabled)
P1-D loadSession 不再隐式覆盖 draftProject
- activeProject vs draftProject 分层;不一致时由 renderProjectMismatchHint
提示用户主动"切到该项目"或"保留当前项目"
- 保留 写入 sessionStorage 标记,避免每次 load 都提示
P1-F 删除抽屉项目 fallback 收敛
- 先记 deleted 再清 drawerSelected,修复"先 null 后比较"恒假 bug
- buildWelcome 唯一来源(chat_state.js 单点,前端内联重复移除)
P2-H 杂项
- send() in-flight 锁防双击
- input maxlength=2000
- 启动恢复前校验项目存在 + loading 占位
- select 关联 label for
- esc 转义加 引号
- sid 全程 encodeURIComponent
- avatar 按 name hash 选色 + 中文首字(Array.from)+ aria-label 含名字
测试:619 passed / 99.01% 99.0% 达标(+8 覆盖 store.count/service.rag_stats/
rag-stats 端点/rag_stats 异常);Node chat_state 9 passed
|
2026-08-30 21:16:07 +08:00 |
|
lhl
|
cc8850cffe
|
docs(rag): 补录 RAG 迭代各任务评审报告
|
2026-08-30 00:57:36 +08:00 |
|
lhl
|
b2277ebf05
|
feat(rag): 影响调查 RAG 化迭代(上传即索引 D1 / 线程安全 D2 / 强 e2e D3)
|
2026-08-30 00:49:02 +08:00 |
|
lhl
|
ee224e7c56
|
test(rag): 补充引擎懒构建与 HTTP 级 RAG e2e 覆盖,恢复 99% 门禁
|
2026-08-30 00:44:49 +08:00 |
|
lhl
|
9a02fcd00f
|
fix(rag): 移除 service 未用参数 + 引擎构建加锁 + 修正文档措辞
|
2026-08-30 00:31:18 +08:00 |
|
lhl
|
f77fab707d
|
feat(rag): 服务层接线(上传即索引 + use_rag 异步链路 + 强 e2e)
|
2026-08-30 00:25:24 +08:00 |
|
lhl
|
9514749b9f
|
fix(rag): run_impact 改为 async 并 await 引擎(StructuredResult)
|
2026-08-29 23:16:12 +08:00 |
|
lhl
|
974bf12dc0
|
feat(rag): ImpactAgent 接入可选 RAG 上下文(use_rag)
|
2026-08-29 23:05:53 +08:00 |
|
lhl
|
9037ea6f4b
|
fix(rag): 补充 ImpactRAG 分支测试与防御,覆盖率达 100%
|
2026-08-29 22:55:59 +08:00 |
|
lhl
|
6f0cb2f792
|
feat(rag): 新增 ImpactRAG 索引/检索服务(含 index_dir)
|
2026-08-29 22:48:42 +08:00 |
|
lhl
|
69a7ba7226
|
fix(rag): 强化 RagStore 并发读写验证 + close/健壮性
|
2026-08-29 22:45:17 +08:00 |
|
lhl
|
2eab0183ee
|
feat(rag): 新增 RagStore(SQLite 向量存储 + 余弦检索,线程安全)
|
2026-08-29 22:39:37 +08:00 |
|
lhl
|
afc09fc908
|
fix(rag): 移除 embeddings camelCase 死代码,覆盖率达 100%
|
2026-08-29 22:35:16 +08:00 |
|
lhl
|
9bc7828e63
|
feat(rag): 新增 Embedder 抽象与离线 FakeEmbedder
|
2026-08-29 22:27:24 +08:00 |
|
lhl
|
80daadcd31
|
fix(websocket): 修复 app.py 不可导入并新增真实链路验证
- 将 /api/sessions/{sid}/ws 端点移入 create_app(此前置于模块级导致整模块 import NameError,回归被验证拦截)
- register_loop + subscribe 调整至 accept 之前,缩小连接已开但未订阅期间的进度丢失窗口
- 新增 tests/test_verify_ws_real_flow.py:驱动真实 HTTP 聊天流程断言 WS 收到 agent 实际发射的 parse/impact 进度
- 同步 WebSocket 计划文档 Task 3 代码片段(标注端点必须位于 create_app 内)
- 全量 pytest 实测 583 passed / 99.03% 达标
|
2026-08-29 14:36:12 +08:00 |
|
lhl
|
9f5342e2be
|
docs: 追加 WebSocket 进度流实现记录(_AI_USAGE_LOG)
|
2026-08-29 12:21:04 +08:00 |
|
lhl
|
6cb92e3798
|
test(chat): WebSocket 进度流端到端冒烟 + design.md 记录
|
2026-08-29 12:15:02 +08:00 |
|
lhl
|
14a7dc3501
|
feat(chat): 前端 chat_ws.js 实时渲染进度/错误(保留重载兜底)
|
2026-08-29 11:58:38 +08:00 |
|
lhl
|
61611b6b8a
|
feat(server): 暴露 /api/sessions/{sid}/ws 进度流端点(+websockets 依赖)
|
2026-08-29 11:55:45 +08:00 |
|
lhl
|
8493bea589
|
feat(chat): agent 产出进度/错误时发射事件(保留持久化兜底)
|
2026-08-29 11:46:22 +08:00 |
|