Skip to content

feat(webui): the scheduled-task panel on top of ADR 0012's store - #24

Merged
Andre-1998 merged 2 commits into
webuifrom
feat/webui-scheduled-task-ui
Oct 5, 2026
Merged

Andre-1998 merged 2 commits into
webuifrom
feat/webui-scheduled-task-ui

Conversation

@Andre-1998

Copy link
Copy Markdown
Collaborator

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.

Thanks for your interest in contributing. For now, code and documentation pull requests are accepted only from repository collaborators. If you are not a collaborator, please open an issue so we can discuss your idea.

Change

Describe the user-visible problem and resulting behavior. Link a public issue when applicable.

  • PR labels: change type (bug, enhancement, documentation or dependencies) and affected product (cli, tui together with cli, or desktop) where applicable; see the label guide.

Validation

  • Checks run and results (include the revision/profile where relevant):
  • Performance: basic / perf:full (see requirements); for full coverage, link a passing run for the latest PR head and intended base:
  • NOT RUN, platform limitations and live-service boundaries:

Publication and contribution checks

  • I have permission to contribute these changes under the existing licenses applicable to the changed files/packages; imported material and its provenance are identified and existing notices are preserved.
  • No credentials, account data, real user content, internal source history or private review material is included.
  • Added/removed source files were reviewed before regenerating release/public-source.json; new tests are declared in test/vitest-suites.json where applicable.
  • Shared English/Chinese documentation and capability/verification records are updated where applicable. Mock/offline results are not described as live-service acceptance.

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.

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.
@Andre-1998
Andre-1998 merged commit 4dd2430 into webui Oct 5, 2026
8 checks passed
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