feat(ostool-server): rebuild admin UI with realtime updates and unbound power control - #183
Merged
Conversation
Merged
There was a problem hiding this comment.
审查结论
本 PR 引入了管理端 revisioned SSE 投影和 OS 事件监视器,新增电源操作 API,并将 Web UI 重写为 React/Vite,同时整合 loader、虚拟设备、board/session 状态和文档。这些改动会影响管理端事件流、网络/串口/TFTP 状态刷新、session 生命周期以及前端 API 契约,因而并非完全孤立的 UI 变更。
阻塞问题
我发现 1 个阻塞问题,已作为右侧行内评论提交:Linux netlink 监视器用空 buffer 调用 datagram socket 的 recv,收到首个网络事件后不会消费队列,可能让 readiness 永远保持就绪并造成高 CPU 忙循环。
验证与背景
- GitHub Actions 的两个 check run 均为 completed/success,且目标 head 仍为
b6b9f3c5f83b61b8fbafacf1513a13224e7c9292。 - 本地
git diff --check通过;但审查环境没有cargo、rustc或pnpm,因此无法独立运行 Rust 格式化、clippy、测试或 Web UI 构建。PR 描述中列出的验证结果未能在本地复现。 - 已检查既有 reviews、review comments 和 issue comments,当前没有此前的可执行审查意见需要处理。
- 已检索
admin/events、loader/network和webui/admin相关历史 PR,未发现需要在本次审查中合并处理的直接重复方案。
除上述问题外,当前没有确认的其他阻塞问题;修复 netlink 接收循环后仍建议在 Linux 环境补跑完整 Rust/Web UI 验证。
Powered by gpt-5.6-luna
| let Ok(mut ready) = socket.readable().await else { | ||
| break; | ||
| }; | ||
| let result = ready.try_io(|fd| fd.get_ref().recv(&mut Vec::<u8>::new(), 0)); |
There was a problem hiding this comment.
这里把空 Vec<u8> 传给了 netlink datagram socket 的 recv。对这种 socket,零长度接收会返回 0 但不会消费队列中的消息;因此第一次 link/address 事件后,readable() 可能一直保持 ready,任务会在紧循环中反复 invalidate(["network"]) 并占满 CPU。请改用实际的有界 buffer,并在重新等待 readiness 前循环接收直到 WouldBlock。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新建开发板时,设备可能尚未上电,原界面无法在绑定 MAC 前控制电源。本次增加独立电源动作接口,并将管理界面迁移到 React + TypeScript + shadcn/ui,通过 SSE 原位更新状态。
主要改动
验证
验证边界
QEMU/axloader 联调与已部署服务检查不能替代每一种实体板及继电器的实机验收。实体板无电源反馈时,界面只表示命令完成,不宣称确认物理上电。