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) }