20 Commits

Author SHA1 Message Date
wonder 6dfd01445d refactor: 用 marked.js 替换手写 Markdown 渲染器
Deploy PR-Helper / deploy (push) Successful in 30s
- 引入 marked.js(~40KB)作为专业 Markdown 解析引擎
- markdown.js 精简为 20 行薄封装,保留 renderMarkdown 兼容别名
- CSS 从 .md-* 选择器改为标准 HTML 标签选择器
- 支持 GFM(表格、任务列表、删除线)、代码块语法高亮
- 天然处理流式不完整 Markdown(未闭合代码块等)
2026-06-21 16:23:14 +08:00
wonder 779bd9e332 fix: 真正的流式输出 + 修复 Markdown 标题渲染
Deploy PR-Helper / deploy (push) Successful in 27s
流式输出:
- 恢复 content 事件处理,实时累积 LLM 原始输出
- parsePartialJSON 从不完整 JSON 中渐进提取已闭合的字段
- 每次提取到新字段即更新两栏,实现左栏渐进渲染
- 结构化事件(title/detail等)覆盖解析结果,确保最终一致

Markdown 渲染:
- 重写为逐行处理(_renderLines),不再按双换行分块
- ### 及更深层级标题在单换行后也能正确识别为独立块
- 列表项、水平线等同样受益于逐行解析
2026-06-21 15:57:54 +08:00
wonder 55bfdf08ce i18n: 中文化所有错误消息和用户交互文本
Deploy PR-Helper / deploy (push) Successful in 31s
- Go 后端 handler 错误消息统一中文化(middleware/repos/generate/review/settings)
- 前端 JS 加载和错误消息中文化(diff-viewer.js, graph.js)
- 模板页面错误 fallback 和静态文本中文化(index/generate/review/base)
- 消除中英文混杂,提升中文用户体验
2026-06-21 15:11:20 +08:00
wonder 82666cff26 refactor: remove inline branch/tag labels, keep only top-right legend
Deploy PR-Helper / deploy (push) Successful in 29s
2026-06-21 14:45:50 +08:00
wonder 9b26bcb1b8 feat: move git graph legend to top-right corner to avoid overlap with graph
Deploy PR-Helper / deploy (push) Successful in 26s
2026-06-21 14:43:16 +08:00
wonder 6c60b767df refactor: replace chromedp with browser native print for PDF export
Remove chromedp dependency, use window.print() instead. Docker image no longer needs Chromium (~200MB smaller).

- Delete services/pdf.go and templates/reports/review.html

- Remove PDF API route POST /api/repos/:id/review/pdf

- Add @media print CSS to review page

- Remove chromium from Dockerfile
2026-06-20 22:26:46 +08:00
wonder 9c843b79ba feat: 添加用户注册登录功能,实现数据和配置的用户隔离
- 新增 users 和 user_settings 表,repositories/analyses/review_notes 添加 user_id 列
- 实现基于邮箱+密码的注册登录,密码使用 bcrypt 哈希
- 使用 gin-contrib/sessions cookie-based session 管理
- 所有仓库、分析记录、review notes 按用户隔离
- 用户设置(LLM 配置、review 参数、缓存配置)独立存储
- 新增登录/注册页面,导航栏显示用户邮箱和退出按钮
- 前端 fetch 请求统一添加 credentials: 'same-origin'
- 支持 SESSION_SECRET 环境变量配置会话密钥
2026-06-20 21:57:46 +08:00
wonder 4eaf89219d feat: 添加 Toast 通知系统,替换所有 alert() 调用 2026-06-20 00:05:56 +08:00
wonder e4df6487ea feat: 共享 markdown 渲染器,完整语法支持 2026-06-19 23:29:05 +08:00
wonder 0528eee4de feat: 持久化 AI 审查结果,文件级内联展示与页面集成 2026-06-19 23:24:06 +08:00
wonder 96c4e7d88a fix: 防止 SSE 客户端 done 事件触发两次 2026-06-19 22:39:31 +08:00
wonder b35d6f874b feat: Phase 5 — 审查备注编辑器与 PDF 导出 2026-06-19 22:10:13 +08:00
wonder 1cfab2d2d1 fix: 改进 diff 查看器样式和 markdown 渲染 2026-06-19 21:41:47 +08:00
wonder 987f331474 feat: diff 过大时跳过渲染(仿 Gitee 风格警告) 2026-06-19 20:33:20 +08:00
wonder a12d266a30 perf: 增量 diff 渲染,消除主线程阻塞 2026-06-19 20:29:29 +08:00
wonder f15d1c540e perf: 优化 diff 页面渲染,消除卡顿 2026-06-19 20:23:15 +08:00
wonder 2fce992eaa feat: 多分支图形可视化,彩色泳道和右对齐标签 2026-06-19 20:18:05 +08:00
wonder 7ac3a3726b feat: Phase 3 — 前端交互功能完成 2026-06-18 23:37:19 +08:00
wonder 34ef868e10 feat: Phase 2 — Git 核心功能,go-git 克隆、SSE 进度、D3.js 图形、diff2html 查看器 2026-06-18 22:59:51 +08:00
wonder 1e9b1a2129 feat: Phase 1 — 项目骨架搭建,集成 Gin、SQLite 和设置页面 2026-06-18 22:48:16 +08:00