style(ui): polish islands and remove terminal traffic-light dots
This commit is contained in:
@@ -245,6 +245,34 @@
|
||||
<Setter Property="BoxShadow" Value="0 0 0 3 #387C9166" />
|
||||
</Style>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- FLAT BUTTON — replaces the entire Button template with a -->
|
||||
<!-- bare ContentPresenter so no Fluent chrome (bg / hover / -->
|
||||
<!-- pressed) can render. Used to wrap TaskRowView for clicks. -->
|
||||
<!-- ============================================================ -->
|
||||
<Style Selector="Button.flat">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextBrush}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<ContentPresenter Name="PART_ContentPresenter"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
Padding="0"
|
||||
CornerRadius="0"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- TASK ROW -->
|
||||
<!-- ============================================================ -->
|
||||
@@ -264,12 +292,10 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="Border.task-row:pointerover">
|
||||
<Setter Property="Background" Value="{StaticResource AccentSoftBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource LineBrightBrush}" />
|
||||
</Style>
|
||||
<Style Selector="Border.task-row.selected">
|
||||
<Setter Property="Background" Value="{StaticResource Surface3Brush}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource LineBrightBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</Style>
|
||||
|
||||
@@ -278,7 +304,7 @@
|
||||
<Setter Property="Width" Value="18" />
|
||||
<Setter Property="Height" Value="18" />
|
||||
<Setter Property="StrokeThickness" Value="1.5" />
|
||||
<Setter Property="Stroke" Value="{StaticResource TextFaintBrush}" />
|
||||
<Setter Property="Stroke" Value="{StaticResource TextMuteBrush}" />
|
||||
<Setter Property="Fill" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="Ellipse.task-check.done">
|
||||
@@ -663,9 +689,10 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Selected state: shift background to accent-soft -->
|
||||
<!-- Selected state: rely on the left accent bar from TaskRowView;
|
||||
no heavy bg or perimeter border. -->
|
||||
<Style Selector="Border.task-row.selected">
|
||||
<Setter Property="Background" Value="{StaticResource AccentSoftBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource LineBrightBrush}" />
|
||||
</Style>
|
||||
|
||||
<!-- Left accent bar for selected row -->
|
||||
@@ -678,12 +705,13 @@
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
</Style>
|
||||
|
||||
<!-- Done state: dim the whole row and the title -->
|
||||
<!-- Done state: dim the whole row and strike through the title -->
|
||||
<Style Selector="Border.task-row.done">
|
||||
<Setter Property="Opacity" Value="0.55" />
|
||||
<Setter Property="Opacity" Value="0.45" />
|
||||
</Style>
|
||||
<Style Selector="Border.task-row.done TextBlock.task-title">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaintBrush}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaintBrush}" />
|
||||
<Setter Property="TextDecorations" Value="Strikethrough" />
|
||||
</Style>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using ClaudeDo.Data;
|
||||
using ClaudeDo.Data.Repositories;
|
||||
using ClaudeDo.Ui.Helpers;
|
||||
using ClaudeDo.Ui.Services;
|
||||
using ClaudeDo.Ui.ViewModels.Modals;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -17,7 +19,9 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
private readonly IServiceProvider _services;
|
||||
|
||||
// Current task row (set by IslandsShellViewModel via Bind)
|
||||
[ObservableProperty] private TaskRowViewModel? _task;
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RunNowCommand))]
|
||||
private TaskRowViewModel? _task;
|
||||
|
||||
// Editable fields
|
||||
[ObservableProperty] private string _editableTitle = "";
|
||||
@@ -28,12 +32,22 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
public string TaskIdBadge => Task != null ? $"#T{Task.Id[..Math.Min(3, Task.Id.Length)].ToUpperInvariant()}" : "";
|
||||
|
||||
// Agent strip fields
|
||||
[ObservableProperty] private string _agentStatusLabel = "Idle";
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RunNowCommand))]
|
||||
private string _agentStatusLabel = "Idle";
|
||||
public bool IsRunning => AgentStatusLabel == "Running";
|
||||
public bool IsDone => AgentStatusLabel == "Done";
|
||||
public bool IsFailed => AgentStatusLabel == "Failed";
|
||||
|
||||
partial void OnAgentStatusLabelChanged(string value) => OnPropertyChanged(nameof(IsRunning));
|
||||
partial void OnAgentStatusLabelChanged(string value)
|
||||
{
|
||||
OnPropertyChanged(nameof(IsRunning));
|
||||
OnPropertyChanged(nameof(IsDone));
|
||||
OnPropertyChanged(nameof(IsFailed));
|
||||
}
|
||||
[ObservableProperty] private string? _model;
|
||||
[ObservableProperty] private string? _worktreePath;
|
||||
[ObservableProperty] private string? _worktreeBaseCommit;
|
||||
[ObservableProperty] private string? _branchLine;
|
||||
[ObservableProperty] private int _turns;
|
||||
[ObservableProperty] private int _tokens;
|
||||
@@ -61,6 +75,10 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
public ObservableCollection<LogLineViewModel> Log { get; } = new();
|
||||
public ObservableCollection<SubtaskRowViewModel> Subtasks { get; } = new();
|
||||
|
||||
// Claude CLI stream-json parser + buffer for partial text deltas
|
||||
private readonly StreamLineFormatter _formatter = new();
|
||||
private readonly StringBuilder _claudeBuf = new();
|
||||
|
||||
// The task ID we are currently subscribed to for live log messages
|
||||
private string? _subscribedTaskId;
|
||||
|
||||
@@ -89,23 +107,92 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
|
||||
// Subscribe once; filter by current task id inside the handler
|
||||
_worker.TaskMessageEvent += OnTaskMessage;
|
||||
|
||||
// Re-evaluate RunNow CanExecute when worker connection flips.
|
||||
_worker.PropertyChanged += (_, e) =>
|
||||
{
|
||||
if (e.PropertyName == nameof(WorkerClient.IsConnected))
|
||||
RunNowCommand.NotifyCanExecuteChanged();
|
||||
};
|
||||
|
||||
// If the task row's live status changes (e.g. TaskStarted/Finished), mirror it.
|
||||
_worker.TaskStartedEvent += (slot, taskId, startedAt) =>
|
||||
{
|
||||
if (Task?.Id == taskId) AgentStatusLabel = "Running";
|
||||
};
|
||||
_worker.TaskFinishedEvent += (slot, taskId, status, finishedAt) =>
|
||||
{
|
||||
if (Task?.Id != taskId) return;
|
||||
FlushClaudeBuffer();
|
||||
Log.Add(new LogLineViewModel
|
||||
{
|
||||
Kind = LogKind.Done,
|
||||
Text = $"── {status.ToUpperInvariant()} · {finishedAt.ToLocalTime():HH:mm:ss} ──",
|
||||
});
|
||||
AgentStatusLabel = status;
|
||||
// Re-query to pick up worktree created during the run.
|
||||
_ = RefreshWorktreeAsync(taskId);
|
||||
};
|
||||
|
||||
_worker.WorktreeUpdatedEvent += taskId =>
|
||||
{
|
||||
if (Task?.Id == taskId) _ = RefreshWorktreeAsync(taskId);
|
||||
};
|
||||
}
|
||||
|
||||
private void OnTaskMessage(string taskId, string line)
|
||||
{
|
||||
if (taskId != _subscribedTaskId) return;
|
||||
// Parse a simple prefix convention: "[sys]", "[tool]", "[claude]", etc.
|
||||
// Fall back to Msg for unrecognised lines.
|
||||
|
||||
// `[stdout] ...json...` lines are Claude CLI stream-json; parse through the
|
||||
// formatter so the user sees human text, not raw JSON.
|
||||
if (line.StartsWith("[stdout]", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var body = line["[stdout]".Length..].TrimStart();
|
||||
var formatted = _formatter.FormatLine(body);
|
||||
if (formatted is null) return; // filter noise (message_start, etc.)
|
||||
AppendClaudeText(formatted);
|
||||
return;
|
||||
}
|
||||
|
||||
// Non-stdout tagged lines: flush any buffered text then classify by prefix.
|
||||
FlushClaudeBuffer();
|
||||
|
||||
var kind = line.StartsWith("[sys]", StringComparison.OrdinalIgnoreCase) ? LogKind.Sys
|
||||
: line.StartsWith("[tool]", StringComparison.OrdinalIgnoreCase) ? LogKind.Tool
|
||||
: line.StartsWith("[claude]", StringComparison.OrdinalIgnoreCase) ? LogKind.Claude
|
||||
: line.StartsWith("[stdout]", StringComparison.OrdinalIgnoreCase) ? LogKind.Stdout
|
||||
: line.StartsWith("[stderr]", StringComparison.OrdinalIgnoreCase) ? LogKind.Stderr
|
||||
: line.StartsWith("[done]", StringComparison.OrdinalIgnoreCase) ? LogKind.Done
|
||||
: LogKind.Msg;
|
||||
Log.Add(new LogLineViewModel { Kind = kind, Text = line });
|
||||
}
|
||||
|
||||
private void AppendClaudeText(string chunk)
|
||||
{
|
||||
_claudeBuf.Append(chunk);
|
||||
// Emit a log entry for every completed line; keep the trailing remainder buffered.
|
||||
while (true)
|
||||
{
|
||||
var text = _claudeBuf.ToString();
|
||||
var nl = text.IndexOf('\n');
|
||||
if (nl < 0) break;
|
||||
var piece = text[..nl].TrimEnd('\r');
|
||||
if (!string.IsNullOrWhiteSpace(piece))
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Claude, Text = piece });
|
||||
_claudeBuf.Clear();
|
||||
_claudeBuf.Append(text[(nl + 1)..]);
|
||||
}
|
||||
}
|
||||
|
||||
private void FlushClaudeBuffer()
|
||||
{
|
||||
if (_claudeBuf.Length == 0) return;
|
||||
var piece = _claudeBuf.ToString().TrimEnd();
|
||||
_claudeBuf.Clear();
|
||||
if (!string.IsNullOrWhiteSpace(piece))
|
||||
Log.Add(new LogLineViewModel { Kind = LogKind.Claude, Text = piece });
|
||||
}
|
||||
|
||||
public void Bind(TaskRowViewModel? row)
|
||||
{
|
||||
_loadCts?.Cancel();
|
||||
@@ -117,6 +204,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
OnPropertyChanged(nameof(TaskIdBadge));
|
||||
Log.Clear();
|
||||
Subtasks.Clear();
|
||||
_claudeBuf.Clear();
|
||||
|
||||
if (row == null)
|
||||
{
|
||||
@@ -137,11 +225,14 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
{
|
||||
try
|
||||
{
|
||||
await using var ctx = _dbFactory.CreateDbContext();
|
||||
var taskRepo = new TaskRepository(ctx);
|
||||
await using var ctx = await _dbFactory.CreateDbContextAsync(ct);
|
||||
var subtaskRepo = new SubtaskRepository(ctx);
|
||||
|
||||
var entity = await taskRepo.GetByIdAsync(row.Id);
|
||||
// Own query with Include so WorktreePath/BranchLine are populated.
|
||||
var entity = await ctx.Tasks
|
||||
.AsNoTracking()
|
||||
.Include(t => t.Worktree)
|
||||
.FirstOrDefaultAsync(t => t.Id == row.Id, ct);
|
||||
ct.ThrowIfCancellationRequested();
|
||||
if (entity == null) return;
|
||||
|
||||
@@ -163,6 +254,27 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
catch (OperationCanceledException) { }
|
||||
}
|
||||
|
||||
private async System.Threading.Tasks.Task RefreshWorktreeAsync(string taskId)
|
||||
{
|
||||
try
|
||||
{
|
||||
await using var ctx = await _dbFactory.CreateDbContextAsync();
|
||||
var entity = await ctx.Tasks
|
||||
.AsNoTracking()
|
||||
.Include(t => t.Worktree)
|
||||
.FirstOrDefaultAsync(t => t.Id == taskId);
|
||||
if (entity == null || Task?.Id != taskId) return;
|
||||
|
||||
WorktreePath = entity.Worktree?.Path;
|
||||
WorktreeBaseCommit = entity.Worktree?.BaseCommit;
|
||||
BranchLine = entity.Worktree is { } w ? $"{w.BranchName} ← main" : null;
|
||||
AgentStatusLabel = entity.Status.ToString();
|
||||
if (Task is { } row && entity.Worktree?.DiffStat is { } stat)
|
||||
row.DiffStat = stat;
|
||||
}
|
||||
catch { /* best-effort refresh */ }
|
||||
}
|
||||
|
||||
[RelayCommand(CanExecute = nameof(CanOpenDiff))]
|
||||
private async System.Threading.Tasks.Task OpenDiffAsync()
|
||||
{
|
||||
@@ -170,6 +282,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
var diffVm = new DiffModalViewModel(_services.GetRequiredService<ClaudeDo.Data.Git.GitService>())
|
||||
{
|
||||
WorktreePath = WorktreePath,
|
||||
BaseRef = WorktreeBaseCommit,
|
||||
};
|
||||
await diffVm.LoadAsync();
|
||||
await ShowDiffModal(diffVm);
|
||||
@@ -178,19 +291,7 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
private bool CanOpenDiff() => WorktreePath != null;
|
||||
|
||||
[RelayCommand(CanExecute = nameof(CanOpenWorktree))]
|
||||
private async System.Threading.Tasks.Task OpenWorktreeAsync()
|
||||
{
|
||||
if (WorktreePath == null || ShowWorktreeModal == null) return;
|
||||
var vm = _services.GetRequiredService<WorktreeModalViewModel>();
|
||||
vm.WorktreePath = WorktreePath;
|
||||
await vm.LoadAsync();
|
||||
await ShowWorktreeModal(vm);
|
||||
}
|
||||
|
||||
private bool CanOpenWorktree() => WorktreePath != null;
|
||||
|
||||
[RelayCommand(CanExecute = nameof(CanOpenWorktree))]
|
||||
private void OpenInExplorer()
|
||||
private void OpenWorktree()
|
||||
{
|
||||
if (WorktreePath == null) return;
|
||||
try
|
||||
@@ -204,11 +305,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
catch { /* explorer open is best-effort */ }
|
||||
}
|
||||
|
||||
private bool CanOpenWorktree() => WorktreePath != null;
|
||||
|
||||
partial void OnWorktreePathChanged(string? value)
|
||||
{
|
||||
OpenDiffCommand.NotifyCanExecuteChanged();
|
||||
OpenWorktreeCommand.NotifyCanExecuteChanged();
|
||||
OpenInExplorerCommand.NotifyCanExecuteChanged();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
@@ -270,6 +372,25 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
if (Task == null) return;
|
||||
await _worker.CancelTaskAsync(Task.Id);
|
||||
}
|
||||
|
||||
[RelayCommand(CanExecute = nameof(CanRunNow))]
|
||||
private async System.Threading.Tasks.Task RunNowAsync()
|
||||
{
|
||||
if (Task == null) return;
|
||||
AgentStatusLabel = "Running";
|
||||
try
|
||||
{
|
||||
await _worker.RunNowAsync(Task.Id);
|
||||
}
|
||||
catch
|
||||
{
|
||||
AgentStatusLabel = "Failed";
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private bool CanRunNow() =>
|
||||
Task != null && _worker.IsConnected && !IsRunning;
|
||||
}
|
||||
|
||||
public sealed partial class SubtaskRowViewModel : ViewModelBase
|
||||
|
||||
@@ -3,7 +3,9 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using ClaudeDo.Data;
|
||||
using ClaudeDo.Data.Repositories;
|
||||
using ClaudeDo.Ui.ViewModels.Modals;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace ClaudeDo.Ui.ViewModels.Islands;
|
||||
|
||||
@@ -12,11 +14,23 @@ public enum ListKind { Smart, Virtual, User }
|
||||
public sealed partial class ListsIslandViewModel : ViewModelBase
|
||||
{
|
||||
private readonly IDbContextFactory<ClaudeDoDbContext> _dbFactory;
|
||||
private readonly IServiceProvider? _services;
|
||||
|
||||
public event EventHandler? SelectionChanged;
|
||||
public event EventHandler? FocusSearchRequested;
|
||||
public void RequestFocusSearch() => FocusSearchRequested?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
public Func<SettingsModalViewModel, Task>? ShowSettingsModal { get; set; }
|
||||
|
||||
[RelayCommand]
|
||||
private async Task OpenSettings()
|
||||
{
|
||||
if (ShowSettingsModal is null || _services is null) return;
|
||||
var settingsVm = _services.GetRequiredService<SettingsModalViewModel>();
|
||||
await settingsVm.LoadAsync();
|
||||
await ShowSettingsModal(settingsVm);
|
||||
}
|
||||
|
||||
public ObservableCollection<ListNavItemViewModel> Items { get; } = new();
|
||||
public ObservableCollection<ListNavItemViewModel> SmartLists { get; } = new();
|
||||
public ObservableCollection<ListNavItemViewModel> UserLists { get; } = new();
|
||||
@@ -28,9 +42,10 @@ public sealed partial class ListsIslandViewModel : ViewModelBase
|
||||
public string MachineName { get; } = Environment.MachineName;
|
||||
public string UserInitials { get; }
|
||||
|
||||
public ListsIslandViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory)
|
||||
public ListsIslandViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IServiceProvider? services = null)
|
||||
{
|
||||
_dbFactory = dbFactory;
|
||||
_services = services;
|
||||
var parts = Environment.UserName.Split('.', '_', '-', ' ');
|
||||
UserInitials = parts.Length >= 2
|
||||
? $"{parts[0][0]}{parts[1][0]}".ToUpperInvariant()
|
||||
|
||||
@@ -130,10 +130,7 @@ public sealed partial class TasksIslandViewModel : ViewModelBase
|
||||
var running = Items.Count(i => i.Status == TaskStatus.Running);
|
||||
var review = Items.Count(i => i.Status == TaskStatus.Done && i.Branch != null);
|
||||
|
||||
var weekday = now.ToString("dddd", CultureInfo.CurrentCulture);
|
||||
var month = now.ToString("MMM", CultureInfo.CurrentCulture);
|
||||
var day = now.Day;
|
||||
Subtitle = $"{weekday}, {month} {day} · {open} open";
|
||||
Subtitle = open == 1 ? "1 open task" : $"{open} open tasks";
|
||||
|
||||
if (running > 0 || review > 0)
|
||||
{
|
||||
|
||||
@@ -41,6 +41,7 @@ public sealed partial class DiffModalViewModel : ViewModelBase
|
||||
private readonly GitService _git;
|
||||
|
||||
public required string WorktreePath { get; init; }
|
||||
public string? BaseRef { get; init; }
|
||||
|
||||
public ObservableCollection<DiffFileViewModel> Files { get; } = new();
|
||||
|
||||
@@ -62,7 +63,12 @@ public sealed partial class DiffModalViewModel : ViewModelBase
|
||||
Files.Clear();
|
||||
|
||||
string raw;
|
||||
try { raw = await _git.GetDiffAsync(WorktreePath, ct); }
|
||||
try
|
||||
{
|
||||
raw = BaseRef is not null
|
||||
? await _git.GetBranchDiffAsync(WorktreePath, BaseRef, ct)
|
||||
: await _git.GetDiffAsync(WorktreePath, ct);
|
||||
}
|
||||
catch { return; }
|
||||
|
||||
if (string.IsNullOrWhiteSpace(raw)) return;
|
||||
|
||||
@@ -42,6 +42,15 @@
|
||||
<PathIcon Data="{StaticResource Icon.X}" Width="12" Height="12"
|
||||
Foreground="{DynamicResource BloodBrush}"/>
|
||||
</Button>
|
||||
<!-- Hand off button — only when idle -->
|
||||
<Button Grid.Column="3"
|
||||
Classes="btn accent"
|
||||
Content="Hand off"
|
||||
Command="{Binding RunNowCommand}"
|
||||
IsVisible="{Binding !IsRunning}"
|
||||
ToolTip.Tip="Hand task off to Claude"
|
||||
VerticalAlignment="Center"
|
||||
Padding="10,4"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Row 2: WORKTREE label + path + copy button -->
|
||||
@@ -123,13 +132,14 @@
|
||||
<!-- Action buttons -->
|
||||
<StackPanel Orientation="Horizontal" Spacing="6" Margin="0,4,0,0">
|
||||
<Button Classes="btn" Content="Open diff" Command="{Binding OpenDiffCommand}"/>
|
||||
<Button Classes="btn" Content="Worktree" Command="{Binding OpenWorktreeCommand}"/>
|
||||
<Button Classes="btn" ToolTip.Tip="Open in file explorer"
|
||||
Command="{Binding OpenInExplorerCommand}"
|
||||
Padding="8,6">
|
||||
<PathIcon Data="{StaticResource Icon.ArrowOut}"
|
||||
Width="12" Height="12"
|
||||
Foreground="{DynamicResource TextDimBrush}"/>
|
||||
<Button Classes="btn" Command="{Binding OpenWorktreeCommand}"
|
||||
ToolTip.Tip="Open worktree in file explorer">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6" VerticalAlignment="Center">
|
||||
<PathIcon Data="{StaticResource Icon.ArrowOut}"
|
||||
Width="11" Height="11"
|
||||
Foreground="{DynamicResource TextDimBrush}"/>
|
||||
<TextBlock Text="Worktree" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -88,66 +88,70 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ── Scrollable body ── -->
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="0">
|
||||
<!-- ── Main body: agent strip (auto) · terminal (flex) · steps+notes (auto/capped) ── -->
|
||||
<Grid RowDefinitions="Auto,*,Auto">
|
||||
|
||||
<!-- Agent strip -->
|
||||
<islands:AgentStripView/>
|
||||
<!-- Agent strip -->
|
||||
<islands:AgentStripView Grid.Row="0"/>
|
||||
|
||||
<!-- Session terminal -->
|
||||
<islands:SessionTerminalView Height="260" Margin="0"/>
|
||||
<!-- Session terminal — fills remaining vertical space -->
|
||||
<islands:SessionTerminalView Grid.Row="1" MinHeight="220" Margin="0,0,0,0"/>
|
||||
|
||||
<!-- Subtasks section -->
|
||||
<StackPanel Margin="18,12,18,0"
|
||||
IsVisible="{Binding Subtasks.Count}">
|
||||
<TextBlock Classes="section-label" Text="STEPS"
|
||||
Margin="0,0,0,6"/>
|
||||
<ItemsControl ItemsSource="{Binding Subtasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||
<Border Classes="subtask-row"
|
||||
Classes.done="{Binding Done}">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<!-- Ellipse checkbox -->
|
||||
<Ellipse Grid.Column="0"
|
||||
Classes="task-check"
|
||||
Classes.done="{Binding Done}"
|
||||
Width="16" Height="16"
|
||||
VerticalAlignment="Center"
|
||||
Cursor="Hand"
|
||||
Margin="0,0,8,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Classes="subtask-title"
|
||||
Text="{Binding Title}"
|
||||
FontSize="13"
|
||||
Foreground="{DynamicResource TextDimBrush}"
|
||||
<!-- Steps + Notes in a capped scroller so they never squeeze the terminal -->
|
||||
<ScrollViewer Grid.Row="2" MaxHeight="240"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Spacing="0">
|
||||
|
||||
<!-- Subtasks section -->
|
||||
<StackPanel Margin="18,12,18,0"
|
||||
IsVisible="{Binding Subtasks.Count}">
|
||||
<TextBlock Classes="section-label" Text="STEPS"
|
||||
Margin="0,0,0,6"/>
|
||||
<ItemsControl ItemsSource="{Binding Subtasks}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:SubtaskRowViewModel">
|
||||
<Border Classes="subtask-row"
|
||||
Classes.done="{Binding Done}">
|
||||
<Grid ColumnDefinitions="Auto,*">
|
||||
<Ellipse Grid.Column="0"
|
||||
Classes="task-check"
|
||||
Classes.done="{Binding Done}"
|
||||
Width="16" Height="16"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
Cursor="Hand"
|
||||
Margin="0,0,8,0"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Classes="subtask-title"
|
||||
Text="{Binding Title}"
|
||||
FontSize="13"
|
||||
Foreground="{DynamicResource TextDimBrush}"
|
||||
VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Notes section -->
|
||||
<StackPanel Margin="18,12,18,12">
|
||||
<TextBlock Classes="section-label" Text="NOTES" Margin="0,0,0,6"/>
|
||||
<TextBox Text="{Binding Notes, Mode=TwoWay}"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
MinHeight="80"
|
||||
Padding="12"
|
||||
PlaceholderText="Notes..."
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
LostFocus="NotesLostFocus"/>
|
||||
</StackPanel>
|
||||
<!-- Notes section -->
|
||||
<StackPanel Margin="18,12,18,12">
|
||||
<TextBlock Classes="section-label" Text="NOTES" Margin="0,0,0,6"/>
|
||||
<TextBox Text="{Binding Notes, Mode=TwoWay}"
|
||||
AcceptsReturn="True"
|
||||
TextWrapping="Wrap"
|
||||
MinHeight="80"
|
||||
Padding="12"
|
||||
PlaceholderText="Notes..."
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
LostFocus="NotesLostFocus"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -15,10 +15,6 @@
|
||||
<!-- ── Header ── -->
|
||||
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||
<StackPanel Margin="14,12,14,0" Spacing="4">
|
||||
<TextBlock Classes="eyebrow"
|
||||
Text="NAVIGATOR"
|
||||
FontFamily="{DynamicResource MonoFont}" FontSize="9"
|
||||
Foreground="{DynamicResource TextFaintBrush}" LetterSpacing="1.2"/>
|
||||
<TextBlock FontFamily="{DynamicResource SansFamily}" FontSize="18"
|
||||
FontWeight="SemiBold" Foreground="{DynamicResource TextBrush}"
|
||||
Text="Lists"/>
|
||||
@@ -69,7 +65,9 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<!-- More button -->
|
||||
<Button Grid.Column="2" Classes="icon-btn" VerticalAlignment="Center">
|
||||
<Button Grid.Column="2" Classes="icon-btn" VerticalAlignment="Center"
|
||||
Command="{Binding OpenSettingsCommand}"
|
||||
ToolTip.Tip="Settings">
|
||||
<PathIcon Data="{StaticResource Icon.MoreHorizontal}"
|
||||
Width="14" Height="14"
|
||||
Foreground="{DynamicResource TextMuteBrush}"/>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using ClaudeDo.Ui.ViewModels.Islands;
|
||||
using ClaudeDo.Ui.ViewModels.Modals;
|
||||
using ClaudeDo.Ui.Views.Modals;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Islands;
|
||||
|
||||
@@ -12,7 +14,10 @@ public partial class ListsIslandView : UserControl
|
||||
DataContextChanged += (_, _) =>
|
||||
{
|
||||
if (DataContext is ListsIslandViewModel vm)
|
||||
{
|
||||
vm.FocusSearchRequested += (_, _) => SearchBox.Focus();
|
||||
vm.ShowSettingsModal = ShowSettingsAsync;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,4 +27,12 @@ public partial class ListsIslandView : UserControl
|
||||
&& DataContext is ListsIslandViewModel vm)
|
||||
vm.SelectCommand.Execute(item);
|
||||
}
|
||||
|
||||
private async System.Threading.Tasks.Task ShowSettingsAsync(SettingsModalViewModel settingsVm)
|
||||
{
|
||||
var owner = TopLevel.GetTopLevel(this) as Window;
|
||||
if (owner == null) return;
|
||||
var modal = new SettingsModalView { DataContext = settingsVm };
|
||||
await modal.ShowDialog(owner);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,13 +10,6 @@
|
||||
<Grid DockPanel.Dock="Top" ColumnDefinitions="Auto,*,Auto"
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
Height="28">
|
||||
<!-- Traffic-light dots -->
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="4"
|
||||
VerticalAlignment="Center" Margin="10,0,0,0">
|
||||
<Ellipse Classes="dot-red"/>
|
||||
<Ellipse Classes="dot-yellow"/>
|
||||
<Ellipse Classes="dot-green"/>
|
||||
</StackPanel>
|
||||
<!-- Session label -->
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="{Binding BranchLine, StringFormat='claude-session · {0}'}"
|
||||
@@ -26,36 +19,34 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
<!-- LIVE chip -->
|
||||
<Border Grid.Column="2" Classes="live-chip"
|
||||
Classes.pulsing="{Binding IsRunning}"
|
||||
<Border Grid.Column="2" Classes="live-chip pulsing"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Margin="0,0,8,0" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" VerticalAlignment="Center">
|
||||
<Ellipse VerticalAlignment="Center"/>
|
||||
<TextBlock Text="LIVE" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- ── Prompt input (docked bottom) ── -->
|
||||
<Grid DockPanel.Dock="Bottom" ColumnDefinitions="Auto,*"
|
||||
Margin="0,0,0,0"
|
||||
Background="{DynamicResource Surface2Brush}">
|
||||
<Border Grid.ColumnSpan="2"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,1,0,0"/>
|
||||
<TextBlock Grid.Column="0" Text="›"
|
||||
FontFamily="{DynamicResource MonoFont}"
|
||||
FontSize="11" Foreground="{DynamicResource MossBrush}"
|
||||
VerticalAlignment="Center" Margin="10,0,8,0"/>
|
||||
<TextBox Grid.Column="1"
|
||||
Text="{Binding PromptInput, Mode=TwoWay}"
|
||||
FontFamily="{DynamicResource MonoFont}" FontSize="11"
|
||||
Background="Transparent" BorderThickness="0"
|
||||
Padding="0,6">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding SendPromptCommand}"/>
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
<!-- DONE chip -->
|
||||
<Border Grid.Column="2" Classes="live-chip done"
|
||||
IsVisible="{Binding IsDone}"
|
||||
Margin="0,0,8,0" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" VerticalAlignment="Center">
|
||||
<Ellipse VerticalAlignment="Center" Fill="{DynamicResource MossBrush}"/>
|
||||
<TextBlock Text="DONE" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource MossBrush}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<!-- FAILED chip -->
|
||||
<Border Grid.Column="2" Classes="live-chip failed"
|
||||
IsVisible="{Binding IsFailed}"
|
||||
Margin="0,0,8,0" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" VerticalAlignment="Center">
|
||||
<Ellipse VerticalAlignment="Center" Fill="{DynamicResource BloodBrush}"/>
|
||||
<TextBlock Text="FAILED" VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource BloodBrush}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- ── Log output ── -->
|
||||
@@ -74,12 +65,12 @@
|
||||
Classes="log-kind"
|
||||
Tag="{Binding ClassName}"
|
||||
Text="{Binding KindMarker}"/>
|
||||
<!-- Message text — inherits terminal TextBlock color from parent selector -->
|
||||
<TextBlock Grid.Column="2"
|
||||
Text="{Binding Text}" Tag="{Binding ClassName}"
|
||||
FontFamily="{DynamicResource MonoFont}" FontSize="11"
|
||||
Foreground="{DynamicResource TextDimBrush}"
|
||||
TextWrapping="Wrap"/>
|
||||
<!-- Message text — selectable so the user can copy raw output -->
|
||||
<SelectableTextBlock Grid.Column="2"
|
||||
Text="{Binding Text}" Tag="{Binding ClassName}"
|
||||
FontFamily="{DynamicResource MonoFont}" FontSize="11"
|
||||
Foreground="{DynamicResource TextDimBrush}"
|
||||
TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
IsVisible="{Binding IsSelected}"/>
|
||||
|
||||
<!-- Done toggle -->
|
||||
<Button Grid.Column="1" Classes="check-btn" VerticalAlignment="Top"
|
||||
<Button Grid.Column="1" Classes="flat" VerticalAlignment="Top"
|
||||
Margin="0,2,0,0"
|
||||
Command="{Binding $parent[ItemsControl].((vm:TasksIslandViewModel)DataContext).ToggleDoneCommand}"
|
||||
CommandParameter="{Binding}">
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
SystemDecorations="None"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Background="Transparent"
|
||||
TransparencyLevelHint="AcrylicBlur">
|
||||
Background="{StaticResource SurfaceBrush}">
|
||||
|
||||
<Window.KeyBindings>
|
||||
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
|
||||
@@ -46,13 +45,10 @@
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
|
||||
<!-- Outer container -->
|
||||
<Border CornerRadius="{StaticResource ModalCornerRadius}"
|
||||
BoxShadow="{StaticResource ModalShadow}"
|
||||
Background="{StaticResource SurfaceBrush}"
|
||||
<!-- Outer container — rectangular so the OS window rectangle stays filled (no black corners) -->
|
||||
<Border Background="{StaticResource SurfaceBrush}"
|
||||
BorderBrush="{StaticResource LineBrush}"
|
||||
BorderThickness="1"
|
||||
ClipToBounds="True">
|
||||
BorderThickness="1">
|
||||
<Grid RowDefinitions="36,*">
|
||||
|
||||
<!-- Title bar / drag handle -->
|
||||
|
||||
Reference in New Issue
Block a user