Skip to content

feat(mobile): 集成 Flutter 移动端 - #2

Merged
IDhammaI merged 15 commits into
mainfrom
feat/mobile-app-integration
Aug 11, 2026
Merged

feat(mobile): 集成 Flutter 移动端#2
IDhammaI merged 15 commits into
mainfrom
feat/mobile-app-integration

Conversation

@IDhammaI

@IDhammaI IDhammaI commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Import the Flutter mobile app from upstream PR xiaozhejiya#144 into this fork and organize it under apps/mobile/. The original upstream commit 739a187 keeps ConanWanglu as the Author; follow-up maintenance commits are by IDhammaI.

Changes

  • Add the Flutter app for Android, iOS, Web, Linux, macOS and Windows.
  • Store sessions in flutter_secure_storage, migrate legacy SharedPreferences data, and remove plaintext copies.
  • Prevent cross-origin image requests from sending or persisting session cookies; add origin checks and request timeouts.
  • Harden logout/401 session cleanup and keep BLE provisioning logs debug-only.
  • Make Android debug builds work without local release signing secrets; remove production cleartext HTTP and add key.properties.example.
  • Remove generated artifacts, document mobile development/building, and add path-filtered Mobile CI.
  • Align Dart 3.5 formatting, analyzer settings, and mobile widget/API tests.

Verification

  • Backend CI: passed.
  • Frontend CI: passed.
  • Mobile CI: passed (format check, flutter analyze --no-fatal-infos --fatal-warnings, 63 Flutter tests, Android debug APK).
  • Frontend local tests: 57/57 passed.
  • Frontend production build: passed.
  • git diff --check: passed.

Local Flutter pub get was previously affected by a pub.dev TLS handshake issue; TLS verification was not disabled. GitHub Actions resolved dependencies in a clean environment and completed all mobile checks.

This PR targets this fork's main. Upstream PR xiaozhejiya#144 was not approved, merged, or closed.

IDhammaI and others added 15 commits August 11, 2026 11:26
- 将后端、前端、UI 展示站、部署文档、规则文档和示例资源迁移到统一目录\n- 同步 Docker、docker-compose、CI/CD、README 与规则索引中的路径\n- 保持前端、后端和文档变更的独立触发范围\n\nChecklist:\n- [x] 根目录重构改动已检查,未包含移动端代码\n- [x] 前端 npm test 57/57 通过,npm run build 通过\n- [x] 后端 pytest 已执行;当前环境因缺少 langgraph、langchain_core、torch 等依赖在收集阶段阻塞,未伪造通过\n- [x] git diff --cached --check 通过
Add the current Flutter implementation under the repository root mobile/ directory, including ESP32 provisioning and upload protocol support.
- 将上游 Flutter 应用从根目录 mobile/ 移动到 apps/mobile/\n- 删除 Gradle 问题报告、Playwright 临时文件和开发过程文档\n- 补充移动端临时产物忽略规则,避免生成文件再次进入仓库\n\nChecklist:\n- [x] 原作者的 Flutter commit 已保留,未改写 Author\n- [x] 移动端路径已统一为 apps/mobile/\n- [x] 已删除已知构建产物和临时开发文件\n- [x] apps/mobile/.gitignore 已同步更新\n- [x] git diff --cached --check 通过
- 使用安全存储保存 Session,并迁移旧版本的明文 Cookie\n- 限制 API 请求同源携带认证信息,防止跨域图片泄露 Session\n- 增加请求超时、401 清理、退出失败清理和 BLE debug 日志保护\n- 补充安全存储注入测试、同源校验测试和过期 Session 测试\n\nChecklist:\n- [x] Session 新写入路径使用 flutter_secure_storage\n- [x] 跨域 URL 不携带或保存 Cookie,相关测试已补充\n- [x] 退出、401 和 BLE 日志行为已同步\n- [x] Dart 格式检查通过\n- [x] flutter pub get 已执行,但当前环境因 pub.dev TLS 错误阻塞
- 在缺少 key.properties 时跳过发布签名配置,保证 debug 配置不崩溃\n- 增加不含秘密的 key.properties.example,明确 release 签名字段\n- 关闭生产 Android manifest 的全局明文 HTTP\n\nChecklist:\n- [x] key.properties 和 keystore 继续被忽略\n- [x] 无发布密钥时不会强制转换空配置\n- [x] production manifest 不再允许全局 cleartext HTTP\n- [x] Android 配置变更已通过 git diff --check
- 将 Flutter 默认 README 替换为项目启动、权限、测试和签名说明\n- 在根 README 和测试构建规则中登记 apps/mobile\n- 增加独立 Mobile CI,覆盖依赖、格式、分析、测试和 Android debug 构建\n\nChecklist:\n- [x] apps/mobile README 已说明 API_BASE_URL、BLE 权限和 release 签名\n- [x] 根目录结构和测试构建规则已同步移动端路径\n- [x] Mobile CI 仅监听 apps/mobile/** 和自身 workflow\n- [x] 文档与 workflow 变更已执行 git diff --check
- 按项目 Dart formatter 统一移动端 lib 和 test 的格式\n- 保持业务行为不变,降低后续分析和 review 噪声\n\nChecklist:\n- [x] dart format --output=none --set-exit-if-changed apps/mobile/lib apps/mobile/test 通过\n- [x] git diff --cached --check 通过\n- [x] 本次提交不包含构建产物或密钥
- 删除 Android manifest 中随上游提交带入的行尾空白\n\nChecklist:\n- [x] git diff --cached --check 通过\n- [x] 仅清理格式,不改变权限或运行行为
@IDhammaI
IDhammaI merged commit 8117991 into main Aug 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant