Are you an LLM? You can read better optimized documentation at /chatroom/reference/changelog.md for this page in Markdown format
变更日志
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Changed
- 前端界面与视觉效果深度美化:
- 优化全局设计系统:微质感环境渐变背景、消息气泡立体阴影与微光描边、平滑缩放与过渡曲线
- 升级登录认证界面:新增一键填入演示账号快捷卡片与四宫格架构微卡片(全双工推送、双 Token 续签、多房间隔离、历史漫游)
- 升级侧边栏:强化用户头像光环动效、重绘新建房间面板交互、平滑筛选与活跃频道色条指引
- 升级主聊天视窗:丰富未进房时的教学看板(三维特性网格)、细化连接状态指示(已连接/重连中/已断开)、日期分组双向细线与空消息破冰芯片
- 精简并优化 README.md:去除大量 emoji,表述更加干练务实,以清晰列表呈现功能特性、技术栈及运行指引,修复截图为相对路径
- 前端整体切换为浅色精美主题:雾蓝留白、柔和阴影与圆角卡片,重构
index.css、AuthScreen、Sidebar、ChatRoom、MessageList、MessageInput、ErrorBoundary、Toast,提升长时间阅读与演示体验 - README 界面预览更新为浅色主题截图(
docs/public/screenshots/chatroom.png1440×900,平均亮度 247),深色预览已替换 - 前端界面显示效果优化:消息气泡尾巴指示、自己消息显示头像、头像 hover 放大效果、滚动到底部快捷按钮、帮助面板点击外部关闭、Toast 退出动画、活跃房间左侧色条、头像渐变色扩展至 8 种
[v2.1.0] - 2026-08-07
全面改进:修复前后端不一致、清理死代码、简化复杂逻辑、补充测试。
Added
- README「界面预览」:新增聊天室实时界面截图(
docs/public/screenshots/) processor_test.go:5 个测试覆盖空消息、正常消息、XSS 过滤、超长内容、持久化失败middleware_test.go:9 个测试覆盖限流器(允许/拒绝/隔离)、CORS(dev/prod/no-origin)、Bearer 提取、IP 解析- 代码注释:MessageProcessor 接口设计理由、App.tsx ref 循环依赖模式说明、AuthRuntime 存在原因
Fixed
internal/ws/conn.go:WebSocket 升级时使用Upgrade(..., nil),去掉重复写入的Sec-WebSocket-Protocol响应头(浏览器会因重复响应头解析异常而中断握手,close 1006)frontend/src/App.tsx:登录后加载房间列表的 effect 不再依赖整个chat对象,改为 ref 稳定引用,避免每次渲染重复触发reloadRooms(曾打满限速导致 429 toast)- 前端密码校验从 min 4 改为 min 8,与后端 binding 一致
- data-flow.md 输入状态流图:移除虚构的 is_typing:false,补充接收方超时机制说明
- AuthScreen 营销化文案替换为事实描述
Removed
ErrTokenExpired死代码(service/errors.go,无任何引用)format_test.go中 .kiro 目录跳过和 Requirements 3.3 注释(来自已删除的工具和 spec 系统)index.css中 .unread-badge 和 .msg-actions 死 CSSChatRoom.tsx中空占位<div />- CI 中多余的 PostgreSQL service container(测试使用 SQLite 内存数据库)
[v2.0.0] - 2026-08-07
最终教学定稿版。项目定位为全栈开发教学材料,不再迭代维护。
Removed
- 删除
.claude/目录(settings.json + skills/verify/SKILL.md),AGENTS.md 为唯一规范指令文件 - 删除
.github/workflows/release.yml(多平台二进制、Docker GHCR push、checksums、GitHub Release),教学项目不需要重型发布流水线 - 从 CI 移除 Codecov 覆盖率上传步骤
- 删除
docs/.vitepress/theme/style.css中的 ADR 相关死代码(约 60 行) - 删除分布式消息同步:
internal/ws/realtime.go、WSSession模型、PodID配置、internal/repository包 - 删除 Prometheus 监控:
internal/metrics包、/metrics端点、deploy/prometheus、docker-compose 中的 prometheus/grafana 服务 - 删除
internal/mw包(合并入internal/server)、internal/log包(合并入internal/config) - 删除
internal/auth/ticket.go(合并入internal/auth/auth.go) - 删除 docs 中的 whitepaper、deep-dives、decisions、deployment/learning-path/development-guide 等过度设计或与代码不符的文档
Changed
- 重新定位为"全栈开发教学材料",README 增加推荐源码阅读路线
- 同步 docs 首页、FAQ 定位语言
- 修复
docs/tutorials/testing.md:删除已不存在的 Prometheus 监控实验、修正密码长度(4-128 → 8-128)、将静态回退实验改为构建产物部署实验 - 修复
docs/tutorials/local-dev.md:删除不存在的web/静态回退运行模式 - 修复
scripts/dev.sh:Go 版本提示从 1.21+ 更正为 1.24+ - 精简
docs/.vitepress/theme/style.css:移除 ADR 死代码和无用的 CSS 变量 - 简化
internal/auth:移除GormAdapter与接口适配层,DB 操作直接接收*gorm.DB - 简化
internal/service:移除 repository 版双套实现,单一 service 直接依赖*gorm.DB - 简化
internal/ws/processor与conn:移除 hub 引用、sessionID、trackHeartbeat、publish config.InitLog取代独立的clog.Init- 重写 docs 站点首页、系统架构、数据流、数据模型、FAQ、本地开发文档,去除虚构的基准数据与 K8s/多实例描述
[v1.0.0] - 2026-05-01
Changed
- Enhanced password validation: minimum length increased from 4 to 8 characters
- Fixed token refresh race condition in frontend API client
- Updated CODE_OF_CONDUCT with proper contact information
Removed
- Cleaned up redundant files: build artifacts, node_modules, plugin data
- Removed outdated
docs/monitoring/(usedocs/zh/monitoring/instead)
Documentation
- Synchronized VERSION and CHANGELOG to v1.0.0
- Project now in archive-ready state
[v0.3.0] - 2026-04-16
Added
- Complete bilingual documentation (English/Chinese)
- VitePress documentation site with internationalization support
- English documentation: Getting Started, API, Architecture, Design, FAQ, Manual Testing, Monitoring
- Language switcher between English and Chinese versions
Changed
- Restructured docs directory: moved Chinese docs to
docs/zh/, addeddocs/en/ - Standardized all changelog files with professional format
- Updated VitePress config for multi-language support
- Enhanced README with clearer structure and badges
Documentation
- Professionalized documentation formatting across all docs
- Added comprehensive API documentation in both languages
- Created monitoring guide for Prometheus and Grafana
- Added architecture diagrams and data flow explanations
[v0.2.0] - 2026-03-08
Added
- Open source standard files: LICENSE, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY
- CI/CD pipelines with GitHub Actions
- VitePress documentation site
- Docker multi-stage builds
- Kubernetes deployment manifests
- Health check endpoints (
/health,/healthz,/ready,/version) - Prometheus metrics integration
- Rate limiting middleware
Security
- JWT secret validation for production environments
- CORS origin whitelist validation
- WebSocket origin validation matching HTTP CORS
- Input sanitization and validation
Changed
- Comprehensive backend refactoring with service layer
- Frontend migrated to React 19 + TypeScript + Vite 7
- WebSocket authentication using one-time tickets
- Unified error handling across the application
Fixed
- Rate limiter goroutine leak
- WebSocket message deduplication
- Connection cleanup on disconnect
[v0.1.0] - 2025-01-08
Added
- User registration and login with JWT authentication
- Chat room creation and management
- WebSocket real-time messaging
- PostgreSQL message persistence
- Vanilla JavaScript frontend
- Basic Docker support