Repository navigation
feat(gui): 左侧栏评审进度面板 - #42
Open
Nicholas023 wants to merge 4 commits into
Open
Nicholas023 wants to merge 4 commits into
Nicholas023 wants to merge 4 commits into
Conversation
A scan could run for 14 minutes with nothing on screen but a frozen "reviewing": the kernel is spawned with stdio "ignore", so every progress line it writes was discarded. - kernel writes <pluginRoot>/progress/<taskId>.json on each stage/round - host serves GET /api/code-review/progress and POST /api/code-review/cancel over webServer, the same route mechanism mac-tunnel uses here - client registers a sidebar.panellist entry plus the matching main panel, polling every 3s; running items get a Cancel button 11 new tests. Full suite: 502 passed.
…he panel The panel shipped in the previous commit showed six phantom tasks named dcr-e2e-repo / scan-1 / e2e-task, all stuck on "writing report" with a cancel button. They were written by the test suite: executeTask fell back to resolveDshRoot() and every e2e test therefore wrote into the real ~/.dsh. executeTask now writes progress only when the caller passes dshRoot; the kernel passes it, tests do not. Verified empirically: 502 tests, progress dir still empty afterwards. The panel itself is redrawn: neutral rgba palette, one card per task with status / target / detail / action rows, live elapsed time, three items, and a dashed empty state instead of a blank page.
…porting" Without it a finished task kept its last progress file at stage=reporting, so the panel can only tell it is done by looking the task card up. If the card is gone (as with the six phantom test rows) the item looks like it is still running and keeps offering a cancel button.
Feedback from the first real look: - an absolute report path is unreadable by eye, so it needs a copy button; - the result should be readable in place instead of opening a file; - green/yellow/red for done/running/failed rather than one grey dot. GET /api/code-review/report?taskId= serves the findings of a finished task, guarded to an absolute .json path recorded on its own task card, so it never becomes a general file reader. The panel expands inline, and every font size is now em-relative so it follows the host base size instead of fighting it.
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.
问题
一次 scan 跑了 14 分钟,界面上只有一个不会动的「评审中」。原因是内核拉起时
stdio: 'ignore',它写的每一行进度都被丢弃了。做法
<pluginRoot>/progress/<taskId>.json(原子写,失败不影响评审)GET /api/code-review/progress、POST /api/code-review/cancel(走webServer,与 mac-tunnel 同一套路由机制)sidebar.panellist侧栏入口 + 对应main面板,3 秒轮询,运行中的条目带「取消」按钮为什么不用 remote/typert
本机的
mac-tunnel/dsh-opencode-ip-guard已经证明webServer路由足够且最简单:不需要生成描述符,也不引入依赖。验证
待实机验证
合并后需要重启 DSH,左侧栏才会出现「代码审查」入口。
本 PR 由 DeepSeek Harness 辅助创建