Commit Graph

74 Commits

Author SHA1 Message Date
wonder 2d3e306067 refactor: 优化审查进度条交互,file_start 和 file_end 均更新进度显示
Deploy PR-Helper / deploy (push) Successful in 26s
- file_start: 显示当前正在审查的文件名和已开始数量
- file_end: 更新进度条百分比和已完成数量
- 进度条仅在 file_end 时推进,文本在两个事件都更新,兼顾准确性和即时反馈
2026-06-21 15:22:49 +08:00
wonder c7b03303e4 fix: 修复代码审查进度条逻辑
Deploy PR-Helper / deploy (push) Successful in 28s
- 后端: file_start 事件改为在获取信号量之后发送,避免并发时所有文件同时'开始'导致进度瞬间跳到90%
- 前端: 进度追踪改为基于 file_end 事件(完成)而非 file_start(开始),进度条平滑反映实际审查进度
2026-06-21 15:17:51 +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 a6bd46db34 feat: support private repo cloning with HTTP basic auth
Deploy PR-Helper / deploy (push) Successful in 30s
- Add SSH URL detection with friendly prompt to use HTTPS instead
- Add private repo toggle (default off) with username/password fields
- Persist auth_type and credential in repositories table
- Pass stored credentials to PullRepo for authenticated pulls
- Incremental migration adds auth_type and credential columns
2026-06-21 14:58:12 +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 1359c5c339 fix: use MySQL-compatible datetime format for cloned_at
Deploy PR-Helper / deploy (push) Successful in 22s
RFC3339 format (T separator, Z suffix) is rejected by MySQL DATETIME columns.
Use '2006-01-02 15:04:05' instead.
2026-06-21 14:39:36 +08:00
wonder 18e50c78d5 ci: revert to secrets.DEPLOY_ENV, variables context not supported in Gitea Actions
Deploy PR-Helper / deploy (push) Successful in 29s
2026-06-21 14:35:32 +08:00
wonder 1cd4aa899a ci: add debug output for .env content to troubleshoot multiline variable
Deploy PR-Helper / deploy (push) Successful in 25s
2026-06-21 14:34:24 +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 25291a81a3 fix: use variables instead of secrets to reference repository-level variable 2026-06-21 14:31:09 +08:00
wonder 846288731f perf: add BuildKit cache mounts to speed up Go build in Docker
Deploy PR-Helper / deploy (push) Successful in 3m28s
Mount persistent cache for go build and module directories so
subsequent builds only recompile changed packages.
2026-06-21 14:20:34 +08:00
wonder 64098a92d3 fix: change default external port from 8080 to 8081 to avoid conflict with slides-nginx
Deploy PR-Helper / deploy (push) Successful in 3m11s
2026-06-21 14:05:22 +08:00
wonder 05fb1678de ci: simplify deploy workflow with Alpine container and Gitea checkout
Deploy PR-Helper / deploy (push) Failing after 4m17s
2026-06-21 00:25:15 +08:00
wonder e83afb5fb0 fix: install docker.io and docker-compose-plugin in job container 2026-06-21 00:08:59 +08:00
wonder 8a3f14eb1b fix: remove ineffective container.options, rely on runner volume mounts 2026-06-21 00:04:33 +08:00
wonder 91a18e76a5 fix: install Docker CLI in job container and mount docker.sock 2026-06-21 00:01:53 +08:00
wonder 47f0ef9fb9 fix: revert container.options, rely on runner volume mount for host directory access 2026-06-20 23:59:23 +08:00
wonder f278908526 fix: use container.options volume mount for host directory access in deploy workflow 2026-06-20 23:56:00 +08:00
wonder fc1e564628 ci: add Gitea Actions workflow for auto deploy on push to main
Deploy PR-Helper / deploy (push) Failing after 0s
2026-06-20 23:32:43 +08:00
wonder 735126ff56 fix: escape 'key' as reserved word in all MySQL queries with backticks 2026-06-20 23:21:24 +08:00
wonder 99fb89c60d fix: use PORT env var for external port mapping, hardcode internal port to 8080 2026-06-20 23:16:11 +08:00
wonder ca2e294735 feat: add git pull as first deploy step, remove embedded MySQL wait logic 2026-06-20 23:09:48 +08:00
wonder 4d04153d61 refactor: remove embedded MySQL from docker-compose, use external data source 2026-06-20 23:08:10 +08:00
wonder 65e0b26d8d refactor: remove GOPROXY injection logic from deploy.sh, already in Dockerfile 2026-06-20 22:59:44 +08:00
wonder 1a64b2e98e fix: add GOPROXY=https://goproxy.cn,direct to Dockerfile 2026-06-20 22:58:41 +08:00
wonder 9bfe1ec120 fix: upgrade Docker base image to golang:1.25-alpine for go.mod compatibility 2026-06-20 22:57:08 +08:00
wonder 6652cd2b88 fix: deploy.sh uses PORT from .env exclusively, remove CLI port argument 2026-06-20 22:55:52 +08:00
wonder be7ce2a385 fix: deploy.sh reads MySQL config from .env instead of generating it
- Error out if .env is missing, instruct user to copy from .env.example
- Source .env to load MYSQL_* variables for docker compose
- Command-line port argument overrides PORT in .env
2026-06-20 22:53:48 +08:00
wonder 95519963c3 fix: update deploy.sh to generate .env with MySQL configuration
- Generate .env with random MySQL password on first deploy
- Update PORT in .env instead of modifying docker-compose.yml directly
- Wait for MySQL container healthcheck before checking app status
- Skip .env generation if file already exists
2026-06-20 22:52:27 +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 37aa9c0a33 fix: 结构化渲染审查总结,替换原始JSON显示
- 后端发送结构化数据(score/overall/findings/recommendations)而非格式化文本
- 增加灵活JSON解析,兼容LLM返回recommendations为数组的情况
- 前端渲染带样式的审查总结:评分徽章(颜色分级)、分区展示
- 两个页面统一处理:repo页面的内联审查和review页面的完整审查
2026-06-20 22:15:00 +08:00
wonder 292588ef23 feat: 将默认 LLM 配置从 OpenAI 切换为 DeepSeek (deepseek-v4-pro) 2026-06-20 22:03:09 +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 953c83d9aa feat: 添加一键部署脚本(国内镜像加速) 2026-06-20 17:44:48 +08:00
wonder 87bb23e19e docs: 删除 PLAN.md,更新 CLAUDE.md 中的引用
PLAN.md 的内容已被 CLAUDE.md、README.md 和代码覆盖:
- API 路由、功能描述、Docker 配置 → README.md
- 架构、关键模式、目录结构 → CLAUDE.md
- SQL Schema、LLM Prompts、SSE 格式 → 代码本身

更新 CLAUDE.md Development Notes,将 PLAN.md 引用改为指向实际代码文件。
2026-06-20 17:34:57 +08:00
wonder e571a33dd2 docs: 重写 README,添加安装配置和 API 参考文档 2026-06-20 00:06:17 +08:00
wonder 446bb987f4 feat: 添加 Docker 部署配置 2026-06-20 00:06:10 +08:00
wonder 6efba13d7d feat: 优雅关闭与模板错误检查 2026-06-20 00:06:08 +08:00
wonder 46778bc227 refactor: 移除 services/git.go 中的无用代码 2026-06-20 00:06:03 +08:00
wonder 72c7d8e7b3 fix: 在 handler 中检查错误,不再静默丢弃 2026-06-20 00:06:00 +08:00
wonder 4eaf89219d feat: 添加 Toast 通知系统,替换所有 alert() 调用 2026-06-20 00:05:56 +08:00
wonder a66074e49c feat: 并发文件审查,可配置并行度 2026-06-19 23:40:13 +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 a89d057716 fix: 使用正确的 SSE 事件名 'start' 展示审查进度 2026-06-19 23:05:01 +08:00
wonder 8f346999fb fix: 从 graph API 响应对象中提取 commits 数组 2026-06-19 22:59:02 +08:00
wonder bf8fb62b07 fix: 审查页面分支列表加载失败时显示错误提示 2026-06-19 22:40:50 +08:00
wonder c4e0ef33ab fix: 仓库页面 ref 选择器填充最近提交 2026-06-19 22:40:19 +08:00