Files
Fabric/docs/TODO-frontend-desktop.md

88 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TODO - Frontend / Desktop 开发计划
## 0. 基础约束
- [x] 技术栈Frontend = React + Vite + TSDesktop = Electron
- [x] Frontend/Desktop 子模块初始化
- [ ] 所有前端接口统一走 Guild/Center APIAPI Key 模型)
---
## 1. FrontendWeb
### 1.1 应用骨架
- [x] 路由骨架(登录页 / 工作台 / 聊天页)
- [x] 全局布局(侧栏 + 主区 + 状态栏)
- [x] API Client 封装baseURL、API Key、错误处理
- [x] Socket 客户端封装(连接、重连、订阅/退订)
### 1.2 认证与会话
- [x] 登录页Center 登录)
- [x] Access/Refresh token 管理
- [x] 过期自动刷新与登出
- [x] 基础路由守卫(未登录跳转)
### 1.3 Guild/Channel 浏览
- [x] Guild 列表加载
- [x] Channel 列表加载
- [x] 频道切换与 URL 状态同步
### 1.4 消息主链路
- [x] 消息拉取(分页/区间)
- [x] 发送消息
- [x] 编辑消息
- [x] 删除消息
- [ ] 回补提示next_expected_seq
### 1.5 实时能力
- [ ] 实时消息created/updated/deleted
- [ ] typing/在线状态显示
- [ ] 断线重连与重拉策略
### 1.6 体验与稳定性
- [ ] 基础 loading/empty/error 态
- [ ] 关键页面可观测日志requestId
- [ ] 前端构建与 lint 门禁
---
## 2. DesktopElectron
### 2.1 桌面壳
- [ ] BrowserWindow 配置(尺寸、最小尺寸、标题)
- [ ] Dev/Prod 加载策略devServer / 本地包)
- [ ] 应用菜单与快捷键基础
### 2.2 安全基线
- [ ] contextIsolation 保持开启
- [ ] preload + IPC 白名单(最小暴露)
- [ ] 禁止任意导航/新窗口策略
### 2.3 桌面能力
- [ ] 本地配置存储API Base/API Key
- [ ] 系统通知(新消息)
- [ ] 托盘与最小化到托盘(可选)
### 2.4 打包发布
- [ ] 打包配置Linux/macOS/Windows
- [ ] 版本号与产物命名规范
- [ ] 一键构建命令与发布说明
---
## 3. 联调与验收
- [ ] 与 Center/Guild 联调通过(登录、发消息、实时)
- [ ] 关键链路冒烟Web + Desktop
- [ ] MVP DoD 文档更新
---
## 4. 推荐执行顺序
1. Frontend 1.1 应用骨架
2. Frontend 1.2 认证与会话
3. Frontend 1.3/1.4 核心聊天
4. Frontend 1.5 实时完善
5. Desktop 2.1/2.2 安全壳
6. Desktop 2.3 桌面增强
7. Desktop 2.4 打包发布
8. 联调验收