hailin
|
6be84617d2
|
feat(flutter): i18n体系(zh/zh_TW/en) + 智能体解聘功能
- 建立完整 flutter_localizations i18n 体系:zh/zh_TW/en 三语言
- l10n.yaml + ARB 文件 (app_zh.arb 约120键作模板,zh_TW/en 对应覆盖)
- localeProvider 连接 SharedPreferences language 设置,实时切换语言
- 设置页加入语言选择器(简体中文/繁体中文/English)
- 我的智能体页实现解聘(解聘确认弹窗 + DELETE API)与重命名功能
- 全部页面 (~18个) UI 字符串替换为 AppLocalizations.of(context).xxx
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-03-08 00:05:55 -08:00 |
hailin
|
f5d9b1f04f
|
feat: add app upgrade system with self-hosted APK update support
- Add core/updater module: version checker, download manager (resumable + SHA-256),
APK installer, app market detector, self-hosted updater with progress dialogs
- Add Android native MethodChannels for APK installation and market detection
- Add FileProvider config and REQUEST_INSTALL_PACKAGES permission
- Wire UpdateService singleton into main.dart initialization
- Add auto-check on home entry with cooldown + app resume detection
- Add manual "检查更新" button and dynamic version display in settings
- Fix chat page: bottom overflow, bash spinner persistence, collapsible results
- Merge standing orders into tasks page as second tab
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-26 22:35:01 -08:00 |
hailin
|
6a84519090
|
refactor: 移除 AppBar 刷新按钮,统一使用下拉刷新
6 个页面(仪表盘、服务器、任务、告警、审批、常驻指令)
删除右上角 IconButton(Icons.refresh),保留已有的 RefreshIndicator 下拉刷新。
Terminal 页面的刷新按钮是"重新连接"功能,保持不变。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-23 05:08:16 -08:00 |
hailin
|
94652857cd
|
feat: 生产级 API 错误处理 — 重试拦截器、友好错误提示、网络监测、WebSocket 退避
## 问题
用户看到原始 DioException 堆栈(如 "DioException [unknown]: null Error:
HttpException: Connection reset by peer"),且无重试机制,网络抖动即报错。
## 变更
### 1. RetryInterceptor(指数退避自动重试)
- 新增 `core/network/retry_interceptor.dart`
- 自动重试:连接超时、发送超时、Connection reset、502/503/504/429
- 指数退避(800ms → 1.6s → 3.2s)+ 随机抖动防雪崩
- 最多 3 次重试,非瞬态错误(401/403/404)不重试
- 集成到 dio_client,优化超时:connect 8s、send 15s、receive 20s
### 2. ErrorHandler 全面升级(友好中文错误提示)
- 重写 `core/errors/error_handler.dart`,新增 `friendlyMessage()` 静态方法
- 所有 DioExceptionType 映射为具体中文:
- Connection reset → "连接被服务器重置,请稍后重试"
- Connection refused → "服务器拒绝连接,请确认服务是否启动"
- Timeout → "连接超时,服务器无响应"
- 401 → "登录已过期,请重新登录"
- 403/404/429/500/502/503 各有独立提示
- 新增 TimeoutFailure 类型
- 所有 Failure.message 默认中文
### 3. 网络连接监测 + 离线 Banner
- 新增 `core/network/connectivity_provider.dart` — 每30秒探测服务器可达性
- 新增 `core/widgets/offline_banner.dart` — 黄色警告横幅 "网络连接不可用"
- 集成到 ScaffoldWithNav,所有页面顶部自动显示离线状态
### 4. 统一错误展示(杜绝 e.toString())
- 新增 `core/widgets/error_view.dart` — 统一错误 UI(图标 + 友好文案 + 重试按钮)
- 替换 6 个页面的内联错误 Column 为 ErrorView:
tasks_page / servers_page / alerts_page / approvals_page / standing_orders_page
- 替换 dashboard 的 3 处 _SummaryCardError(message: e.toString())
- 替换 4 个 provider 的 e.toString(): chat / auth / settings / approvals
- 全项目零 e.toString() 残留(仅剩 time.minute.toString() 时间格式化)
### 5. WebSocket 重连增强
- 指数退避(1s → 2s → 4s → ... → 60s 上限)+ 随机抖动
- 最多 10 次自动重连,超限后停止
- disconnect() 阻止自动重连
- 新增 reconnect() 手动重连方法
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-23 04:01:04 -08:00 |
hailin
|
15e6fca6c0
|
fix: translate all remaining English UI strings to Chinese and remove dead code
- Translate approval_action_card (Approve/Reject/Cancel/Expired)
- Translate tool_execution_card status labels (Executing/Completed/Error)
- Translate chat_providers error messages and stream content
- Translate message_bubble "Thinking..." indicator
- Translate terminal page tooltips (Reconnect/Disconnect)
- Translate fallback values (Untitled/Unknown/No message) across all pages
- Translate auth error "Login failed" and stream error messages
- Remove dead voice_providers.dart (used speech_to_text which is not installed)
- Remove dead voice_input_button.dart (not referenced anywhere)
- Fix widget_test.dart (was referencing non-existent MyApp class)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-23 02:07:57 -08:00 |
hailin
|
9f44878fea
|
fix: unify all pages to Chinese + fix bottom nav selected state
1. 所有页面英文文本统一替换为中文(仪表盘、对话、任务、告警、
服务器、常驻指令、审批、终端、设置)
2. 底部导航栏添加 selectedIndex 追踪当前路由,点击后正确高亮
3. 导航图标添加 outlined/filled 选中态区分
4. 设置页重构为大厂风格(圆角图标分组 + 主题底部弹窗选择)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-23 01:59:09 -08:00 |
hailin
|
4e1b75483d
|
fix: 修复 .gitignore 误忽略 Flutter data/models/ 源码导致构建失败
问题描述:
在其他机器上构建报错:
"Error when reading 'lib/features/auth/data/models/auth_response.dart': 系统找不到指定的路径"
导致 AuthUser、AuthResponse 等类型找不到,编译失败。
根本原因:
根目录 .gitignore 第75行 "models/" 规则本意是忽略 ML 模型大文件,
但该规则匹配了所有目录名为 models/ 的路径,包括 Flutter 项目中
DDD 架构的 data/models/ 源码目录(共 11 个 models/ 目录、10 个 .dart 文件)。
这些文件在本地存在但从未被 Git 追踪,其他机器 pull 后缺失这些文件。
修复内容:
1. 修改 .gitignore: 将宽泛的 "models/" 替换为精确的规则
- packages/services/voice-service/models/ — voice-service 下载的 ML 模型
- *.pt, *.pth, *.safetensors — PyTorch/HuggingFace 模型二进制文件
- 不再影响 Flutter 的 data/models/ 源码目录
2. 提交之前被忽略的 10 个 Flutter model 文件:
- auth/data/models/auth_response.dart — 登录响应 (accessToken, refreshToken, user)
- chat/data/models/chat_message_model.dart — 聊天消息模型
- chat/data/models/session_model.dart — 会话模型
- chat/data/models/stream_event_model.dart — SSE 流事件模型
- servers/data/models/server_model.dart — 服务器状态模型
- approvals/data/models/approval_model.dart — 审批请求模型
- alerts/data/models/alert_event_model.dart — 告警事件模型
- agent_call/data/models/voice_session_model.dart — 语音会话模型
- standing_orders/data/models/standing_order_model.dart — 常设指令模型
- tasks/data/models/task_model.dart — 任务模型
3. 同时提交:
- it0_app/test/widget_test.dart — Flutter 默认测试
- packages/services/voice-service/src/models/__init__.py — Python 模块初始化
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-22 16:29:03 -08:00 |
hailin
|
00f8801d51
|
Initial commit: IT0 AI-powered server cluster operations platform
Full-stack monorepo with DDD + Clean Architecture:
- Backend: 7 NestJS microservices + 5 shared libraries (TypeScript)
- Mobile: Flutter app with Riverpod (Dart)
- Web Admin: Next.js dashboard with Zustand + React Query
- Voice: Python voice service (STT/TTS/VAD)
- Infra: Docker Compose, K8s manifests, Turborepo build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-02-08 22:54:37 -08:00 |