Skip to content

feat: add commander remote control toggle - #18

Merged
yzs15 merged 2 commits into
masterfrom
feature/remote-control-toggle
Jul 7, 2026
Merged

feat: add commander remote control toggle#18
yzs15 merged 2 commits into
masterfrom
feature/remote-control-toggle

Conversation

@yzs15

@yzs15 yzs15 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a 远程控制 panel in the commander dashboard with the Loom commander URL and a toggle for the local driver daemon.
  • Add secured /api/console/driver-daemon GET/POST endpoints with console-token, same-origin checks, body size limit, serialized mutations, and sanitized errors.
  • Persist driver daemon intent, manage Loom driver process metadata safely, and register/display drivers by the installed computer name.

Review Gates

  • Codex spec review: passed.
  • Codex implementation plan review: passed.
  • Fresh Claude Code final review: REVIEW_DECISION: PASS, MAX_SEVERITY: P3; no P0/P1 findings.

Test Plan

  • go test -count=1 ./...
  • npm test in internal/ui/web
  • npm run build in internal/ui/web
  • GOOS=windows go test -count=1 -run '^$' ./internal/loom
  • git diff --check

Deployment Smoke

  • Pending: build Windows installer, deploy to Administrator@9.0.16.110, and validate the 远程控制 button against the installed app.

@yzs15

yzs15 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Windows deployment smoke on test machine 9.0.16.110:

  • Installed agentserver-app-0.1.5-setup.exe; launcher is running from C:\Users\Administrator\AppData\Local\Programs\agentserver-app\launcher.exe.
  • Remote-control endpoint is wired: POST disable persisted enabled=false/running=false; POST enable returned enabled=true/running=true and the Commander URL is https://loom.nj.cs.ac.cn:10062/commander.
  • After 8 seconds, GET returned enabled=true/running=false; only serve-mcp was still present.
  • Manual driver-agent.exe serve-daemon --config C:\Users\Administrator\.config\multi-agent\driver.yaml exited with driver-agent: daemon: commander: observer unauthorized: status 401.
  • Driver config display name is the Windows computer name WIN-8650DR8KQKD.
  • Cleanup: remote control was disabled after the smoke test and no driver-agent.exe process remained.

Conclusion: the button/API path starts and stops the daemon process, but end-to-end remote control on this test machine is blocked by Commander/observer auth (401), not by the UI click handler.

@yzs15

yzs15 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Claude Code rereview after fix (22d5669): NO_P0_P1.

P2/P3 recorded only per policy; not fixed in this PR pass:

P2:

  • internal/console/driver_daemon.go: enable 后 Running=false/error 分支未清空 st.Processes 再持久化,属于状态卫生问题。
  • internal/loom/config.go: StopDriverDaemondriverProcessMatches 连续调用两次,功能无影响但重复 inspect。
  • internal/headless/driver.go: refreshDriverFiles / ServeDriverMCP 无条件启动 daemon,是否应受 dashboard 开关约束需要产品语义确认。
  • Commander/observer URL 与测试机实际认证/端口问题需要环境侧核实。

P3:

  • internal/ui/web/src/components/Dashboard.vue: remote-control link 可统一走 safeExternalUrl 做防御性校验。
  • internal/ui/server.go: driver-daemon GET 错误路径未来如果变成可达,建议返回脱敏错误。
  • DriverDaemonStore missing vs read-failed 语义可拆测试名/用例。
  • driverBackgroundProcesses 是进程内 dedup,launcher 崩溃后的孤儿 daemon 需要后续整体治理。

@yzs15
yzs15 merged commit 4bcfe39 into master Jul 7, 2026
4 checks passed
@yzs15
yzs15 deleted the feature/remote-control-toggle branch July 7, 2026 11:26
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