feat(ui): remove a queued interactive message with a ✕

Queued rows are now QueuedMessageViewModel (Text + RemoveCommand); each shows a
✕ (Icon.WinClose) that calls RemoveQueuedInteractiveMessageAsync(taskId, text).
The worker re-broadcasts the queue, rebuilding the strip without the removed
message. Adds session.composer.unqueue (en/de).
This commit is contained in:
Mika Kuns
2026-06-26 11:19:47 +02:00
parent fd1e38fb7f
commit afe7218b7c
6 changed files with 80 additions and 18 deletions

View File

@@ -333,6 +333,8 @@ public class TaskMonitorViewModelTests : IDisposable
worker.RaiseInteractiveQueueChanged("t1", new[] { "msg1", "msg2" });
Assert.Equal(2, vm.QueuedMessages.Count);
Assert.Equal("msg1", vm.QueuedMessages[0].Text);
Assert.Equal("msg2", vm.QueuedMessages[1].Text);
Assert.True(vm.HasQueuedMessages);
}
@@ -378,6 +380,22 @@ public class TaskMonitorViewModelTests : IDisposable
Assert.False(vm.HasQueuedMessages);
}
[Fact]
public async Task QueuedMessageViewModel_RemoveCommand_RecordsRemoveCall()
{
var worker = new FakeWorker();
using var vm = Build(worker);
vm.SetTaskId("t1");
worker.RaiseInteractiveQueueChanged("t1", new[] { "a", "b" });
vm.QueuedMessages[0].RemoveCommand.Execute(null);
// RemoveQueuedAsync is fire-and-forget; yield to let the async continuation run
await System.Threading.Tasks.Task.Yield();
Assert.Single(worker.RemovedQueued);
Assert.Equal(("t1", "a"), worker.RemovedQueued[0]);
}
[Fact]
public async Task InterruptInteractiveCommand_WhenLive_RecordsOneCall()
{