feat(ui): Interactive chip for tasks with an open ConPTY session
A task driven by hand in Mission Control is Idle with an Active worktree, so its lifecycle chip read "Parked" — indistinguishable from a task genuinely set aside. The shell now mirrors Mission Control's open panes onto the rows, which show an accent "Interactive" chip instead; tapping it surfaces Mission Control and focuses that pane (the open command already dedupes by task id).
This commit is contained in:
@@ -215,6 +215,8 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
|
||||
MissionControl.ShowDetached = (monitor, reDock) => Dialogs?.ShowDetachedMonitor(monitor, reDock);
|
||||
MissionControl.OpenSettingsRequested = () => Lists.OpenSettingsCommand.Execute(null);
|
||||
MissionControl.ErrorReported += FlashFooterError;
|
||||
// Keep the task rows' "Interactive" chip in step with Mission Control's open ConPTY panes.
|
||||
MissionControl.ConPtySessions.CollectionChanged += (_, _) => SyncInteractiveSessionChips();
|
||||
_updateCheck = updateCheck;
|
||||
_installerLocator = installerLocator;
|
||||
_workerLocator = workerLocator;
|
||||
@@ -330,6 +332,16 @@ public sealed partial class IslandsShellViewModel : ViewModelBase, IDisposable
|
||||
Dialogs.ShowMissionControl(MissionControl);
|
||||
}
|
||||
|
||||
private void SyncInteractiveSessionChips()
|
||||
{
|
||||
if (MissionControl is null) return;
|
||||
Tasks.SyncInteractiveSessions(
|
||||
MissionControl.ConPtySessions
|
||||
.Select(s => s.TaskId)
|
||||
.Where(id => !string.IsNullOrEmpty(id))
|
||||
.Select(id => id!));
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task OpenAbout()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user