feat(ui): qzone 调度三组件 — schedule picker / 参考图选择器 / 任务行 (PR-F3)#154
Merged
Conversation
PR-F3 of the QZone scheduler page rework. Components + tests only —
page wiring lands in PR-F4.
- qzone-schedule-picker: controlled daily/weekly/advanced trigger-time
picker over lib/cron-schedule's ScheduleState; mode switches never
drop time/weekdays/raw; weekday chips render Monday-first but keep
canonical 0=Sun..6=Sat values.
- qzone-ref-image-picker: reference-asset (立绘) grid with select
toggle, upload (slugified label + -2/-3 dedupe, client MIME/size
gate), ConfirmDialog-gated delete, dashed "missing" chips for
labels whose asset was deleted, and a >8 hint aligned with the
backend _MAX_REFS. Shares the persona studio's asset queryKey for
cache coherence.
- qzone-job-row: table row factored out of the qzone page and
extended to the full action cluster (run now / edit / pause·resume
/ delete); config-sourced rows are read-only with a tooltip.
- en + zh-CN locale keys under schedulerQzone.{schedule,refs,row.*}.
- 17 new vitest cases; icons from the sprite barrel only.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Jul 18, 2026
sweetcornna
added a commit
that referenced
this pull request
Jul 18, 2026
接入 #149/#151/#154 落地的库与组件: - 表格行换用 <QzoneJobRow>(run/edit/pause·resume/delete),删除旧内联行 - cron 手填换成 <QzoneSchedulePicker>(composeCron/parseCron) - 选中人格后显示 <QzoneRefImagePicker> 选参考图(image_ref_labels) - 新增发送抖动 jitter_minutes(0–120)输入 - 选中行就地回填编辑:parseCron 回填 picker、锁定人格、Save→Update、取消编辑 - saveMutation 按 editingName 分流 patch/create;enabled 交由行内 pause/resume - 删除走页面级 ConfirmDialog;启停按 enabled 分流 pause/resume - 保留一键启用每日说说 + next-fire 预览 - 新增 en+zh-CN 双份文案;新增页面测试 6 例 Co-authored-by: Cornna <[email protected]>
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.
概要
QZone 定时任务页重接(PR-F4)的组件地基:三个独立可测的新组件 + 17 个 vitest 用例 + en/zh-CN 文案键。本 PR 不接页面 ——
scheduler/qzone/page.tsx未改动,接线留给 PR-F4。基于已合并的 #149(cron-schedule 纯库)与 #151(scheduler API client 扩展)。组件契约(供 PR-F4 接线)
components/scheduler/qzone-schedule-picker.tsxScheduleState(lib/cron-schedule.ts)。<Input type="time">;每周 = 时间 + 周几多选 chips(周一开头显示,值保持 0=周日..6=周六);高级 = raw cron<Input>。time/weekdays/raw。父层用composeCron(value)得 cron(null 时禁用保存)。components/scheduler/qzone-ref-image-picker.tsxselected= 资产 label 列表(任务持久化的形态)。personaId=""时渲染"先选人格"提示、不发请求。["admin", "personas", personaId, "assets"](与 persona studio 页完全一致,缓存互通);过滤kind === "reference"。slugifyAssetLabel(file.name),与现有 label 冲突自动-2/-3后缀;client 端 MIME/大小/label 校验;成功后 invalidate 同 key 并自动选中新 label。ConfirmDialog→deleteAsset→ invalidate。selected.length > 8→ 提示"模型只看前 8 张"(导出REFS_VISIBLE_CAP = 8,对齐后端_MAX_REFS)。components/scheduler/qzone-job-row.tsx<TableRow>(6 列:name / persona / cron / 状态 badge / last run(ok·error badge + 时间 + qzone 链接 + last_error)/ 动作),需置于现有表格的<TableBody>内。source === "config"行:编辑/启停/删除禁用 + title 提示(TOML 只读);立即跑始终可用;source === "runtime"全开。qzone-job-{trigger|edit|toggle|delete}-{name}、qzone-job-row-{name}。i18n 新键(en + zh-CN 双份,
LocaleBundlesatisfies 强制同形)schedulerQzone.schedule.*:modeDaily / modeWeekly / modeAdvanced / timeLabel / weekdaysLabel / dowMon..dowSun / rawLabelschedulerQzone.refs.*:title / help / pickPersonaFirst / empty / upload / uploadOk / uploadFail / selectedCount / capHint / missing / deleteTitle / deleteBody / deleted / deleteFailschedulerQzone.row.*追加:edit / pause / resume / delete / configReadonly验证
pnpm test:160 文件全过,1244 passed / 2 skipped(既有 skip)。已知 dev-mode/sidebar flake 本轮未出现。pnpm typecheck:0 错误。pnpm lint:新文件零告警(现存告警均在未触碰文件)。@/components/icons。规格偏差说明
nextFireTimehelper 仍在 API 层可供 PR-F4 使用。personaId=""时隐藏(避免无人格上传 404),规格未明确此分支,PR-F4 接线时表单必然先选人格。