From a3b7e0daf0a7c9dd6f803a28b030511cb46a8e49 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 19:38:27 -0700 Subject: [PATCH] Tool Call Card Alignment Nucleic-Session: FFDE42E0-22AB-4478-B2E2-FF69B2753CEE Co-authored-by: Nucleic --- .../Views/Transcript/ToolGroupRow.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift b/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift index 753b654..4c4538a 100644 --- a/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift +++ b/NucleicRemote/NucleicRemote/Views/Transcript/ToolGroupRow.swift @@ -147,8 +147,24 @@ struct ToolBlockCard: View { .padding(10) } + /// The lock state of any call in the block that is currently waiting/held (newest wins), so a + /// collapsed block flags at a glance that it holds a file lock. `nil` when nothing is locked or + /// every lock has been released — expand to see which calls and paths. Mirrors the Mac's + /// `blockLockState`. + private var blockLockState: NoteLock.State? { + for group in groups.reversed() { + if let state = group.lockLines.last?.state, state != .released { return state } + } + return nil + } + private var trailingControls: some View { HStack(spacing: 6) { + // A held/waiting lock anywhere in the block shows as a small glyph, collapsed. + if let lockState = blockLockState { + Image(systemName: LockLineStyle.icon(lockState)) + .font(.caption2).foregroundStyle(.tertiary) + } Text("\(groups.count)") .font(.caption2.weight(.semibold).monospacedDigit()).foregroundStyle(.secondary) if !allFinished { ProgressView().controlSize(.mini) }