You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workflows save action: cleanups from #411 review #413
Follow-up cleanups from the Codex round-4 review of #411 (head 620a311). These were dropped on #411 so the reviewed head could merge. None is a P1. The server enforces saved-workflow permissions through dbauthz, so finding 1 is a UI staleness issue, not an authorization gap.
useForkWorkflowSave.tsx: hold the Organization submission while a cached permission check refetches, and reset the tier when the Organization choice disappears during a refetch.
ForkWorkflowSaveDialog.tsx: correct the form-adapter comment. argsSchema and phases are hard-coded empty, not taken from run data.
useForkWorkflowSave.tsx: remove the unused saveTarget and saved.organizationId from the hook state.
useForkWorkflowSave.tsx: derive SaveTier from SavedWorkflowScope["tier"] instead of redeclaring it.
Acceptance: a unit test that fails without the refetch hold, the targeted vitest run passes, and fork-ci and Codex pass on the head.
Two more items from the #411 Codex review of 7e20b19, dropped there to converge the review loop:
Keep the saved state of the run-card Save action when the tool card collapses. Today a collapse unmounts ForkWorkflowSaveAction, so Save shows again, and a re-submit gets a name conflict from the server (no duplicate is created).
Prefill the save dialog name when the run has no title. Runs have no title yet (codersdk/fork_workflow_runs.go), so production prefill is empty. Options: a backend run title, or a default derived from the script.
ForkSavedWorkflowsPage.test.tsx: the test "does not push a duplicate entry when the shown organization is reselected" (site: Save workflow action on the run card #411 head 646334b) passes even without the org.id !== organization.id guard. It reads window.history.length, which the test router does not change. Make it behavioral (go Back and assert the previous org shows), and prove that it fails without the guard, or record that the guard is purely defensive.
ForkWorkflowTool.tsx (EndedForkWorkflowTool): when the one-shot detail request for an already-completed card fails after its retries, Save disappears until a remount. Show the failed load with a retry action. From the site: Save workflow action on the run card #411 Codex review of 646334b.
PR #417 is open for this issue (head 14126d1, based on main 0287e36). It adds the refetch hold, fixes the comments and the unused state, and derives SaveTier. The regression test fails with the old hold expression (negative control). Waiting for fork-ci and Codex.
Activity
ibetitsmike commentedon Nov 21, 2026
Two more items from the #411 Codex review of 7e20b19, dropped there to converge the review loop:
ForkWorkflowSaveAction, so Save shows again, and a re-submit gets a name conflict from the server (no duplicate is created).codersdk/fork_workflow_runs.go), so production prefill is empty. Options: a backend run title, or a default derived from the script.ibetitsmike commentedon Nov 21, 2026
ForkSavedWorkflowsPage.test.tsx: the test "does not push a duplicate entry when the shown organization is reselected" (site: Save workflow action on the run card #411 head 646334b) passes even without theorg.id !== organization.idguard. It readswindow.history.length, which the test router does not change. Make it behavioral (go Back and assert the previous org shows), and prove that it fails without the guard, or record that the guard is purely defensive.ibetitsmike commentedon Nov 21, 2026
ForkWorkflowTool.tsx(EndedForkWorkflowTool): when the one-shot detail request for an already-completed card fails after its retries, Save disappears until a remount. Show the failed load with a retry action. From the site: Save workflow action on the run card #411 Codex review of 646334b.fix(site): hold the save action while a cached permission check refet…
ibetitsmike commentedon Nov 21, 2026
PR #417 is open for this issue (head 14126d1, based on main 0287e36). It adds the refetch hold, fixes the comments and the unused state, and derives SaveTier. The regression test fails with the old hold expression (negative control). Waiting for fork-ci and Codex.