Repository navigation
List a Bot's paused and finished scheduled tasks in its details panel and say when each runs next - #2026
Merged
Birfy merged 1 commit intoNov 1, 2026
Conversation
Collaborator
|
Verdict: PASS at d1f8ec5 Ran at this tip: Review points:
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 1, 2026
…n each runs The details panel's Scheduled tasks block filtered the Bot's tasks to status === 'active', so a Bot whose tasks were all paused read "No scheduled tasks yet" while having tasks, and a row never said when it runs next. List every task of that Bot; each row now answers when — Next: <time>, Paused, or Finished — and an unreadable scheduledAt falls back to the repeat rule instead of throwing from Intl.DateTimeFormat. The empty state stays for a Bot with no tasks at all, and only that empty state's button carries bot.id (ThinkFlowLab#2024).
HugoXK
force-pushed
the
dev/3-schedules-drawer-paused-next
branch
from
November 1, 2026 11:16
d1f8ec5 to
9b054f0
Compare
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 1, 2026
Collaborator
|
Verdict: PASS at 9b054f0 Ran at this tip: Review points (rebase tip
|
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.
Owner: Dev-3
Reviewer: Birfy
Fixes #2024
The defect
ScheduleSummary— the Scheduled tasks block in a Bot's details panel — kept onlytask.status === 'active'rows. The host puts paused and finished tasks in the sameview.tasksarray (ownerOfcarriesbotId), so a Bot whose tasks were all paused fell into the empty branch: it read No scheduled tasks yet. Add one and its only button calledopenSettings('schedules', bot.id), which opens the new-task form — while the settings page listed the same tasks as paused rows. The rows also printedtimingText(task), the repeat rule (every day at 09:00), never when the next run is. Three paused tasks and no tasks at all rendered identically.What changed
status === 'active'filter is gone: paused and finished tasks list. The empty state now appears only when the Bot has no tasks at all; its button keepsopenSettings('schedules', bot.id)(the new-task form is what "Add one" means), and a row keepsopenSettings('schedules')(the list).nextText(task)—Next: <time>for an active task,Pausedfor a paused one,Finishedfor a finished one — instead of the repeat rule alone.nextTextchecksNumber.isFinite(Date.parse(...))before formatting, andtimingText'sat/afterbranch (whichnextTextfalls back to) gets the same guard, so a missing or malformedscheduledAtsays nothing instead of throwingRangeError: Invalid time valueout of the panel.Scope held to the issue:
core/src/client/schedules.js, its view test, the rebuilt bundle, the owned subsystem doc, one changelog fragment. The 3-row cap, host-side task shapes and the settings page are untouched; no i18n string is new (Paused,FinishedandNext: {time}already had entries).Rebased onto the new main
#2023merged while this was in review (5f1103561dd1279040e473b0c3dea3b536e5baf4), and it touches four of the files here:core/client.js,patches/ds-bot/0001-core-fixes.patch,patches/ds-bot/0008-client-bundle.patch,docs/subsystems/core-client.md. GitHub reportedmergeable: clean, but a clean text merge is not a self-consistent generated tree, so the branch is rebased on5f110356and every generated artifact was regenerated on that base, not merged:core/client.js—node core/scripts/build-client.mjspatches/ds-bot/0001-core-fixes.patch,0008-client-bundle.patch,files/test/schedules-client.test.js—node scripts/ds-bot-patches.mjs generatetwice; the second run writes identical bytescheck,canonicalandbuild-client.mjs --checkon the rebased tree: all three green (see below), socore/ equals ds-bot/ + patches/ds-bot/holds after Keep the newest Project board decisions and say how many the cap hid #2023 landed, not only before it.The 0008 re-alignment is larger than the 21/10 bundle change it carries: of its 1161 added lines, 1071 are lines it also removes (the same bundle text re-hunked at new offsets —
core/client.jsand ds-bot'sclient.jsdiffer almost everywhere, so a small edit moves the diff alignment). Nothing in it was hand-edited;canonicalproves it is exactly whatgeneratewrites.Red first
Two independent runs on the new base
5f1103561dd1279040e473b0c3dea3b536e5baf4— two fresh checkouts of the base carrying only the new test file. Both: 24 pass / 3 fail, and the three new cases are the failures:#2024: a Bot whose tasks are all paused lists them, and the add-one empty state is gone—0 !== 3; the rendered text isScheduled tasks|No scheduled tasks yet. Add one.#2024: each row answers when — Next: …, Paused, Finished—0 !== 3; the rendered text isScheduled tasks|Briefing|Every day at 09:00 (Asia/Shanghai)— the repeat rule, with no next run.#2024: a missing or malformed scheduledAt renders without throwing—Got unwanted exception. Actual message: "Invalid time value"fromtimingText→dayAndTime→Intl.DateTimeFormat().format(NaN).The fourth new test,
a Bot with no tasks at all keeps the empty state and its add button, is a control: it is green on the base and stays green.Verified on the head
TZ=UTC ARCH_DOCS_BASE=5f1103561dd1279040e473b0c3dea3b536e5baf4 npm run verifyin a clean detached checkout of9b054f0d7389e311c7f42898a5a1ab756064cd03, exit 0:2447/2447, social541/541, tree127/127, timeline135/135, workflow336/336,.github/scripts563/563, interop37/37, live-e2e24/24arch-docs: OK (8 changed file(s))against base5f110356; core lint73 warnings and 0 errors— the base's own count, with no warning in a line this diff addsok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/,ok patches/ds-bot/ is what generate writes (generate is a no-op);build-client.mjs --checkno-opNot run: smoke/bench (no host or turn path), and the CI
packagejob's pack, typecheck and actionlint.Checkpoint
{ "pr": 2026, "claim": "Dev-3", "issue": 2024, "summary": "The Bot details panel's Scheduled tasks block kept only active rows, so a Bot whose tasks were all paused claimed it had none and offered only the new-task form while the settings page listed those same rows. It now lists paused and finished tasks too, and each row answers when it runs next — Next: <time>, Paused or Finished — instead of the repeat rule alone. A missing or malformed scheduledAt falls back to the repeat rule instead of throwing RangeError, and only a Bot with no tasks at all gets the empty state, whose button alone opens the new-task form.", "files": [ "core/src/client/schedules.js", "core/test/schedules-client.test.js", "core/client.js", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/test/schedules-client.test.js", "docs/subsystems/core-client.md", "changelog.d/2024-schedules-drawer-paused-next.fixed.md" ], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=5f1103561dd1279040e473b0c3dea3b536e5baf4 npm run verify", "result": "green", "at": "9b054f0d7389e311c7f42898a5a1ab756064cd03" }, "next": "none — ready for review" }