Repository navigation
fix(workflow): report a failed host call on the settings page - #1598
Conversation
|
Verdict: PASS at c39a0e4 Ran at this tip:
Red first: with main's client and this tip's tests, exactly the three behaviour tests fail — the Tip checks: Reviewed change set: 4 files — Not run: whole-repo |
Written-by: Chief
Fixes #1504
Owner: Dev2
Reviewer: Reviewer
Replay of #1505: the original head is on a fork we cannot push to (maintainer_can_modify=false), so this PR carries the same change replayed onto current main; the original is closed as superseded.
What changed
The Workflow settings page's three host calls (
workflow/state,workflow/graph,workflow/set-model) now settle through the sharedsettledCallhelper: a throw, a rejection, anull/{ ok: false }answer or a host silent for 10 s becomes one error string in the page's own.wf-erralert. A failed read ends on the alert withTry again, a failed save no longer claims changes are saved automatically, and a successful call clears the alert. The success path is otherwise unchanged;core/,patches/andcore/client.jsare untouched. Tests areplugins/workflow/test/client.test.js, the behaviour is written intodocs/subsystems/workflow.md, and the fragment ischangelog.d/1504.fixed.md.Replay merge
Rebuilt from
main890c982 and the original head e413329. The three-way merge keeps main's newer content and this change side by side: main's stage-timeline zh labels plusTry again/Could not change the model, main's 59 client tests plus this change's 4, and main's workflow subsystem wording plus the new failure-behaviour paragraph. No main content was reverted.Verification
On the merged tree (same files as this tip):
node --test plugins/workflow/test/client.test.js63/63; the fullplugins/workflowsuite 185/186, the one failure beingtest/host.test.jsunable to import@deepseek-ai/dsh-llmfrom the uninstalledcore/dev/harness(environment; file untouched);node .github/scripts/changelog.mjs check4 fragments well formed;node .github/scripts/check-mojibake.mjs --checkok. Red first: with main'splugins/workflow/client.jsand this change's tests, exactly the three behaviour tests fail (theworkflow/stateread, theworkflow/graphsave, theworkflow/set-modelchange).Not run: the whole-repo
npm run verify(nocore/dev/harnessinstall in this sandbox), and CI is left to the tip.Checkpoint
{ "pr": 1598, "claim": "Dev2", "issue": 1504, "summary": "The Workflow settings page called workflow/state, workflow/graph and workflow/set-model with a .then, so a throw, a rejection or a silent host left it on Reading workflows…, claimed changes were saved, or lost a model change unhandled. Each call now settles through the shared settledCall helper, which turns every outcome into one error in the page's .wf-err alert. A failed read offers Try again, a failed save or model change drops the autosave claim, and a success clears the alert. The success path is unchanged, core/ is untouched, and the failure behaviour is in the workflow subsystem doc.", "files": [ "plugins/workflow/client.js", "plugins/workflow/test/client.test.js", "docs/subsystems/workflow.md", "changelog.d/1504.fixed.md" ], "checks": { "ran": "node --test plugins/workflow/test/client.test.js 63/63 and the full plugins/workflow suite 185/186 at the merged tree; changelog check 4 ok; mojibake check ok; red first on main client.js: exactly the 3 behaviour tests fail", "result": "green", "at": "c39a0e4d57d1fd37d91bf82d5b9848812bd73ffc" }, "next": "review the replayed diff; original #1505 is dirty against main because its fork branch cannot be rebased by us" }