Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Move the relaunch button below the Play button so its comment stays with it

[._.]/ Adam Eivy55ee0f4bcd25
diff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsx
index 5d377e4daa..6f1ac97133 100644
--- a/client/src/components/cos/tabs/TaskItem.jsx
+++ b/client/src/components/cos/tabs/TaskItem.jsx
@@ -751,19 +751,6 @@ export default function TaskItem({ task, agent = null, isSystem, spawning = fals
row's only recovery affordance away with it. forceSpawnTask
refuses a task a live agent already holds, so a click during a
real spawn gets an honest error rather than a duplicate run. */}
- {/* Only when a live agent holds this task — relaunching pauses that
- agent (see relaunchAgent in agentManagement.js). */}
- {agent && (
- <button
- type="button"
- onClick={() => setRelaunching(true)}
- className="p-1 text-gray-500 hover:text-port-accent transition-colors"
- title="Relaunch on a different provider or model"
- aria-label={`Relaunch task ${task.id} on a different provider or model`}
- >
- <RefreshCw size={14} aria-hidden="true" />
- </button>
- )}
{task.status === 'pending' && !task.approvalRequired && (
<button
onClick={async () => {
@@ -778,6 +765,19 @@ export default function TaskItem({ task, agent = null, isSystem, spawning = fals
<Play size={14} aria-hidden="true" />
</button>
)}
+ {/* Only when a live agent holds this task — relaunching pauses that
+ agent (see relaunchAgent in agentManagement.js). */}
+ {agent && (
+ <button
+ type="button"
+ onClick={() => setRelaunching(true)}
+ className="p-1 text-gray-500 hover:text-port-accent transition-colors"
+ title="Relaunch on a different provider or model"
+ aria-label={`Relaunch task ${task.id} on a different provider or model`}
+ >
+ <RefreshCw size={14} aria-hidden="true" />
+ </button>
+ )}
{/* Labeled, not icon-only: this is the primary next action for a
blocked task, and the icon-only affordance (clicking the status
glyph) wasn't discoverable — the user had to go find the banner
diff --git a/client/src/components/cos/tabs/TasksTab.jsx b/client/src/components/cos/tabs/TasksTab.jsx
index 2e7f8e4171..fece5c8441 100644
--- a/client/src/components/cos/tabs/TasksTab.jsx
+++ b/client/src/components/cos/tabs/TasksTab.jsx
@@ -71,7 +71,7 @@ export default function TasksTab({ tasks, agents = [], onRefresh, onTaskAdded, o
task.id === selectedTaskId && source === selectedTaskSource
);
- // Task ids a live agent is already working. spawnAgentForTask registers its
+ // The live agent working each task, keyed by task id. spawnAgentForTask registers its
// agent as running BEFORE flipping the task off 'pending', so between those
// two writes a task reads 'pending' on the task list and 'running' on the
// agent list — and the row showed up under Pending AND as an active agent.
@@ -79,9 +79,8 @@ export default function TasksTab({ tasks, agents = [], onRefresh, onTaskAdded, o
// store's task events so the flip lands in ~400ms instead of a 30s poll. This
// settles the render from whichever of the two signals arrived first, so the
// split is right even when an event is delayed or dropped.
- // Keyed by task rather than reduced to a Set of ids: an Active row also uses the
- // agent itself, to offer a relaunch onto a different provider/model without
- // fetching the agent list of its own.
+ // The map (rather than a Set of ids) is what lets an Active row offer a relaunch
+ // onto a different provider/model without fetching the agent list of its own.
const runningAgentByTaskId = useMemo(() => new Map(
agents.filter(a => a.status === 'running' && a.taskId).map(a => [a.taskId, a])
), [agents]);