a8108cea9d
fix: add random_loop_range validation in VideoItem
...
- Validate that random_loop_range values are positive
- Validate that min <= max in random_loop_range
- Prevents invalid config from causing runtime panics in rand::gen_range
2026-03-31 23:28:03 +08:00
758dead601
refactor: clean up unused binding and simplify Mutex patterns
...
- plugin_loader.rs: remove unused _plugin_id binding in discover_plugins
- http/mod.rs: simplify config() and player_status() Mutex access patterns
2026-03-31 23:27:26 +08:00
d040f51cb2
fix: improve error handling and code robustness
...
- state_machine.rs: if-let replaces is_some()+take().unwrap()
- state_machine.rs: expect() replaces unwrap() with invariant docs
- wifi/mod.rs: send_result uses self.id() instead of hardcoded string
2026-03-31 23:25:47 +08:00
b570362546
perf: 减少 WiFi 模块不必要的 String 分配
...
- run_nmcli: 改为泛型 &[impl AsRef<OsStr>],直接接受 &[&str]
- 移除 nmcli_args() 中间函数,消除每次 nmcli 调用的 Vec<String> 分配
- build_connect_args/build_hotspot_args: 使用 array.into_iter() (Rust 2021)
2026-03-31 23:24:50 +08:00
1bf9e055e0
refactor: 补全 Default trait + 简化 Rust 2021 惯用写法
...
- LinuxArm64Backend: 添加 Default impl(与其他插件保持一致)
- version_manager.rs: [active, stable].into_iter() 替换 IntoIterator::into_iter()
(Rust 2021 edition 原生支持数组 IntoIterator)
2026-03-31 23:23:30 +08:00
d48a1cf88b
fix: 使用 CARGO_PKG_VERSION 替换硬编码版本号
...
- routes.rs: AppInfoResponse.version 使用 env!(CARGO_PKG_VERSION)
- device/mod.rs: DevicePlugin PluginInfo.version 使用 env!(CARGO_PKG_VERSION)
消除版本不一致问题:之前 Cargo.toml 版本为 0.2.0,但代码中硬编码为 0.1.0。
2026-03-31 23:22:32 +08:00
showen
d30c111c71
feat: M1.1 完成 + M1.2 启动 — 全量更新
...
M1.1 收尾:
- 24项 P0/P1/P2 bug 修复 (Rust 107 tests + Flutter 15 tests)
- Flutter App v0.3: cupertino_icons 修复, 单元测试, 调试面板, APK 52.6MB
- 示例插件完善: manifest.json + 请求/响应示范 + 7个测试
- API 文档重写 (以 routes.rs 为唯一权威)
- MILESTONES.md 更新至 100%
M1.2 启动:
- P0: 插件管理 API 闭环 (handle_manager_message Custom 分支 + broadcast_plugin_states)
- ServiceManager 集成测试 8/8 (tests/m1_2_service_manager.rs)
- M1.2 测试计划 (docs/M1.2_TEST_PLAN.md, 18个E2E场景)
- 动态插件系统: auto_rollback + version_manager GC + 路径穿越防护
总计: Rust 115/115 测试, Flutter 15/15 测试, 零 warning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-14 18:12:42 +08:00
showen
8ed9cb2d9d
feat: Flutter APK 编译成功 + Gradle 配置修复 + APK 下载部署 + 待优化清单
...
- 通过 qemu-user-static 实现 ARM64 主机编译 Android APK (51MB)
- 修复 Gradle: Aliyun 镜像 + PREFER_SETTINGS + JVM 内存 1536M
- 部署 APK 到 configs/downloads/, Web 下载接口已验证 (HTTP 200)
- 新增 Flutter TODO.md: 10项待优化 (P0/P1/P2 分级)
- 新增 pm_soul.md, 更新 routes.rs APK 下载路由
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-14 06:43:55 +08:00
showen
bff9ec535d
feat: Flutter 客户端 App + Web UI APK 下载入口
...
- 新增 Flutter 跨平台客户端项目 (clients/flutter/)
- 29 个 Dart 文件: 服务层/状态管理/5个页面/BLE配网
- BLE 蓝牙配网: 扫描设备、写入WiFi凭据、配网状态监听
- HTTP API 客户端: 覆盖全部端点 (播放/场景/WiFi/视频/配置/文件/插件)
- WebSocket 实时通信: 事件流 + 自动重连
- 暗色主题 Material 3 UI, 中文界面
- Android 配置: minSdkVersion 21, BLE/网络权限
- PRD 产品需求文档 + 开发任务看板
- Web UI 添加 APK 下载入口 (routes.rs)
- 下载弹窗 + 二维码 + /download/{filename} 静态文件路由
- BLE 插件增加自动重连循环 (ble/mod.rs)
- BLE 默认设备名修正为 'Showen' (config.rs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-14 02:09:52 +08:00
showen
d4f0eb7eca
fix: 触发器响应优化 — pending trigger 在当前step结束后立即触发
...
修复网页触发器点击后无响应的问题。原因是 defer_triggers 模式下,
pending trigger 必须等待整个 sequence 播完才触发,当 step 有
random_loop_range [2,15] 时用户可能要等几分钟。
现在改为当前 step 循环结束后立即检查并执行 pending trigger。
同时添加 systemd service 脚本。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-13 13:08:10 +08:00
showen
29645d711d
fix: 注册DevicePlugin到main.rs — 修复防息屏/光标功能失效(P0)
...
ScreenPlugin重构为thin wrapper后main.rs未注册DevicePlugin,
导致DeviceCommand消息无接收者。现在DevicePlugin在Screen之前注册。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-13 12:42:51 +08:00
showen
3729addb71
docs: DevicePlugin阶段二 Task5 — 文档更新与迁移总结
...
- 更新 DEVICE_PLUGIN_DESIGN.md: 阶段二标记完成+验收项勾选+成果章节
- 新建 src/plugins/device/README.md: 完整DevicePlugin文档
- 新建 docs/SCREEN_PLUGIN_MIGRATION_SUMMARY.md: 迁移总结
- 更新 li-siqi soul + TEAM_CHAT 汇报
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-13 12:39:25 +08:00
showen
be08c63181
test: Phase2 Task4 — 新增4个光标控制测试 总计77测试通过
2026-03-13 07:47:32 +08:00
showen
bf41c4513f
refactor: Phase2 Task3 — ScreenPlugin重构为thin wrapper(通过DeviceCommand转发)
2026-03-13 07:40:06 +08:00
showen
5310a92633
feat: Phase2 Task2 — LinuxArm64Backend添加光标控制(unclutter)
2026-03-13 07:32:00 +08:00
showen
f0605196fe
feat: Phase2 Task1 — DeviceCommand添加SetCursorVisible + DeviceCapability::Cursor
2026-03-13 07:14:44 +08:00
showen
1827310dca
feat: DevicePlugin Task4 — 7个集成测试(MockBackend+序列化) 总计73测试通过
2026-03-13 06:48:36 +08:00
showen
05235f5686
feat: DevicePlugin Task3 — Linux ARM64 Backend(Display/SleepInhibit/Backlight)
2026-03-13 06:38:43 +08:00
showen
584f65b9f5
feat: DevicePlugin Task2 — DevicePlugin骨架 + DeviceBackend trait + 模块注册
2026-03-13 06:32:14 +08:00
showen
4d1b830563
feat: DevicePlugin Task1 — Message enum扩展(DeviceCommand/Response/Event + 7个辅助类型)
2026-03-13 06:22:53 +08:00
showen
086b4600eb
test+docs: 新增4个测试(66总计) + SDK API文档 + 员工soul更新
2026-03-13 05:52:26 +08:00
showen
6067c3f0a2
fix: 修复3个P0遗留 — AutoRollback回退/ConfigReloaded序列化/FfiString跨allocator
2026-03-13 05:15:04 +08:00
showen
99ee78984c
feat: 插件自动挂载测试机制 — capabilities + self_test + 3阶段启动
...
- Plugin trait 增加 capabilities() 和 self_test() 方法
- PluginVTable 增加 get_capabilities 和 self_test FFI
- ServiceManager 三阶段启动: init → self_test → start
- SendCallback 改为 ctx 参数传递,消除 thread_local
- export_plugin! 宏所有 FFI 函数包裹 catch_unwind
- PluginManifest 增加 capabilities/required_capabilities/auto_test
- 新增 3 个自测相关测试用例 (共 59 测试)
2026-03-13 04:31:39 +08:00
showen
7135f28545
feat: 实现动态插件系统 (6阶段完成)
...
- 阶段1: 消息类型序列化 (Serialize/Deserialize, &'static str → String)
- 阶段2: FFI 边界类型 + Plugin SDK (plugin_abi, showen-plugin-sdk crate)
- 阶段3: PluginLoader + DynamicPlugin (libloading 动态加载 .so)
- 阶段4: 版本管理 + 错误策略 (VersionManager, PluginState, 自动回退)
- 阶段5: 远程仓库客户端 (HTTP 下载 + tar.gz 安装)
- 阶段6: 示例插件 + HTTP 管理 API + 全目录 README 文档
54/54 测试通过,0 warnings。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-13 03:38:08 +08:00
showen
c48340dece
test: 添加插件依赖机制自动化回归测试
...
- 新增 7 个测试用例固化插件依赖关系
- 验证 http 插件依赖 video
- 验证 ble/wifi/video/screen 插件无依赖
- 验证所有插件 ID 唯一性
- 验证拓扑排序正确性(依赖项先初始化)
- 所有 31 个测试通过
防止依赖关系漂移,确保架构稳定性。
2026-03-12 13:11:47 +08:00
showen
e45573f839
feat(video): 实现 FreeMode 状态随机游走
...
- 修改 select_next_state():FreeMode 无 next_state/next_states 时按权重随机选择 FreeMode 状态
- 新增 select_random_free_state() 方法实现权重随机算法
- InteractiveMode 保持原行为(停留当前状态)
- 新增单元测试验证随机游走和 InteractiveMode 行为
- 所有测试通过(24/24)
旧版行为回补完成。
2026-03-12 13:00:59 +08:00
showen
6ca5992b33
实现 /api/playlist 快照语义,返回 playlist 和 current_index
...
- 新增 PlaylistSnapshot 结构体,包含 playlist 和 current_index
- 修改 playlist_route 从 HttpState 获取 player_status.current_index
- 与旧版 hologram_player_rust 行为一致
- cargo check 零 warning
2026-03-12 13:00:26 +08:00
showen
cc4d6935d9
feat: free mode random walk + pause wake lock release
...
State machine (张明远):
- Add select_random_free_state() for FreeMode states without
next_state/next_states config
- Weighted random selection across all FreeMode states
- Matches old hologram_player_rust behavior
Video plugin (赵雨薇):
- Send ScreenLockRequest(false) to screen plugin on Pause
- Send ScreenLockRequest(true) to screen plugin on Play/Resume
- Closes the pause-wake-lock gap vs old version
cargo check: 0 warnings, cargo test: 22/22 passed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 12:56:45 +08:00
showen
4edbd34797
feat: implement ConfigReloadRequest handler in ServiceManager
...
Complete the config hot-reload flow:
- ServiceManager receives ConfigReloadRequest from HTTP plugin
- Reloads config from source_path using AppConfig::from_file
- Updates internal config Arc
- Broadcasts ConfigReloaded(new_config) to all plugins
- Logs error on reload failure without crashing
This closes the P0 gap identified by architect Wang Siyuan:
the HTTP /api/config save endpoint promised hot-reload but
ServiceManager only had a TODO placeholder.
cargo check: 0 warnings, cargo test: 22/22 passed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 12:43:33 +08:00
showen
5af7fc18a5
feat: core tests, bug fixes, API docs rewrite, HTTP compat routes
...
- Fix state_machine reset_state_progress: reset sequence index before
validation to prevent out-of-bounds error on state transitions
- Fix video transformer test: use ±1 tolerance for OpenCV interpolation
- Add core integration tests (service_manager, dependencies, messages)
- Add HTTP compat routes (/index.html, POST /api/wifi/scan, hotspot aliases)
- Rewrite clients/docs/API.md to match actual implementation
- Fix BLE unused imports warning
- CEO task planning for next round (ConfigReload, playlist snapshot)
cargo check: 0 warnings, cargo test: 22/22 passed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 12:40:17 +08:00
showen
45c0a8d54b
feat: video/state_machine unit tests and on_video_completed logic fix
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 08:20:25 +08:00
showen
8ed9c93c8e
fix BLE wifi status delivery and websocket compile issues
2026-03-12 08:07:21 +08:00
showen
0709d0de05
ceo: 完成configs迁移和main.rs插件注册
...
- 从旧项目复制dog_state_machine.json和cat_state_machine.json
- 实现main.rs完整插件注册(screen, wifi, video, ble, http)
- 添加命令行参数支持(--config, --validate)
- 实现Ctrl+C优雅退出
- 添加ctrlc依赖
2026-03-12 07:15:21 +08:00
showen
62c02b541c
team: 组建产品和需求团队
...
新增产品和需求团队:
- 张婉琳 - 产品总监(前字节抖音产品总监)
- 李明哲 - 需求分析师(前腾讯微信需求分析师)
- 王思远 - 架构师(前阿里淘宝资深架构师)
更新管理架构:
- 产品线:产品总监 → 需求分析师 → PRD/需求文档
- 技术线:PM + 架构师 → 开发团队 → QA 团队
- 工作流程:产品规划 → 需求分析 → 架构设计 → 需求评审 → 开发实现 → 质量保证
团队职责:
- 产品总监:制定产品战略和路线图
- 需求分析师:细化需求,编写需求规格说明
- 架构师:设计技术方案,编写技术设计文档
2026-03-12 06:38:37 +08:00
showen
6940f03187
feat: 第二轮核心插件完成 + QA 团队组建
...
第二轮任务完成:
- Message Clone + ServiceManager Broadcast (张明远)
- VideoProcessor 完整迁移 1349行 (李思琪)
- BlePlugin 双连接修复 590行 (王浩然)
- HttpPlugin + Web UI 914行 (赵雨薇)
总计新增/修改 1303行代码,cargo check 通过
QA 团队组建:
- 新增 QA 负责人林晓峰(前腾讯测试专家)
- 新增测试工程师周雅婷(前字节测试工程师)
- 更新工作流程:开发 → PM 初审 → QA 测试 → CEO 终审
- 开发和 QA 并行工作,提高效率
2026-03-12 06:30:08 +08:00
showen
d443f28f6e
docs: 战略规划和管理架构优化
...
- 新增 STRATEGY.md: 三年战略规划、技术路线、团队策略
- 新增 MILESTONES.md: 详细里程碑和时间表(M1.1-M1.4)
- 新增 CODE_REVIEW.md: 代码审核标准和流程
- 组建管理班子: 新增 PM 刘建国,优化管理架构
- 丰富团队成员背景: 补充所有成员的教育经历、工作经验、技能树
- 解锁多线程思考能力: 团队成员可使用 kilo 命令并行探索
- 更新工作流程: CEO → PM → 开发团队,两级审核制度
- 修正 kilo 调用方式: 不使用 -f 参数,在消息中指示读取文件
2026-03-12 06:14:52 +08:00
showen
98ba7704dd
core: Message Clone + ServiceManager Broadcast 完整实现
...
张明远交付:
- Message/PlayerCommand/WifiCommand/Destination 加 derive(Clone)
- Broadcast 分支遍历所有插件转发 msg.clone()
- running 标志控制主循环
- Manager 收到 Shutdown 时先广播给所有插件再停
- cargo check 零 warning
Co-Authored-By: GPT-5.4 <noreply@openai.com >
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 05:42:53 +08:00
showen
3654af5843
feat: config验证 + StateMachine + WifiPlugin + ScreenPlugin
...
团队交付 Phase 1 第一轮:
- 张明远: config.rs 完整验证逻辑 (Display/VideoItem/Transition/Scenes/StateMachine)
- 李思琪: state_machine.rs 完整实现 (defer/ignore triggers, 加权随机, loop range)
- 王浩然: wifi/mod.rs WiFi管理插件 (scan/connect/status/ap via nmcli)
- 赵雨薇: screen/mod.rs 屏幕管理插件 (systemd-inhibit唤醒锁 + unclutter光标)
cargo check 零 warning 通过。
Co-Authored-By: GPT-5.4 <noreply@openai.com >
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 05:31:21 +08:00
showen
23f4d46287
init: ShowenV2 项目骨架 — 数字生命窗口平台
...
- core/ 跨平台内核骨架 (Plugin trait, Message, ServiceManager, Config)
- plugins/ 空桩 (video, http, ble, screen, wifi)
- PROGRESS.md 进度跟踪, TEAM.md 团队档案
- cargo check 零 warning 通过
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 05:03:58 +08:00