Repository navigation
Bot details: a paused-only scheduled list says "No scheduled tasks yet", and its rows never say when the next run is #2024
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 4727384169e34aca8f6c7279ffd1022d
Branch: dev/3-schedules-drawer-paused-next
Base: e807b26
At: 2026-11-01T10:44:48Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
Defect
The Bot details panel's Scheduled tasks block contradicts the settings page for the same Bot.
core/src/client/schedules.js (ScheduleSummary) keeps only active rows:
const tasks = view?.available ? view.tasks.filter(task => task.botId === bot.id && task.status === 'active') : []The host puts paused tasks in that same tasks array with status: 'paused' (core/src/host/schedules.js, ownerOf carries botId). So a Bot whose tasks are all paused falls into the empty branch, which renders t('No scheduled tasks yet. Add one') and calls actions.openSettings('schedules', bot.id) — the second argument opens the new task form, not the list. Meanwhile the settings page shows those same tasks as data-paused rows.
Reproduction (live main, no source change)
Import core/src/client/schedules.js from a clean tree and render ScheduleSummary the way core/test/schedules-client.test.js seeds it:
| case | rendered text | click |
|---|---|---|
| three paused tasks | Scheduled tasks | No scheduled tasks yet. Add one |
openSettings('schedules', b1) |
| one active + two paused + one finished | Scheduled tasks | Nightly audit | Every day at 09:00 |
openSettings('schedules') |
| no tasks at all | same text as the three-paused case | same click |
So "everything is paused" and "nothing exists" are indistinguishable, and the one action offered is "create a new one".
Second half: the row never says when the next run is
The same block's row prints timingText(task) — the repeat rule only ("Every day at 09:00"). nextText(task) already exists in that file and renders Next: <time> / Paused / Finished, but is only used by the settings page row. The comment on the block calls it "the Bot's next tasks", so it should answer "when".
Expected
- A Bot with tasks — paused or finished — lists them; the empty state appears only when the Bot has no tasks at all.
- Each row answers when:
Next: <time>for an active task,Pausedfor a paused one,Finishedfor a finished one. - A malformed or missing
scheduledAtmust not throw (Intl.DateTimeFormat().format(NaN)raisesRangeError) — guard withNumber.isFinitefirst. - The empty state's action (and only it) opens the new-task form; a row opens the settings list.
Scope
core/src/client/schedules.js (the status === 'active' filter, the empty branch, the row's when-span), one or two i18n entries in core/src/client/i18n.js, core/client.js rebuilt with core/scripts/build-client.mjs (lands in patches/ds-bot/0008-client-bundle.patch), and a view test in core/test/schedules-client.test.js (add ScheduleSummary to that file's export list and use its existing seeded helper). patches/ds-bot/files/src/client/schedules.js does not exist, so no mirror is generated.
Out of scope: the drawer's 3-row cap (tracked separately), host-side task shapes, and the settings page.
Acceptance (red first)
- three paused tasks → the block lists three rows whose when-text is
Paused, and noNo scheduled tasks yettext. - one active + paused + finished → three rows with
Next: …,Paused,Finishedrespectively. - a task whose
scheduledAtisundefinedor'not-a-date'renders without throwing. - no tasks → the empty state and its add button.
- On the base these cases are red; with the fix they are green.
Dedupe
No scheduled tasks yet (10 hits: #1751 digest scheduling, #473 last-run, #1307 copy a task, …) — none is this drawer empty state; paused task drawer 0; nextText 0; backlog has no matching entry.
Activity
HugoXK commentedon Nov 1, 2026
GO — assigned to FlyBot Dev-3
Branch:
dev/3-schedules-drawer-paused-next— use it verbatim, explicit refspecHEAD:refs/heads/dev/3-schedules-drawer-paused-next.Claim:
4727384169e34aca8f6c7279ffd1022dis ours already (created with this issue). Do not open a second claim.Base:
e807b2616cf91a3546ebd460cffbb7325d2dc279(livemainas this issue is opened; re-read it at push time and say so in the body).Scope, in
core/src/client/schedules.jsonly:ScheduleSummaryfilterstask.status === 'active'— drop that filter, so paused and finished tasks list too.nextText(task)(Next: <time>/Paused/Finished) instead oftimingText(task)alone.nextTextmust not throw on a missing or malformedscheduledAt: checkNumber.isFinitebefore formatting (Intl.DateTimeFormat().format(NaN)raisesRangeError).openSettings('schedules', bot.id)(that is the new-task form, which is what "Add one" means). A task row keepsopenSettings('schedules')(the list).Tests in
core/test/schedules-client.test.js: exportScheduleSummaryfrom that file's list and use its existingseededhelper — three paused tasks list threePausedrows and no empty-state text; one active + paused + finished showsNext: …/Paused/Finished; a task withscheduledAtundefined or'not-a-date'renders without throwing; no tasks shows the empty state. Red on the base, green on the fix.core/client.jsis rebuilt withcore/scripts/build-client.mjs(it lands inpatches/ds-bot/0008-client-bundle.patch);patches/ds-bot/files/src/client/schedules.jsdoes not exist, so no mirror. i18n: reuse the existing strings; add one only if a string is genuinely new.Deliver one message: PR number (it will close this issue), head/tree, base,
checkpointReasons: [],mcm true, red-first counts, verify group counts,arch-docs. Do not request review, do not add labels, do not enqueue.client: list a Bot's paused and finished scheduled tasks, and say whe…
client: list a Bot's paused and finished scheduled tasks, and say whe…