Skip to content

Commit 6aec5e1

Browse files
cailmdaleyclaude
andcommitted
Remove vestigial continue-run-* kanban actions
continue-run-fresh / continue-run-previous were never produced by resolve_transition (the drag resolver yields accept-run / dispatch-ad-hoc / reopen / close-*), and no client invoked them directly — Portolan's New session / Resume buttons take the /kanban/requeue path, which files a resume_mode review-comment and force-dispatches, with the daemon resolving the prior session from the runtime store (not frontmatter). The dead invoke clauses shelled out to `shuttle-ctl resume`, which re-reads session.id / review.state from frontmatter where they no longer live — the same footgun accept-run was rescued from in 3ab12a6. Removing the actions deletes that unreachable path entirely: dropped from the @type, @action_ids, the awaiting-standing offered list (now [:accept_run, :close_composted]), maybe_continue_previous/1, the invocation map, and the invoke_action clauses. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3ab12a6 commit 6aec5e1

3 files changed

Lines changed: 9 additions & 21 deletions

File tree

lib/shuttle/actions.ex

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ defmodule Shuttle.Actions do
1111
:pause
1212
| :reopen
1313
| :accept_run
14-
| :continue_run_fresh
15-
| :continue_run_previous
1614
| :dispatch_ad_hoc
1715
| :close_awaiting_review
1816
| :close_tempered
1917
| :close_composted
2018

2119
@transition_targets ~w(drafts inFlight queued active awaitingReview tempered composted)
22-
@action_ids ~w(pause reopen accept-run continue-run-fresh continue-run-previous dispatch-ad-hoc close-awaiting-review close-tempered close-composted)
20+
@action_ids ~w(pause reopen accept-run dispatch-ad-hoc close-awaiting-review close-tempered close-composted)
2321

2422
@spec actions_for(map(), boolean()) :: [map()]
2523
def actions_for(fiber, running? \\ false) when is_map(fiber) do
@@ -54,8 +52,7 @@ defmodule Shuttle.Actions do
5452
[:reopen, :close_tempered, :close_composted]
5553

5654
standing?(shuttle) and review_state(shuttle) == "awaiting" ->
57-
[:accept_run, :continue_run_fresh] ++
58-
maybe_continue_previous(shuttle) ++ [:close_composted]
55+
[:accept_run, :close_composted]
5956

6057
standing?(shuttle) and enabled?(shuttle) ->
6158
[:pause, :dispatch_ad_hoc]
@@ -71,13 +68,6 @@ defmodule Shuttle.Actions do
7168
end
7269
end
7370

74-
defp maybe_continue_previous(shuttle) do
75-
case get_in(shuttle, ["session", "id"]) do
76-
id when is_binary(id) and id != "" -> [:continue_run_previous]
77-
_ -> []
78-
end
79-
end
80-
8171
defp action_for_target(fiber, target, _running?) do
8272
shuttle = shuttle(fiber)
8373
status = Map.get(fiber, "status")
@@ -118,8 +108,6 @@ defmodule Shuttle.Actions do
118108
defp invocation(:pause), do: %{verb: "pause"}
119109
defp invocation(:reopen), do: %{verb: "reopen"}
120110
defp invocation(:accept_run), do: %{verb: "accept"}
121-
defp invocation(:continue_run_fresh), do: %{verb: "resume", resume_mode: "fresh"}
122-
defp invocation(:continue_run_previous), do: %{verb: "resume", resume_mode: "previous"}
123111
defp invocation(:dispatch_ad_hoc), do: %{verb: "dispatch", ad_hoc: true}
124112
defp invocation(:close_awaiting_review), do: %{verb: "close"}
125113
defp invocation(:close_tempered), do: %{verb: "close", tempered: true}

lib/shuttle_web/controllers/actions_controller.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ defmodule ShuttleWeb.ActionsController do
168168
end
169169
end
170170

171-
defp invoke_action(fiber_id, "continue-run-fresh", host), do: run(["resume", fiber_id], host)
172-
defp invoke_action(fiber_id, "continue-run-previous", host), do: run(["resume", fiber_id], host)
173171
defp invoke_action(fiber_id, "close-awaiting-review", host), do: run(["close", fiber_id], host)
174172

175173
defp invoke_action(fiber_id, "close-tempered", host),

test/shuttle/actions_test.exs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ defmodule Shuttle.ActionsTest do
7474
refute Enum.any?(actions, &(&1.id == "reopen"))
7575
end
7676

77-
test "actions list exposes continue previous only when a session id exists" do
78-
without_session = standing("awaiting")
79-
with_session = put_in(without_session, ["shuttle", "session"], %{"id" => "session-1"})
77+
test "awaiting standing-role offers accept or compost, not a continue verb" do
78+
fiber = standing("awaiting")
79+
actions = Actions.actions_for(fiber)
8080

81-
refute Enum.any?(Actions.actions_for(without_session), &(&1.id == "continue-run-previous"))
82-
assert Enum.any?(Actions.actions_for(with_session), &(&1.id == "continue-run-previous"))
81+
assert Enum.any?(actions, &(&1.id == "accept-run"))
82+
assert Enum.any?(actions, &(&1.id == "close-composted"))
83+
refute Enum.any?(actions, &(&1.id == "continue-run-fresh"))
84+
refute Enum.any?(actions, &(&1.id == "continue-run-previous"))
8385
end
8486

8587
defp standing(review_state) do

0 commit comments

Comments
 (0)