feat(ui): coloured dots for icon-less lists, guide line under chevron

Lists without an icon show a dot in a stable identity colour (same
palette/hash as Mission Control tiles); "Dot" is the new picker default.
This commit is contained in:
mika kuns
2026-09-30 08:29:46 +02:00
parent 75b78cb2c0
commit 9991f1fc1f
5 changed files with 23 additions and 8 deletions
@@ -1,4 +1,5 @@
using ClaudeDo.Data.Models;
using ClaudeDo.Ui.ViewModels.MissionControl;
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
@@ -30,7 +31,15 @@ public sealed partial class ListNavItemViewModel : ViewModelBase
// DropHintAbove/Below, which mark an insertion point for list reordering.
[ObservableProperty] private bool _isTaskDropTarget;
// Settable (not init) so a list-settings icon change refreshes the row in place.
[ObservableProperty] private string? _iconKey;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(IsDot))]
private string? _iconKey;
/// <summary>No icon picked — the row shows a coloured dot instead of a glyph.</summary>
public bool IsDot => IconKey is null or ListsIslandViewModel.ListIcon;
/// <summary>Identity colour of the dot, stable per list id across restarts.</summary>
public string DotColorKey => $"Identity{ConPtyPaneViewModel.StableIndex(Id, 6) + 1}";
// The sidebar folder this row sits in (ListEntity.FolderId); null = top level.
[ObservableProperty] private string? _folderId;
}
@@ -30,7 +30,8 @@ public sealed partial class ConPtyPaneViewModel : ViewModelBase, IDisposable
// FNV-1a, not string.GetHashCode: the latter is randomized per process, so the same task would
// change colour on every app start.
private static int StableIndex(string value, int buckets)
/// <summary>Process-stable bucket for <paramref name="value"/>; also colours the sidebar list dots.</summary>
internal static int StableIndex(string value, int buckets)
{
uint hash = 2166136261;
foreach (var c in value)
@@ -111,7 +111,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
public ObservableCollection<string> CommitTypeOptions { get; } = new(CommitTypeRegistry.Types);
public const string DefaultIcon = "Text";
public const string DefaultIcon = "Dot";
/// <summary>Default icon for folders, kept apart from <see cref="DefaultIcon"/> so lists never look like folders.</summary>
public const string DefaultFolderIcon = "Folder";
@@ -123,7 +123,7 @@ public sealed partial class ListSettingsModalViewModel : ViewModelBase
public static readonly string[] IconOptions =
[
// general
"Folder", "Star", "Sun", "Calendar", "Clock", "Inbox", "Mail", "Text", "Search", "Grid",
"Dot", "Folder", "Star", "Sun", "Calendar", "Clock", "Inbox", "Mail", "Text", "Search", "Grid",
// dev
"Code", "Terminal", "Database", "Server", "Chip", "Bolt", "Wand", "Flask", "Shield",
// status / flow