Repository navigation
fix(panel): 定时测试「同步到全部槽」复制整块设置,表单跟随外部修改 - #520
Merged
Merged
Conversation
cursor
Bot
force-pushed
the
fix/test-schedule-sync-all
branch
2 times, most recently
from
October 18, 2026 02:41
1445bc6 to
97bfd08
Compare
cursor
Bot
force-pushed
the
fix/test-schedule-sync-all
branch
from
October 18, 2026 02:48
97bfd08 to
ce39013
Compare
「同步到全部槽」原先只覆盖调度时间、保留各槽原开关,在一个槽开启后同步, 其余槽仍是暂停,看起来没有任何作用。 - POST /api/panel/test-schedule/sync 新增可选 test 字段(enabled、model、 prompt、max_tokens/reasoning_effort);带 test 时整块覆盖,另一类槽 (Claude/Codex)只同步开关与时间。请求先整体校验,不会写一半。不带 test 的旧行为不变。 - 前端「同步到全部槽」发送当前表单的整块设置,确认文案如实说明。 - 定时测试表单原先只在首次加载时读一次,之后保存会静默覆盖别处的修改: 改为每 30 秒刷新,未编辑时跟随外部修改,编辑中提示而不覆盖; 切换槽位重新挂载。 Co-authored-by: ted <kuhlmangarry24@gmail.com>
cursor
Bot
force-pushed
the
fix/test-schedule-sync-all
branch
from
October 18, 2026 02:56
ce39013 to
9d44874
Compare
dofastted
added a commit
that referenced
this pull request
Oct 18, 2026
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.
摘要
定时测试的「同步到全部槽」只覆盖调度时间,并保留各槽原有开关。在一个槽打开定时测试后点同步,其余槽仍是暂停,看起来没有任何作用。另外,定时测试表单只在首次加载时读一次计划,面板开着时别处的修改(包括同步)不会反映到表单上,此时点「保存计划」会静默覆盖掉别处的修改。
变更
src/lib/admin/vm-test-schedule.mjs:syncSchedules新增可选参数test(enabled、model、prompt、max_tokens/reasoning_effort)。test时把整块设置覆盖到目标槽。test,任何一项不合法时一个槽都不写。test时行为与原来一致。src/lib/admin/panel-routes.mjs:/api/panel/test-schedule/sync透传test。web/src/features/vm/vm-test-schedule.tsxreconcileSchedule。detail-page.tsx、vm-test-dialog.tsx:给定时测试组件加key={vm.id},切换槽位时重新载入。test/unit/vm-test-schedule.test.mjs新增 2 个用例;新增web/src/features/vm/vm-test-schedule.test.ts(4 个用例)。CHANGELOG.md:在「未发布」里追加一条。自检
vm-test-schedule后端测试 9/9 通过。pnpm build(含 tsc)通过。biome format与pnpm format:check均通过。未做