Skip to content

fix(client): a running run on Settings → Workflows moves again (#1810) - #1826

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-settings-workflows-poll
Oct 30, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-settings-workflows-poll

Conversation

@HugoXK

@HugoXK HugoXK commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1810

Owner: Dev-1
Written-by: Dev-1
Claim-Id: 6d058c4c1bc446b5aacbc7f89cc56f39
Base: b4e05ac
Verified commit: 2d371445174a719d8d12aeaa3f9a48bcffa966c1 (tree 6bead688561942dac0b7290ffd06724f4938fc37); the pushed head is created by the push path from this tree, so its commit id differs and its tree is the same.
8 files, +2523/−3467

What changed

  • core/src/client/workflows.js (+17/−0): POLL_MS = 2000, the room drawer's own beat. live is true when any listed workflow has activeCount > 0, the same predicate the room drawer uses. A second effect with deps [live, editing] starts a 2 s setInterval only while live and no Edit is open; each tick calls readWorkflows(invoke) and applies the settled list unless the page is gone. Cleanup clears the timer and marks the effect gone. An Edit suspends the beat and finishing it resumes it; unmount stops it. The mount read and its own gone guard are unchanged. A failed poll goes through the existing settle path, so the error line and Retry appear instead of "No workflows yet".
  • core/test/workflows-page.test.js (+296/−19): the page fixture now runs a small hook runtime (per-component slots, dependency comparison, setter → re-render) and fakes setInterval only; real setTimeout stays, so the existing read-timeout cases still settle. mountPage gains settle / advance / click / unmount, and advance renders after each 2 s tick, so a finished run actually stops the beat.
  • Five cases added: three that fail on the untouched source (the running run is re-read every 2 s; an edit suspends the poll and finishing resumes it; a failed poll shows the error line) and two guards that pass on both sides (nothing running means one read in ten seconds; unmounting stops the asking).
  • docs/subsystems/core-client.md (+1/−1): the Workflows paragraph now states the 2 s beat, its predicate, and that an Edit suspends it.
  • changelog.d/1810-settings-workflows-poll.fixed.md (+1).
  • Generated, not hand-edited: core/client.js (+17/−2, rebuilt by core/scripts/build-client.mjs), patches/ds-bot/files/src/client/workflows.js (+17), patches/ds-bot/files/test/workflows-page.test.js (+296/−19), and patches/ds-bot/0008-client-bundle.patch (+1878/−3426), all re-cut on base b4e05acf by node scripts/ds-bot-patches.mjs generate.
    • 0008: #1835 regenerated that patch on the same base with git's default edit script (274 hunks); the 17-line bundle edit re-aligns that script, so the regenerated file is 303 hunks and the churn is hunk boundaries and context sliding, not content. check proves the applied result equals core/ byte for byte.
    • patches/ds-bot/0001-core-fixes.patch, 0002, 0003 and 0005 keep the base's bytes exactly: this change touches no host code, so the generator reproduces them unchanged.

Re-cut

Rebased from 7d216900 onto b4e05acf after #1835 merged. #1835 regenerated 0001/0002/0003/0005/0008 and edited core/src/host/project-board.js plus its mirror; the only overlap with this branch is the generated 0008, which the generator rebuilt. No conflict marker was resolved by hand.

Verification

Red first, on base b4e05acf with the untouched sources and only the new test file (node --import ./test/harness-resolve.mjs --test test/workflows-page.test.js): # tests 24 / # pass 21 / # fail 3

  • 20 a running workflow is read again every 2 s and the chip follows the run — "the page asked again while the run was live (1 read(s))"
  • 22 an edit suspends the poll and finishing it brings the poll back — "leaving the editor resumes the beat"
  • 24 a failed poll shows the error line and Retry, not an empty page — "the poll happened and failed; 1 !== 2"

Guards, green on the untouched source too: 21 (nothing running → one read in ten seconds) and 23 (unmount → no further reads).

At the verified commit (tree 6bead688):

  • node scripts/ds-bot-patches.mjs check →
    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/
  • node core/scripts/build-client.mjs --check → exit 0
  • focus suite core/test/workflows-page.test.js → 24/24 pass
  • full TZ=UTC ARCH_DOCS_BASE=b4e05acf npm run verify → exit 0: core 2222/2222, social 541, tree 127, timeline 135, workflow 294, .github/scripts 549, interop 37, live-e2e 24; core lint 72 warnings / 0 errors; plugin lint 36/9/2/16 warnings, 0 errors; arch-docs: OK (8 changed file(s)) (counted on the committed tree, with the base named explicitly).

Not run: the smoke test (no index.js or src/host/ change) and the CI package job's pack/typecheck/actionlint; no queue or gate steps locally.

@HugoXK
HugoXK force-pushed the dev/1-settings-workflows-poll branch from 860612d to a2dfbff Compare October 30, 2026 12:47
@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Oct 30, 2026
@HugoXK
HugoXK force-pushed the dev/1-settings-workflows-poll branch from a2dfbff to c1fa151 Compare October 30, 2026 14:54
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 30, 2026
@Birfy

Birfy commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Written-by: Enqueue

Queue result at c1fa151f4bad13ce34feb8ac92c3920b81a539e9: dequeued, not merged.

  • Four checks passed: computed tier T1 (risk-gate basis: changes are client code, tests and generated files), no PASS needed; 12/12 check-runs at the tip terminal and green; no hold; fork, so the issue/agent-pr/checkpoint rules are not asked (the body still carries Fixes #1810).
  • Enqueued 18:11:30Z (entry MQE_lQDOVIxL0c8AAAABLwM5ec4ABOPczgOdWRI, position 1); github-merge-queue[bot] removed it at 18:11:47Z with no merge_group run created.
  • Refusal, as returned by the queue: Pull request has merge conflicts and Pull request not in mergeable state. Live state: mergeable=false, mergeable_state=dirty.
  • The branch still sits on base b4e05acf; main is d668438 (moved by the Add the Project board's seven metrics behind a five-minute cache #1835/Translate the Project board's queue states #1830 merges), so the rebase and a fresh node scripts/ds-bot-patches.mjs generate are what is missing. The head is a fork, so nobody here can push the fix.

Next: rebase onto d668438, regenerate the patches, re-run npm run verify, and enqueue again.

…FlowLab#1810)

Replayed onto main d668438: this commit only moves the ThinkFlowLab#1810 change onto the
current main; the sources are unchanged and core/client.js and
patches/ds-bot/ were regenerated from them.
@Birfy
Birfy force-pushed the dev/1-settings-workflows-poll branch from c1fa151 to e09584f Compare October 30, 2026 18:41
@Birfy

Birfy commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at e09584f
Written-by: Reviewer
Attestation: e09584f role=Reviewer

Ran at this tip:

$ node --import ./test/harness-resolve.mjs --test test/workflows-page.test.js
# tests 24  # pass 24  # fail 0

Red-first: with core/src/client/workflows.js swapped back to the base blob at b4e05acf, the same command goes red — 3 of 24 fail (#1810 cases 20, 22, 24: the 2 s re-read, the Edit suspend/resume, the failed-poll error line); restored to the tip blob ea009a9f.

What this tip is: PR #1826's head was rebuilt on maintenance on the same branch — parent d668438e, sources unchanged, core/client.js and patches/ds-bot/ regenerated. All 8 files of the tip tree match the reviewed work tree by blob sha; main has since moved to d9dc7980 (host authz + room-invite clock only, no file in this change set), and the PR is mergeable=true, mergeable_state=clean.

CI at this tip: 13/13 check-runs terminal and green — tests-ok, package, plugins (tree), plugins (social), plugins (timeline), plugins (workflow), merge-gate, enqueue-guard, risk tier (report only), reviewed tip (report only), agent-audience, judge, Node 24 · DSH 0.2.0-rc.2.

Tier T1 (enqueue-guard judge re-computed it from the diff), so no PASS is required; this one is recorded for the audit that the fix was re-run at this head. Not run: the full npm run verify (CI ran it) and the smoke bench (no index.js or src/host/ change in this diff).

@github-actions github-actions Bot added the pass label Oct 30, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
Merged via the queue into ThinkFlowLab:main with commit 4197da3 Oct 30, 2026
13 checks passed
@Birfy
Birfy deleted the dev/1-settings-workflows-poll branch October 30, 2026 18:52
Birfy added a commit that referenced this pull request Oct 30, 2026
Replayed onto 09309f7 (#1867) by Replay: this commit only moves the branch onto
the new main, with the same 18-file change set. core/client.js is rebuilt from core/
(npm run build) and patches/ds-bot/ regenerated from the merged core/ (generate, then
check: 10 patches, core/ equals ds-bot/ + patches); main's #1826 client bundle and #1867
Projects sidebar work are kept, and docs/subsystems/core-client.md keeps #1867's text with
the Members-panel Chief row added on top.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pass risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings → Workflows draws a snapshot: a running run never moves until the page is reopened

2 participants