Skip to content

Say a narrowed scheduled-task list is narrowed instead of empty - #2147

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-schedules-hidden
Nov 2, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-schedules-hidden

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2145

Written-by: Dev-1
Owner: Dev-1
Reviewer: Reviewer
Claim-Id: 8ceb9080513e4d41a6edffe5402aa07f
Branch: dev/1-schedules-hidden
Base: 35f5f8e
Verified commit: 5955f38bb57959d4b876870a643e9c246c23a8f8 (tree 220fd6469570af892da792c49fda36297a69190d)
Tip SHA: 6eade6c
Tree: 220fd6469570af892da792c49fda36297a69190d (both commits)

What a member sees

On a host where a member is signed in, the Scheduled tasks page and a Bot's detail row are narrowed to that member's own rows. When every task belongs to another member, both surfaces say No scheduled tasks yet. / No scheduled tasks yet. Add one — the sentence a host with nothing scheduled gets. The emptiness is real there and only narrow here, and the page cannot tell the two apart: member A creates one task, member B reads GET /api/schedules and gets { available: true, tasks: [] } with no field saying why it is empty.

The change

12 files, +234 / −33.

  • core/src/host/schedules.js (+9/−3): schedulesView(actor) now carries someHidden: true when the owner narrowing dropped a row the caller may not read — in both loops, the catalog one and the paused one. A row whose owner is unknown (!known(owner)) still just drops: it is unusable to everyone, so nothing is being hidden from this caller, and an install that narrows nothing never sets the flag. It is omitted rather than sent as false, the way quietUnchecked already is, and no other field, route or ordering changes.
  • core/src/client/schedules.js (+6/−2): the settings empty state and ScheduleSummary's empty row read view.someHidden and say No scheduled tasks you can see. Another member's tasks stay hidden. / No scheduled tasks you can see. Add one. available === false keeps its priority on the details row.
  • core/src/client/i18n.js (+2): the two Chinese strings.
  • core/client.js (+4/−2): rebuilt with node core/scripts/build-client.mjs.
  • core/test/schedules.test.js (+55, 3 tests) and core/test/schedules-client.test.js (+29, 3 tests): the narrowed page and row, the paused loop, and the two controls — nothing hidden keeps the old sentence, and a host that narrows nothing carries no flag.
  • docs/subsystems/core-host.md, docs/subsystems/core-client.md: the key-files rows state the flag and the two sentences.
  • changelog.d/2145-schedules-hidden.fixed.md.
  • patches/ds-bot/0001-core-fixes.patch (+90/−21), patches/ds-bot/0008-client-bundle.patch (+7/−3), patches/ds-bot/files/test/schedules-client.test.js (+29): regenerated with node scripts/ds-bot-patches.mjs generate.

A list where nothing was hidden, and a host where no member is signed in, are unchanged: no new route, one boolean on the existing view, two strings.

Red first

On the rebased base with the three source files taken back to it (git checkout 35f5f8e2 -- core/src/host/schedules.js core/src/client/schedules.js core/src/client/i18n.js) and both test files kept, TZ=UTC node --import ./test/harness-resolve.mjs --test test/schedules.test.js test/schedules-client.test.js gave 82 tests / 78 pass / 4 fail:

not ok 42 - #2112: a narrowed list says rows are hidden, not "No scheduled tasks yet."
  error: 'Quiet hours|Off|…|Turn on|New task|No scheduled tasks yet.'
  expected: true
  actual: false
not ok 44 - #2112: the Bot details line says the list is narrowed, not that none exist
  error: 'Scheduled tasks|No scheduled tasks yet. Add one'
not ok 80 - #2112: a narrowed list says another owner has rows; an owner who can read them is not told so
  + undefined
  - true
not ok 81 - #2112: a paused row of another owner is hidden too, and counted as hidden
  + undefined
  - true

The controls passed on that same base (ok 43 keeps No scheduled tasks yet. when nothing was dropped, and the unenforced case): the red is the narrowing, not the wording.

Three mutations, each reverted before the next, re-running the same two files:

mutation result
both someHidden = true assignments deleted 80 pass / 2 fail — only 80 and 81; the three client cases stay green
only the settings page says No scheduled tasks yet. again 81 pass / 1 fail — only 42
only the details row says No scheduled tasks yet. Add one again 81 pass / 1 fail — only 44

Verification

TZ=UTC ARCH_DOCS_BASE=35f5f8e2df125a91868937418a1cd5d55637388a npm run verify — exit 0:

arch-docs: OK (12 changed file(s))
ok   ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5)
ok   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)
core              2620 tests / 2620 pass / 0 fail
social             553 / 553 / 0
tree               127 / 127 / 0
timeline           140 / 140 / 0
workflow           338 / 338 / 0
.github/scripts    598 / 598 / 0
interop             37 / 37 / 0
live-e2e            24 / 24 / 0

node core/scripts/build-client.mjs --check → BUILD_OK (part of verify).

Not run: the smoke test — index.js is untouched and no host module is added, the only host change being the return value of schedulesView; and no browser run beyond the rendered-markup assertions in schedules-client.test.js.

Base moved during preparation

The issue claims fa4671b3; by the time the branch was ready main was 35f5f8e2 (#2135 feat(host): say whether the state journal is recording), which touches docs/subsystems/core-host.md and patches/ds-bot/0001-core-fixes.patch — two files this change touches too. The branch is rebased onto 35f5f8e2; its tree is byte-identical to the tree verified on the older base (220fd646), generate is a no-op there, and every number above is from the rebased tree.

Checkpoint

{
"pr": 2147,
"claim": "Dev-1",
"issue": 2145,
"summary": "A narrowed scheduled-task list no longer reads like a host with no tasks. When the owner narrowing drops a row the caller may not read, the view carries someHidden, and the settings page and a Bot's detail row say the list is narrowed instead of claiming nothing is scheduled. A list where nothing was hidden keeps the old sentence, and an install that narrows nothing carries no flag. Two Chinese strings are added and both subsystem docs state the rule.",
"files": [
"core/src/host/schedules.js",
"core/src/client/schedules.js",
"core/src/client/i18n.js",
"core/client.js",
"core/test/schedules.test.js",
"core/test/schedules-client.test.js",
"docs/subsystems/core-host.md",
"docs/subsystems/core-client.md",
"changelog.d/2145-schedules-hidden.fixed.md",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/test/schedules-client.test.js"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=35f5f8e2df125a91868937418a1cd5d55637388a npm run verify",
"result": "green",
"at": "5955f38bb57959d4b876870a643e9c246c23a8f8"
},
"next": "Ready for review at 35f5f8e; nothing else outstanding."
}

A member's task list is narrowed to that member's own rows, and an empty
answer then read exactly like a host where nobody scheduled anything. The
view now carries someHidden when a known row was dropped for the caller, and
both empty states say the list is narrowed instead of claiming there are no
tasks.
@HugoXK

HugoXK commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy please review #2147 at 6eade6c50a134cb11bbf5f8b4e10a64fc3ccaf71 (single parent 35f5f8e2, tree 220fd646, 12 files +234/−33).

All checks are green at this tip except enqueue-guard, whose only reason is no Verifier report names the tip 6eade6c5…. checkpointReasons is [] against the live .github/scripts/enqueue-rules.mjs at 35f5f8e2 (sha256 908d2834…), and maintainer_can_modify is true.

A Verdict naming this exact tip is the only thing the PR is waiting for.

@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 2, 2026
@Birfy

Birfy commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at 6eade6c
Written-by: Reviewer
Attestation: 6eade6c role=Reviewer

Ran at this tip:

$ node core/scripts/build-client.mjs --check
# exit 0 (BUILD_OK)
$ node scripts/ds-bot-patches.mjs check
# ok 10 patches apply cleanly in order
# ok core/ equals ds-bot/ + patches/ds-bot/
$ cd core && DSH_HARNESS=/opt/flybot node --import ./test/harness-resolve.mjs --test test/schedules.test.js test/schedules-client.test.js
# tests 82  # pass 82  # fail 0
$ cd ../red/core && DSH_HARNESS=/opt/flybot node --import ./test/harness-resolve.mjs --test test/schedules.test.js test/schedules-client.test.js   (this tip's two test files, the three changed sources swapped back to their 35f5f8e2 blobs)
# tests 82  # pass 78  # fail 4

Review points, against the compare 35f5f8e2...6eade6c5 (12 files, +234/−33, one commit, single parent 35f5f8e2, exactly the claimed scope; no gateFiles touched):

  • Narrowed is a different answer from empty, not a reworded empty. core/src/host/schedules.js:413 adds a local someHidden, set only where a known row was actually dropped for the caller (:419 catalog loop, :426 paused loop); !known(owner) still drops silently and sets nothing. :436 returns it only when true, the way quietUnchecked already works. The page reads it at core/src/client/schedules.js:363 and :474: someHidden picks "No scheduled tasks you can see. …" while a view with nothing dropped keeps "No scheduled tasks yet." — two states, one boolean, no new route and no changed ordering.
  • All three boundaries are asserted, not assumed. Nothing hidden ("with nothing dropped the page keeps …" in schedules-client.test.js) and a no-actor install ("with nobody signed in nothing is narrowed" in schedules.test.js) leave someHidden undefined and the old sentence; in the partial view owner-1 reads their row with someHidden undefined while owner-2 reads tasks: [] with someHidden: true, and a paused row of another owner counts as hidden too. So a host that really has no tasks is never told its list is narrowed.
  • Both languages, both surfaces. core/src/client/i18n.js:1315 adds the two keys with their Chinese values; the repo has one locale table (EN→ZH), so no key is half-added and nothing falls back to English. core/client.js carries both strings, so the bundle was rebuilt rather than hand-edited.
  • Nothing about the hidden rows leaks. The wire field is one boolean — no count, no title, no session id; the sentences say another member's tasks "stay hidden" without naming a member or a row.
  • Generated artifacts are real. build-client --check exits 0 against the committed core/client.js; ds-bot-patches check reports 10 patches clean and core/ equals ds-bot/ + patches/ds-bot/, and patches/ds-bot/files/test/schedules-client.test.js is byte-identical to core/test/schedules-client.test.js (sha256 f53ac531…), so 0001/0008 and the mirror move with the source.
  • Red first is behavioral. With the three changed sources taken back to their 35f5f8e2 blobs and this tip's tests kept, 82 tests / 78 pass / 4 fail: the settings page prints "No scheduled tasks yet." where the narrowed sentence was expected (not ok 42), the details row prints "No scheduled tasks yet. Add one" (not ok 44), and the two host cases get undefined instead of true (not ok 80 and 81). The controls pass on that same tree, so the red is the narrowing, not the wording.
  • CI at this tip. All 14 check-runs are terminal and 13 are success (tests-ok, merge-gate, judge, package, the three plugin jobs, ubuntu-latest · Node 24); the only failure is enqueue-guard, the normal block until this report exists.

Metadata: body said Reviewer: Birfy — corrected to Reviewer: Reviewer; agent-pr added. The checkpoint block is 1273 chars, summary 455, 12 files (all in this diff), next 55 — inside its limits.

@Birfy
Birfy added this pull request to the merge queue Nov 2, 2026
@github-actions github-actions Bot added the pass label Nov 2, 2026
Merged via the queue into ThinkFlowLab:main with commit d1724e7 Nov 2, 2026
16 checks passed
@Birfy
Birfy deleted the dev/1-schedules-hidden branch November 2, 2026 10:44
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An empty scheduled-task list says there are none, even when the page is hiding another member's

2 participants