From 185af91b4d525db6c192a050b53615772fb5fe11 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Mon, 26 Oct 2026 16:32:18 +0200 Subject: importance: mark an agent high, normal, or low within a status, more important agents are listed first, and so jumped to first; status stays first. a high agent shows a bold ! before its name, a low agent's name is lightly dimmed with "low" on its second line, and it makes no sound (it still notifies and waits in line). in pi, /importance high|normal|low (completes the levels; none once one is typed out, so Enter runs it). the extension saves it in the session as a custom entry (dingger-importance), so /reload, restarts, /resume and restore bring it back; /new starts at normal. it shows a level other than normal in pi's footer, emits dingger:importance { level } for other extensions, and sends it with every report. for other agents, `dingger importance [level] [--pane]`; it refuses a pi that reports itself, whose saved level would win. the daemon stays the one writer of pane state: it writes @dingger_importance (unset for normal), which goes with the agent and survives a daemon restart. `dingger status` marks high and low. tests: e2e step 21 (order, the option, no sound for low, the menu bar, the command, the extension through a harness that now matches pi's extension API), a DINGGER_SOUND seam so sounds are observable, and a status-line check that read the counts once (flaky) now polls. pi-live: /importance in real pi 1.4, its footer and session entry, and the level after a restore; every pi there now uses the test's agent directory (a restored pi read the user's). negative controls fail each part. --- menubar/search.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'menubar/search.swift') diff --git a/menubar/search.swift b/menubar/search.swift index 21db063..2bc044a 100644 --- a/menubar/search.swift +++ b/menubar/search.swift @@ -171,7 +171,7 @@ struct SearchState: Equatable { for match in visible { let row = match.row let marker = row.paneId == selected ? "›" : " " - lines.append("\(marker) \(row.status.symbol) \(row.status.rawValue)\t\(row.label)\t\(row.subtitle)") + lines.append("\(marker) \(row.status.symbol) \(row.status.rawValue)\t\(row.markedLabel)\t\(row.subtitle)") } lines.append(footer) return lines.joined(separator: "\n") @@ -192,7 +192,7 @@ private func highlightedTitle(_ match: SearchMatch) -> NSAttributedString { let text = NSMutableAttributedString( attributedString: rowTitle(match.row, primary: mochaText, secondary: mochaSubtext)) guard !match.labelPositions.isEmpty else { return text } - let prefix = "\(match.row.status.symbol) ".utf16.count + let prefix = rowTitlePrefix(match.row).utf16.count let font = NSFont.boldSystemFont(ofSize: NSFont.menuFont(ofSize: 0).pointSize) let label = Array(match.row.label) var utf16Offset = prefix -- cgit v1.2.3