pick-up sets the ticket to in_progress on accept (T-339)
When a ticket is handed to a live Claude pane (T-327), advance it to in_progress on the receiving side of the bus — gated on acceptance, so a pick-up with no live session stays a quiet no-op and never mutates state. Only a not-yet-started ticket (backlog/ready) transitions, so re-picking up a review/done ticket doesn't drag it backwards. On success it publishes (builtin.tickets, changed) so the sidebar refreshes. The handler logic moves into a testable applyTicketPickUp() seam; the sidebar button now carries the current status in the pick-up payload. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -328,7 +328,9 @@ class _PickUpAction extends StatelessWidget {
|
||||
unawaited(() async {
|
||||
final resp = await kernel.ipc.request('pql.tickets.show', args: {'id': id, 'withContext': true});
|
||||
if (!resp.ok) return; // a missing ticket / failed fetch is a quiet no-op
|
||||
kernel.messages.publish('builtin.tickets', 'pick-up', {'id': id, 'prompt': pickUpPrompt(resp.data)});
|
||||
// Carry the current status so the receiver can gate the in_progress
|
||||
// transition without a second fetch (T-339).
|
||||
kernel.messages.publish('builtin.tickets', 'pick-up', {'id': id, 'prompt': pickUpPrompt(resp.data), 'status': resp.data['status']});
|
||||
}());
|
||||
},
|
||||
builder: (ctx, hovered, _) => Padding(
|
||||
|
||||
Reference in New Issue
Block a user