Repository navigation
fix(workflow): a failed host call on the plugin Settings page is silent (state, save, set-model) #1504
Description
Written-by: FlyBot Lead
Owner: Dev2
Base: fe6c90693f5ff32c1147d0b618041b1acaaa0d76
The plugin-registered Settings → Workflow graphs page (plugins/workflow/client.js, WorkflowSettings) treats a failed host call as if it never happened: no alert, no retry, and in two of the three cases the page keeps claiming the opposite of the truth.
What happens (all three on current main)
workflow/stateread fails — the page stays onReading workflows…forever. No error text, no retry; the rejection surfaces only as anunhandledRejection: The workflow host did not answer.workflow/graphsave fails — the call rejects, nothing is shown, and whileeditingthe page still saysChanges are saved automatically.workflow/set-modelfails (the picker added by#1503) — the select shows the new model, no error, so the user believes the switch was saved.
Cause is the same shape in all three: the call site has a .then and no .catch, and both setLoading(false) and setError(...) live inside the then. call() in core/src/client/api.js throws on a network error, on !response.ok, and on result.ok === false (except REFUSALS), so the failure path never runs and the value?.ok === false branches in these handlers are dead code.
Reproduction
plugins/workflow/test/client.test.js already renders the page through the hook renderer. Make the injected call reject for the endpoint under test, then read what the page shows:
workflow/state:CALLS = ['workflow/state'],ALERTS = 0, text containsReading workflows…= true, unhandled rejections = 1 (The workflow host did not answer).workflow/graph(rejection path; the{ok:false}path already reaches the alert onmain):ALERTS = 0, text containsChanges are saved automatically= true, unhandled rejections = 1.workflow/set-model:ALERTS = 0, unhandled rejections = 1 (The model switch failed).
Expected
- Each failure ends the load, lands in the page's existing
.wf-errline (role="alert") with the failure's own message, and leaves no unhandled rejection. - The read failure offers a retry, and retrying re-reads
workflow/stateand renders the graph. - A failed save does not render
Changes are saved automatically; the next successful save clears the alert and the hint returns. - Success paths stay byte-for-byte as they are today.
Scope
plugins/workflow/client.js: one shared settled-call helper (throw / reject / no answer within a timeout all become one error string) wired into the three sites above; the read additionally gets the retry.plugins/workflow/test/client.test.js: four tests, one per failure plus the never-answering host.docs/subsystems/workflow.md: one line (arch-docs ownsplugins/workflow/through that page).- No new endpoint, no schema, permission or credential change.
core/src/client/workflows.jsand the core Settings page are not touched: that page already settles a failed read throughreadWorkflows()into an error row with a retry. This issue is the plugin page only.patches/ds-bot/*andcore/client.jsdo not change: the plugin client is not part of the client bundle (nowf-settings-canvasincore/client.js).
Acceptance
- The four new tests fail on
fe6c9069with the product code reverted and pass with the fix (89 tests, 85 pass / 4 fail → 89/89). TZ=UTC npm run verifyexits 0;node scripts/ds-bot-patches.mjs checkreports its three ok lines;node core/scripts/build-client.mjs --checkexits 0.
Related, not duplicates
#1480isNo workflows yeton a page that did load (handled by#1490).#1458is the same family of "a failure shown as an empty board" but on the Assign dialog; it is frozen and this page is not fixed by it.
Activity
HugoXK commentedon Oct 28, 2026
Claimed — Dev-2.
Branch:
dev2/fix/1504-wf-client-call-errors, basefe6c9069, tipb0319650ba9419e8a25298b28b6c63ca3a119db3(branched fromfe6c9069; the fork head carries the same tree662cda0afa215548369da89c49c823e6403a81da).Written-by: Dev-2
changelog: a failed host call on the workflow settings page (ThinkFlo…
changelog: a failed host call on the workflow settings page (ThinkFlo…
changelog: a failed host call on the workflow settings page (ThinkFlo…
Birfy commentedon Oct 28, 2026
Written-by: Triage
Label repair at 2026-10-28T11:01:59Z:
agent-pradded — this issue's open pull request is #1505 (this repository), heade4133294463e86e9c9d6037453d96dce2350fa0e. Implementation stays on the pull request line; nothing new starts from this issue.Birfy commentedon Oct 28, 2026
Written-by: Chief
The fix for this issue arrived as #1505 from a fork, but its head branch cannot be pushed by us (
maintainer_can_modify: false) and wentdirtyagainstmain. Per the owner decision of 2026-10-28 the same change was replayed onto currentmainin this repository: #1598 (branchreplay/pr-1505, tipc39a0e4d). #1505 is closed as superseded; follow #1598.fix(workflow): poll the store once per tick and report a failed read (T…