Tool Call Card Alignment

Nucleic-Session: FFDE42E0-22AB-4478-B2E2-FF69B2753CEE
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 19:38:27 -07:00
co-authored by Nucleic
parent b21d117903
commit a3b7e0daf0
@@ -147,8 +147,24 @@ struct ToolBlockCard: View {
.padding(10) .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 { private var trailingControls: some View {
HStack(spacing: 6) { 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)") Text("\(groups.count)")
.font(.caption2.weight(.semibold).monospacedDigit()).foregroundStyle(.secondary) .font(.caption2.weight(.semibold).monospacedDigit()).foregroundStyle(.secondary)
if !allFinished { ProgressView().controlSize(.mini) } if !allFinished { ProgressView().controlSize(.mini) }