fix(scheduler): 非自动代理模式不再显示用户下拉也不带 userId 启动 - #784
ColinHouse wants to merge 2 commits into
Conversation
调度中心选了脚本任务的某个用户后切到「脚本设置」或「更新」,下拉仍显示、 请求仍带 userId,后端必然拒绝(指定单个用户仅支持自动代理)。用户下拉只在 自动代理模式显示;startTask 也只在自动代理模式附带 userId。这是 AUTO-MAS-Project#750 的 方案 1;方案 2(其他模式下改传 taskId=用户 UID)留作后续。 Closes AUTO-MAS-Project#750 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
审查者指南(小型 PR 中折叠显示)审查者指南调度器现在会在前端强制执行后端的单用户约束:在脚本设置和更新模式下隐藏用户下拉菜单并省略 userId,而切换回自动代理时会保留之前的选择。 调度器启动模式筛选的时序图sequenceDiagram
participant User
participant SchedulerTaskControl
participant useSchedulerLogic
participant Backend
User->>SchedulerTaskControl: Select user and choose mode
alt AUTO_PROXY mode
SchedulerTaskControl-->>User: Show user dropdown
User->>useSchedulerLogic: Start task
useSchedulerLogic->>Backend: Start request with userId
else SCRIPT_SETTINGS or UPDATE mode
SchedulerTaskControl-->>User: Hide user dropdown
User->>useSchedulerLogic: Start task
useSchedulerLogic->>Backend: Start request without userId
end
文件级变更
可能相关的问题
提示和命令与 Sourcery 交互
自定义你的体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideThe scheduler now enforces the backend’s single-user constraint in the frontend: the user dropdown is hidden and userId is omitted for script-settings and update modes, while switching back to automatic proxy retains the prior selection. Sequence diagram for scheduler launch mode filteringsequenceDiagram
participant User
participant SchedulerTaskControl
participant useSchedulerLogic
participant Backend
User->>SchedulerTaskControl: Select user and choose mode
alt AUTO_PROXY mode
SchedulerTaskControl-->>User: Show user dropdown
User->>useSchedulerLogic: Start task
useSchedulerLogic->>Backend: Start request with userId
else SCRIPT_SETTINGS or UPDATE mode
SchedulerTaskControl-->>User: Hide user dropdown
User->>useSchedulerLogic: Start task
useSchedulerLogic->>Backend: Start request without userId
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
嘿——我已经查看了你的更改,看起来很棒!
Sourcery 评估
需要人工审查。 如果模式检查有误,之前被拒绝的启动可能会在没有用户限制的情况下继续执行,并为超出预期数量的用户运行调度器任务。回滚可以防止后续启动,但无法撤销已经发生的作业或副作用。
Original comment in English
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the mode check is wrong, a previously rejected launch could proceed without a user restriction and run the scheduler task for more users than intended. Reverting prevents future launches but cannot undo jobs or side effects that already occurred.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
摘要
指定单个用户仅支持脚本的自动代理任务),而用户下拉仍然显示、所选用户仍然被带上userId(切回自动代理时之前的选择仍保留)taskId,让下拉变成「打开哪个用户的配置」)是功能层面的改动,如果更倾向那种,我可以改yarn lint(oxlint,0 error / 0 warning)、yarn typecheck(vue-tsc,0 错误)、yarn test(Test Files 63 passed (63),Tests 578 passed (578))在改动前的 dev 与改动后均通过。本机没有可运行的 Electron 环境,未做真机点选,请合并前顺手点一下Closes #750
🤖 Generated with Claude Code
Sourcery 摘要
错误修复:
Original summary in English
Summary by Sourcery
Bug Fixes:
Original summary in English