9 Commits

Author SHA1 Message Date
wonder 8e8ea6a07d refactor: 合并 PR 描述生成和 AI 代码审查到仓库详情页
Deploy PR-Helper / deploy (push) Successful in 2m9s
- 新增 PR 描述 tab:流式生成 + 双栏实时预览(渲染效果 + Markdown 源码)
- 新增 AI 代码审查 tab:Top-N/并发设置、历史记录、进度条、总结、备注、PDF 导出、内联 Diff
- 保留 Diff 视图中的 AI 评审快捷内联按钮
- Repo handler 传递 TopN/Concurrency 设置
- 删除独立的 generate.html 和 review.html 页面及路由
2026-06-23 21:55:05 +08:00
wonder 20be99b287 feat: add git pull to update cached repositories from remote
Deploy PR-Helper / deploy (push) Successful in 34s
- Replace dead FetchRemote with PullRepo (fetch + merge) in services/git.go
- Add POST /api/repos/:id/pull endpoint with DB size/last_used update
- Add '更新' button next to each cached repo in the index page
2026-06-21 14:31:33 +08:00
wonder 00c1839635 feat: migrate database from SQLite to MySQL with .env configuration
- Replace go-sqlite3 with go-sql-driver/mysql (pure Go, no CGO needed)
- Add joho/godotenv for .env file loading
- Rewrite database/db.go with MySQL-compatible DDL (BIGINT AUTO_INCREMENT, InnoDB, utf8mb4)
- Convert all SQLite-specific SQL: INSERT OR IGNORE → INSERT IGNORE,
  INSERT OR REPLACE → INSERT ... ON DUPLICATE KEY UPDATE,
  datetime('now') → NOW(), date arithmetic → DATE_SUB()
- Add MySQL config fields to config.go (host/port/user/password/database)
- Add .env.example with connection parameter template
- Update Dockerfile: remove CGO/gcc/musl dependency, smaller build
- Update docker-compose.yml: add MySQL service container with healthcheck
- Update CLAUDE.md documentation
2026-06-20 22:40:46 +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 6efba13d7d feat: 优雅关闭与模板错误检查 2026-06-20 00:06:08 +08:00
wonder 0528eee4de feat: 持久化 AI 审查结果,文件级内联展示与页面集成 2026-06-19 23:24:06 +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