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

address review: compute next tickets outside state updater for concurrent safety

Adam Eivy95def5c8980e
diff --git a/client/src/components/KanbanBoard.jsx b/client/src/components/KanbanBoard.jsx
index 014fa2b070..38d7434716 100644
--- a/client/src/components/KanbanBoard.jsx
+++ b/client/src/components/KanbanBoard.jsx
@@ -177,15 +177,12 @@ export default function KanbanBoard({ tickets: initialTickets, instanceId, onTic
}
await api.transitionJiraTicket(instanceId, ticket.key, match.id, { silent: true });
- // Update the status name too, based on latest state
- let updated;
- setTickets(prev => {
- updated = prev.map(t =>
- t.key === ticket.key ? { ...t, status: match.to, statusCategory: targetCategory } : t
- );
- return updated;
- });
- onTicketsChange?.(updated);
+ // Update the status name too, derived from the optimistic snapshot
+ const nextTickets = optimistic.map(t =>
+ t.key === ticket.key ? { ...t, status: match.to, statusCategory: targetCategory } : t
+ );
+ setTickets(nextTickets);
+ onTicketsChange?.(nextTickets);
toast.success(`${ticket.key} moved to ${match.to}`);
} catch (err) {
setTickets(previousTickets);