Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ enum TabGroupHandlers {
let tabs = selected.filter { !$0.pinned }
guard !tabs.isEmpty else { return ctx.refuse(RefusalStrings.pinnedCannotGroup) }
let name = invocation["name"]?.stringValue
// The same color rule as screen groups (`TabGroupOrdering.nextColor`).
let color = invocation["color"]?.stringValue
?? TabGroupOrdering.nextColor(used: pane.tabGroups.compactMap { $0.color.flatMap(GroupColor.init(rawValue:)) }).rawValue
// A group nobody gave a color is grey, the daemon's own default: no palette color
// (an orange dot and underline) appears that nobody picked (Leo, 2026-10-31: "WHERE
// IS ORANGE COMING FROM?"). A color the caller names still shows.
let color = invocation["color"]?.stringValue ?? GroupColor.grey.rawValue
let writes = TabGroupWrites(pane: pane, daemon: ctx.services.daemon(for: pane))
run("create-tab-group", pane: pane, ctx, writes.create(tabs, name: name, color: color))
ctx.services.paneController(for: pane)?.stripModel.clearMultiSelection()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ struct TabSelectionActionsTests {
let refusal = services.registry.capturingRefusal { _ = services.registry.perform("tabGroup.create", invocation: ActionInvocation()) }
#expect(refusal == nil, "the palette's New Tab Group refused: \(refusal ?? "")")
try await PinnedPageTests.until({ Self.grouped(ids, in: pane) }, report: { "groups \(ids.map { pane.tab($0)?.tabGroup?.rawValue })" })
// A group nobody gave a color is grey, never a palette color nobody picked (Leo,
// 2026-10-31: "WHERE IS ORANGE COMING FROM?").
let group = try #require(pane.tab(ids[0])?.tabGroup)
let color = pane.pane.tabGroups.first { $0.id == group }?.color
#expect(color == "grey", "a new tab group took \(color ?? "nil"), not grey")
}
}

Expand Down
Loading