Repository navigation
feat(webui): the scheduled-task panel on top of ADR 0012's store - #24
Merged
Merged
Conversation
PR #21 shipped the backend for Module L: its own store at `<dataDir>/webui/scheduled-tasks.sqlite` and an in-process tick beside the heartbeat in `WebuiService`. The user-visible half was never built — the 定时 rail row was still rendered `inert` and the client had no scheduled-task component at all. This adds it, against the six operations PR #21 registered. The panel's 创建 dropdown offers 手动创建 and 在对话中创建. The manual dialog carries the fields the store actually has — name, agent, prompt, run mode, and a schedule that is either 仅一次 or 每 N 分钟. The conversational path opens a new session, sends a guiding message, and creates the task when the user says they are done. The list groups by agent and shows last/next run with the last result; a slot missed while no host was running surfaces as `missed` with its count rather than being presented as "it never existed". Two things this deliberately does not do. It does not invent a `listAgents` operation — the agent choices are derived from the session listing the client already has, so no server file changes and nothing collides with merged work. And it does not draw controls the store cannot persist: 项目, 模型, and calendar periods (每天几点 / 每周几) have no columns, so the dialog says so in one line rather than shipping a disabled control that silently drops the value. That gap is a storage extension, not a UI decision. Client-only by construction: no `src/server/**`, no `local-runtime*`, no `docs/**`, no dependency change. The panel opens on `getScheduledTaskCapability` and reports `reason` when the capability is unavailable, so an absent scheduler is a message rather than an empty screen.
`tsconfig.test-full.json` is stricter than `tsconfig.test.json`, and it caught three `createElement(WebuiCronCreateDialog, ...)` calls in the shell suite that omitted the required `onSubmit` and `onClose` props. `typecheck:test` let them through; `typecheck:webui-full` did not, which is the gate the WebUI verification profile runs. Both callbacks are inert in these tests — they render markup and assert on it, never submit — so the stubs keep the assertions honest.
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.
PR #21 shipped the backend for Module L: its own store at
<dataDir>/webui/scheduled-tasks.sqliteand an in-process tick beside the heartbeat inWebuiService. The user-visible half was never built — the 定时 rail row was still renderedinertand the client had no scheduled-task component at all. This adds it, against the six operations PR #21 registered.The panel's 创建 dropdown offers 手动创建 and 在对话中创建. The manual dialog carries the fields the store actually has — name, agent, prompt, run mode, and a schedule that is either 仅一次 or 每 N 分钟. The conversational path opens a new session, sends a guiding message, and creates the task when the user says they are done. The list groups by agent and shows last/next run with the last result; a slot missed while no host was running surfaces as
missedwith its count rather than being presented as "it never existed".Two things this deliberately does not do. It does not invent a
listAgentsoperation — the agent choices are derived from the session listing the client already has, so no server file changes and nothing collides with merged work. And it does not draw controls the store cannot persist: 项目, 模型, and calendar periods (每天几点 / 每周几) have no columns, so the dialog says so in one line rather than shipping a disabled control that silently drops the value. That gap is a storage extension, not a UI decision.Client-only by construction: no
src/server/**, nolocal-runtime*, nodocs/**, no dependency change. The panel opens ongetScheduledTaskCapabilityand reportsreasonwhen the capability is unavailable, so an absent scheduler is a message rather than an empty screen.Change
Describe the user-visible problem and resulting behavior. Link a public issue when applicable.
bug,enhancement,documentationordependencies) and affected product (cli,tuitogether withcli, ordesktop) where applicable; see the label guide.Validation
perf:full(see requirements); for full coverage, link a passing run for the latest PR head and intended base:Publication and contribution checks
release/public-source.json; new tests are declared intest/vitest-suites.jsonwhere applicable.Maintainer handoff
Publication scope or license changes (if any):
Shared-source port: not needed / pending / complete. Record public PR references only; keep private links and review material out of this PR.