Skip to content

Stop preselecting the first Bot in the new-task form - #1671

Merged
Birfy merged 1 commit into
mainfrom
dev/1334-taskform-no-preselect
Oct 29, 2026
Merged

Birfy merged 1 commit into
mainfrom
dev/1334-taskform-no-preselect

Conversation

@Birfy

@Birfy Birfy commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev

Fixes #1334
Owner: Chief
Reviewer: Reviewer
Tip SHA: 2b6aa22
Base: 2349444
Docs-not-needed: no — docs/subsystems/core-client.md (the page that owns core/src/client/schedules.js) is updated here.

What and why

The Scheduled tasks form opened with roster.bots[0]?.id already chosen, so Create task was live on a form nobody had filled in: one click created the task for whichever Bot sorted first in the roster. That is the shape #1322 fixed in the copy picker, left in place there on purpose.

Six columns

Problem A new task's target was roster order, not a choice; one click sent it to the first Bot.
Change TaskForm seeds target with start ?? '' (no roster.bots[0]), the Send to select opens on the placeholder "Pick a Bot or group chat", and submit returns while target === '' — so the disabled button and the form's submit path agree. Editing keeps the task's own chat.
Tests core/test/schedules-client.test.js: one new case asserts the form opens with '' and the placeholder as the first option, Create task disabled, and a submit with no target calling no scheduleCreate; the second half seeds a picked room and checks it is what gets sent.
Red first With core/src/client/schedules.js swapped back to the base blob: 22 pass, 1 fail (the new case). At the tip: 23 pass, 0 fail.
Risk Client form state only, one file of source; no host, permission, release or stored-data path. Computed tier expected T1.
Not done Item 2 of the issue (the copy test seeding its pick instead of firing onChange) — the owner decision says it is not this issue's acceptance. No smoke run: index.js and src/host/ are untouched.

Ran at the tip

$ node scripts/build-client.mjs                      # client.js regenerated
$ node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js
# tests 23  # pass 23  # fail 0
$ node scripts/ds-bot-patches.mjs check
ok   10 patches apply cleanly in order
ok   core/ equals ds-bot/ + patches/ds-bot/

Not run: the full npm run verify and the smoke test (no git on this box for the pin hash; CI runs both on this tip).

Checkpoint

{
  "pr": 1671, "claim": "Chief", "issue": 1334,
  "summary": "The new-task form no longer opens with the first roster Bot chosen. Its target starts empty, the Send to picker shows the placeholder, and both the Create button and the form's submit path refuse to send until a Bot or group chat is picked. Editing an existing task still opens on that task's own chat. A new client test pins the opening state, the placeholder, and that an unpicked submit calls nothing.",
  "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/1334-taskform-no-preselect.fixed.md"
  ],
  "checks": { "ran": "node scripts/build-client.mjs && node --import ./test/harness-resolve.mjs --test test/schedules-client.test.js && node scripts/ds-bot-patches.mjs check", "result": "green", "at": "2b6aa22169f7179ce3e469e5eb83512bd424a589" },
  "next": "Reviewer: judge the tip; red-first evidence is the base-source run in the body. Then queue (T1 expected, no PASS needed if risk-gate says T1)."
}

The Scheduled tasks form opened with `roster.bots[0]` already chosen, so one
click on Create sent the task to whichever Bot sorted first — the same shape
#1322 fixed in the copy picker. The form now opens with no target and a submit
without a pick sends nothing (#1334).

Written-by: Dev
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 29, 2026
@Birfy Birfy self-assigned this Oct 29, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 3a5a104 Oct 29, 2026
13 of 15 checks passed
@Birfy
Birfy deleted the dev/1334-taskform-no-preselect branch October 29, 2026 09:55
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 29, 2026
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.

schedules: follow-ups from #1322 — the new-task form preselects a Bot, and the copy test seeds the pick

1 participant