Skip to content

Bot details: the Scheduled tasks list draws three rows and never says how many it left out #2030

Closed

Description

@HugoXK

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: c4a4903ef1df4cbbabff5aa083db581d
Branch: dev/3-schedule-summary-more
Base: 938a1ec
At: 2026-11-01T11:28:18Z

What

The Bot details panel's Scheduled tasks line draws tasks.slice(0, 3) and says nothing about what it left out. A Bot with five scheduled tasks shows three rows under a title that just says Scheduled tasks: no count, no "2 more", no hint that the list is partial. The only way to learn the real number is to open Settings → Scheduled tasks by hand.

This is the display half of the same card that #2024 (#2026, merged) just fixed: that one stopped a paused-only list from claiming there are no tasks and made each row say when it next runs. It did not change the three-row cap or the title.

Expected

  • The section title carries the count: Scheduled tasks · 5 (the same · separation the board and settings rows already use).
  • When more than three tasks exist, one final row after the three says how many are left (2 more), and clicking it opens the full list.
  • That click calls openSettings('schedules') without a Bot id. Passing the id opens the new-task form instead of the list: schedules.js:332 is useState(Boolean(start)) and settings.js:238 is start: id ?? undefined, so openSettings('schedules', bot.id) means "start a new task" — the wrong destination for "show me the rest".
  • Three or fewer tasks: no extra row and no count suffix (the title is exactly Scheduled tasks as today), so nothing changes for the common case.
  • Zero tasks: today's empty state is untouched, including its openSettings('schedules', bot.id) — that one should open the new-task form.

Reproduction at 938a1eca

core/src/client/schedules.js:

  • :421-430 — ScheduleSummary.
  • :423 — const tasks = view?.available ? view.tasks.filter(task => task.botId === bot.id) : [] (no status filter any more, that is #2026's doing).
  • :425 — h('div', { className: 'bt-section-title' }, t('Scheduled tasks')) — the title is the bare string.
  • :428 — tasks.slice(0, 3).map(...); each row's click is actions.openSettings('schedules').
  • :429 — the row's when-column is nextText(task).
  • :427 — the empty state, whose click passes bot.id.

Mounted from core/src/client/details-drawer.js (the details panel). Five tasks therefore render three buttons and stop.

Acceptance (red first, one assertion per case)

  1. With a view holding five scheduled tasks for the Bot: the details panel renders exactly three .bt-task-line buttons and the section title text contains 5 (today the title has no number → red).
  2. With the same fixture: there is a fourth row reading 2 more (or Showing 3 of 5 — pick one and be consistent), and clicking it calls openSettings with exactly ('schedules') — no second argument. If it is implemented as ('schedules', bot.id), the assertion on the call arguments must go red.
  3. Control: three tasks → the more row is absent and the title carries no count suffix; zero tasks → the existing empty state renders unchanged (same label, and its click still passes bot.id). Both stay green today.

Each of 1–3 must be red on 938a1eca with only the new test code added, and green at the tip.

Scope

  • core/src/client/schedules.js — ScheduleSummary only (:421-430). Leave SchedulesPage, TaskList and the settings section alone.
  • core/src/client/i18n.js — one or two keys for the count and the N more row; reuse the existing ·-style count wording if one exists.
  • core/test/schedules-client.test.js — add the cases; the esbuild export list at :12 already exports ScheduleSummary, and the destructure at :34 already pulls it in, so no export change is needed. seeded at :21-22 is how a view is fed.
  • Generated artifacts: core/client.js → patches/ds-bot/0008-client-bundle.patch; the source diff for schedules.js/i18n.js lands where generate puts it (patches/ds-bot/0001-core-fixes.patch). Run generate; do not hand-edit. patches/ds-bot/files/src/client/schedules.js does not exist on 938a1eca (404), so do not create it.

Not in scope

  • Changing the cap from three to some other number, or making the list scrollable/paged.
  • Sorting the summary rows, or what nextText says (that is #2026's behaviour and it stays).
  • The Settings page's own scheduled-task section, which already lists everything.
  • Adding a test for the reset-effect gap found in #2028; unrelated.

Dedupe at 938a1eca

  • Tree grep slice(0, 3) → only core/src/client/schedules.js:428 (no mirror copy: patches/ds-bot/files/src/client/schedules.js is 404). The other slice(0, 3)-shaped code in the tree is avatar seats in mark.js, unrelated.
  • Issue search details panel scheduled tasks shows only three more count hidden → 2 results, neither this gap: #2024/#2026 (closed 11:24:45Z today — the paused-only/next-run defect in the same component, different symptom) and #354 (the scheduled-tasks roadmap, closed).
  • Issue search ScheduleSummary Scheduled tasks drawer count more rows → 1 result: #354, same as above.

Notes for whoever picks this up

  • #2028 is in flight and also regenerates core/client.js / patches/ds-bot/0008-client-bundle.patch / 0001. Branch from live main right before starting, and rebase + rerun generate/check/canonical/build-client --check before opening the pull request, so the generated artifacts are computed on the base that will actually merge.
  • The more row should be a button like the task rows, with the same bt-more-style affordance the empty state already uses, so the panel keeps one interaction language.
  • Do not add the count to the title when there are zero tasks: the empty state has its own sentence and a count of 0 next to it reads like a bug.

Activity

  1. added a commit that references this issue on Nov 1, 2026
    1756bfa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions