From 9eddef09c769b315f4eabef6eaf4bb58e70d0966 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Tue, 27 Oct 2026 15:27:14 +0200 Subject: menu, panel, search: a peach ! in a column of its own; low dimmed more the ! was the color of the name, read as part of it, and pushed high names two characters out of line. it is now peach (herdr's palette, no status uses it) in a fixed-width column every row has, so names line up. a low agent's name is dimmed to 0.5 (0.7 was hard to see). --- menubar/main.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'menubar/main.swift') diff --git a/menubar/main.swift b/menubar/main.swift index 135c099..2230817 100644 --- a/menubar/main.swift +++ b/menubar/main.swift @@ -424,6 +424,18 @@ if arguments.contains("--selftest") { if rowTitle(high).string != "✓ ! Fix it" || rowTitlePrefix(high) != "✓ ! " { failures.append("title: a high agent is marked: \(rowTitle(high).string)") } + let markColor = rowTitle(high).attribute(.foregroundColor, at: rowTitlePrefix(high).utf16.count - 2, + effectiveRange: nil) as? NSColor + if markColor != herdrPeach { failures.append("title: the ! is peach") } + let normal = Row(paneId: "%2", agent: "pi", name: "Fix it", status: .done, session: "s", window: "w", since: 1) + if rowTitle(normal).string != "✓ Fix it" || rowTitlePrefix(normal).count != rowTitlePrefix(high).count { + failures.append("title: names line up with or without the mark: '\(rowTitle(normal).string)'") + } + let low = Row(paneId: "%3", agent: "pi", name: "Fix it", status: .done, session: "s", window: "w", since: 1, + importance: .low) + let lowColor = rowTitle(low).attribute(.foregroundColor, at: rowTitlePrefix(low).utf16.count, + effectiveRange: nil) as? NSColor + if lowColor?.alphaComponent != lowImportanceAlpha { failures.append("title: a low agent's name is dimmed") } failures.forEach { print("FAIL \($0)") } print(failures.isEmpty ? "selftest ok" : "selftest: \(failures.count) failed") exit(failures.isEmpty ? 0 : 1) -- cgit v1.2.3