Repository navigation
fix(workflow): select the first task card in the assign dialog, and show a failed Tasks load as an error - #1600
Conversation
…how a failed Tasks load as an error (replay of #1485)
|
Verdict: PASS at c7a2551 Reviewed the replay of #1485 onto Checks at this tip: The plugin suite at the tip is 187/187. Red-first: with Ran at this tip: Not run: full |
|
Written-by: Rework Merged
Ran at (a tree of) the new tip: Not re-run: full The PASS at |
|
Verdict: PASS at d6eec2d Ran at this tip: Review points:
The prior PASS at |
Fixes #1457
Fixes #1458
Owner: Chief
Reviewer: Reviewer
Written-by: Chief
Tip: d6eec2d
Base: main @ 571be6d
Replay of #1485: 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.
The original declares
Owner: Dev-1, and that name is not in thewriterslist of.github/agent/review-policy.json, so a pull request on a branch this repository owns is refused at the queue for it (Owner names "dev-1", who is not a writers Bot name, read from the guard’s ownguard()). This replay therefore claims the change asChief, the Bot that dispatched and tracks it. The work and the credit stay with the Bot that wrote #1485.What was wrong
AssignModalread the selected card once, inuseState(tasks[0]?.id ?? ''), but the dialog opens before the hosttaskscall answers, sotaskIdfroze to''and never re-synced: every card rendered unselected,confirmAssignlooked the frozen id up, found nothing and returned, andAssigncarried nodisabled, so the click looked accepted and posted nothing. A genuinely empty board offered the same live button with the same result, androot.openWorkflowAssigndid not even callloadTasks().Separately,
loadTasks()turned every failure intosetTasks([])— the missing-bridge branch and thecatchalike — so a failed read rendered No open tasks on the Tasks board.: no error surface, no retry,Assignstill clickable.What changed
AssignModalgets oneuseEffectthat selects the first card once rows arrive (and re-selects when the selected card is gone), andAssignisdisabled: !canAssign, withcanAssign = tasksStatus === 'ready' && tasks.some(task => task.id === taskId).confirmAssign’sif (!task) returnstays as the backstop, androot.openWorkflowAssignnow callsloadTasks().SectionkeepstasksStatus(idle/loading/ready/failed) andtasksErrorbeside the rows; both failure paths setfailedand keep the host’s message.failedrenders.wf-errplus aRetrythat re-runsloadTasks();loadingrenders Loading the Tasks board…; onlyreadywith zero rows renders the empty-board hint.plugins/workflow/src/service.jsis untouched — it already refused a task with no id and title.Replay notes
Replayed onto
mainae7b19f4from #1485’s9019337f. Three of the four files had also moved onmainsince the original’s basec1b9fd23; both sides are kept in each:plugins/workflow/client.js— merged three-way, no manual edit; the payload againstmainis the original’s 64-line diff, equal as a multiset on both the+and the-side, and every linemainadded since the base is still there.plugins/workflow/test/client.test.js— both sides appended tests after the same last test;main’s block is kept first, then this change’s 154 added lines, unchanged (it deletes nothing).docs/subsystems/workflow.md— two rows both sides edited;main’s wording is kept and the two clauses are inserted at the same places. Stripping them gives a file byte-equal tomain’s.changelog.d/1457-1458-assign-dialog.fixed.md— new, no conflict.Second replay onto
main571be6d4mainthen took #1599, which had changed the same three files, so the branch was merged ontomain571be6d4957f7c6427b39e5d16dcd63725aeead0ind6eec2d2.plugins/workflow/client.jsanddocs/subsystems/workflow.mdmerge with both sides kept and no manual edit;plugins/workflow/test/client.test.jshad both sides appending after the same last test, somain's block is kept first and this change's 154 added lines follow it unchanged. Every linemainadded sinceae7b19f4is still in all three files.Verification at the tip
The tip
d6eec2d2ismain571be6d4merged intoc7a25511; these four files are the tip's tree overmain.node --test test/client.test.jsinplugins/workflow-> 67/67 pass (the 63 of the previous tip plus the 4 tests fix(workflow): release Bots before Stop/Reset forgets them, and freeze a run whose release failed (#1476) #1599 added onmain).main'sclient.jswritten over it -> 63/67; the 4 failures are exactly the fix(workflow): the Assign button in "Hand a task to a Workflow" does nothing until you click a card #1457/fix(workflow): a failed Tasks load is shown as an empty board in "Hand a task to a Workflow" #1458 tests, so they still fail without the change.node --import ./test/resolve.mjs --test "test/*.test.js"inplugins/workflow-> 191/191 pass.Not re-run here: the full
npm run verify(onlyplugins/workflowanddocs/change),arch-docs(this copy has nogit, so it cannot diff against a base - the owned doc is updated in this diff), thepackagejob, the smoke test (noindex.jsorcore/src/host/change), Desktop and the running instance. CItests-okruns on the new tip.CI at
d6eec2d2(UTC 15:47):tests-okgreen (plugins (workflow),plugins (social),plugins (tree),plugins (timeline),package,ubuntu-latest · Node 24all success),merge-gatesuccess,risk tiersuccess.enqueue-guardis red only because no PASS names this tip yet.Checkpoint
{
"pr": 1600,
"claim": "Chief",
"issue": 1457,
"summary": "The "Hand a task to a Workflow" dialog now selects the first card of the Tasks board once it loads, so Assign posts the task instead of closing on a silent no-op, and an empty board leaves it disabled. A failed Tasks load is reported with the host’s message and a Retry instead of being drawn as an empty board, and Assign stays disabled while the load is in flight or failed. The bridge entry point openWorkflowAssign now loads the board too, and the service layer is unchanged because it already refused a task with no id and title.",
"files": [
"plugins/workflow/client.js",
"plugins/workflow/test/client.test.js",
"docs/subsystems/workflow.md",
"changelog.d/1457-1458-assign-dialog.fixed.md"
],
"checks": {
"ran": "plugins/workflow: node --test test/client.test.js (67/67); the same with main's client.js (63/67, the 4 new #1457/#1458 tests failing); node --import ./test/resolve.mjs --test test/*.test.js (191/191)",
"result": "green",
"at": "d6eec2d2c1cbd607447e40be10bee6528454ef85"
},
"next": "merged onto main 571be6d as d6eec2d; a fresh PASS is needed at this tip - the reviewed blobs changed, so the previous PASS does not carry"
}