Files
ClaudeDo/src/ClaudeDo.Ui/Views/Islands/Detail/TaskHeaderBar.axaml
T
mika kuns 4cf601e423 feat(ui): surface depends_on blocking in status chip, chain label, and detail pane
Usability-Audit 2026-09-10 found three gaps versus the dependency-chain-display
spec: a Queued task blocked on an unmet task_dependencies edge rendered the same
chip as one about to run, a cross-list predecessor silently dropped the
"after #N" chip, and the detail pane showed nothing about a wait at all.

- TaskRowViewModel gains IsBlockedByDependency/DependencyWaitLabel (extrinsic,
  assigned by TasksIslandViewModel like the existing chain fields); IsQueued/
  IsWaiting/StatusChipClass/StatusLabel/StatusChipTooltip now account for it
  alongside the existing BlockedByTaskId planning-chain link.
- TasksIslandViewModel.ApplyDependencyWaitState computes the blocked flag and
  wait label per row; a new RefreshExternalDependencyCacheAsync backfills
  Number/Title/Status for predecessors not loaded into the current list's
  Items (reusing the already-open DbContext, no new hub method), so
  BuildAfterLabel/blocking both resolve a listenfremder Vorgänger correctly.
- New "waiting" chip style (IslandStyles.axaml) and locale keys (en+de);
  TaskHeaderBar shows a "Waiting on #N" line bound straight to the same row.

Tests: TasksIslandChainTests (blocked/unblocked chip, cross-list predecessor),
DetailsIslandDependencyWaitTests (new), TaskRowViewModelNotificationsTests
updated for the new notification set.
2026-09-10 13:32:36 +02:00

94 lines
4.3 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
xmlns:loc="using:ClaudeDo.Ui.Localization"
x:Class="ClaudeDo.Ui.Views.Islands.Detail.TaskHeaderBar"
x:DataType="vm:DetailsIslandViewModel">
<Grid ColumnDefinitions="*,Auto,Auto">
<!-- Column 0: id badge + editable title -->
<StackPanel Grid.Column="0" Spacing="0">
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,0,0,4">
<TextBlock Classes="meta"
Text="{Binding TaskIdBadge}"
Cursor="Hand"
ToolTip.Tip="{loc:Tr details.copyTaskIdTip}"
Tapped="OnTaskIdTapped"/>
<!-- created-at moved up from the removed metadata footer -->
<TextBlock Classes="meta" Text="{Binding Task.CreatedAtFormatted}"/>
</StackPanel>
<TextBox Text="{Binding EditableTitle, Mode=TwoWay}"
Background="Transparent"
BorderThickness="0"
FontSize="{StaticResource FontSizeTaskTitle}"
FontWeight="Medium"
Foreground="{DynamicResource TextBrush}"
TextWrapping="Wrap"
AcceptsReturn="False"
Padding="0"/>
<!-- Branch meta line: moved here from the task row's chip (A5) — the row no longer
shows the branch anywhere else. FallbackValue: with no task bound the path can't
resolve and IsVisible would fall back to its default (true). -->
<StackPanel Orientation="Horizontal" Spacing="4" Margin="0,4,0,0"
IsVisible="{Binding Task.HasBranch, FallbackValue=False}">
<!-- Icon.GitBranch is line-art: stroke-rendered, PathIcon would fill the lines away -->
<Viewbox Width="10" Height="10">
<Path Classes="icon-stroke" Data="{StaticResource Icon.GitBranch}"
StrokeThickness="2.4"/>
</Viewbox>
<TextBlock Classes="meta" Text="{Binding Task.Branch}"/>
</StackPanel>
<!-- Dependency-wait line: this task is Queued but blocked on an unmet predecessor (a
task_dependencies edge, or the planning chain's BlockedByTaskId). -->
<StackPanel Orientation="Horizontal" Spacing="4" Margin="0,4,0,0"
IsVisible="{Binding Task.IsWaiting, FallbackValue=False}">
<TextBlock Classes="meta" Text="{loc:Tr details.waitingOnPrefix}"/>
<TextBlock Classes="meta" Text="{Binding Task.DependencyWaitLabel}"/>
</StackPanel>
</StackPanel>
<!-- Column 1: trash button (not running) -->
<Button Grid.Column="1" Classes="icon-btn"
Command="{Binding DeleteTaskCommand}"
ToolTip.Tip="{loc:Tr details.deleteTaskTip}"
ToolTip.ShowOnDisabled="True"
IsVisible="{Binding !IsRunning}"
VerticalAlignment="Top"
Margin="6,0,0,0">
<PathIcon Classes="danger" Data="{StaticResource Icon.Trash}" Width="14" Height="14"/>
</Button>
<!-- Column 1: skull button (running) -->
<Button Grid.Column="1" Classes="icon-btn"
Command="{Binding StopCommand}"
ToolTip.Tip="{loc:Tr details.killSessionTip}"
IsVisible="{Binding IsRunning}"
VerticalAlignment="Top"
Margin="6,0,0,0">
<PathIcon Classes="danger" Data="{StaticResource Icon.Skull}" Width="14" Height="14"/>
</Button>
<!-- Column 2: gear button with agent settings flyout -->
<Button Grid.Column="2" Classes="icon-btn"
ToolTip.Tip="{loc:Tr details.agentSettingsTip}"
IsEnabled="{Binding AgentSettings.IsEnabled}"
VerticalAlignment="Top"
Margin="6,0,0,0">
<PathIcon Data="{StaticResource Icon.Settings}" Width="15" Height="15"/>
<Button.Flyout>
<Flyout Placement="BottomEdgeAlignedRight" ShowMode="Standard">
<StackPanel Width="340" Spacing="10" Margin="4">
<TextBlock Text="{loc:Tr details.agentSettingsHeading}" FontWeight="SemiBold"/>
<ctl:AgentConfigEditor DataContext="{Binding AgentSettings}"/>
</StackPanel>
</Flyout>
</Button.Flyout>
</Button>
</Grid>
</UserControl>