diff --git a/CHANGELOG.md b/CHANGELOG.md index 690646fa..ad6597e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ - **The Capacity Dock gauge can report the short usage window instead of the weekly one, without expanding the dock.** The resting rail shows one number per provider, and that number was always the weekly (else monthly) billing window. Clicking the provider already resting in the rail now switches its gauge to the provider's short rolling window โ€” Claude's 5-hour limit, Codex's 5-hour or daily window, any `Hourly`, `Daily` or session row an adapter reports โ€” and clicking again switches back. The choice is stored per provider under `CodeBurnCapacityDockGlanceWindows`, so Claude can sit on its 5-hour window while Codex stays weekly, and it survives relaunch. A per-model row such as `Weekly ยท Opus` is never read as a short window, a provider that reports only one window keeps the plain click-to-pin behaviour, and a stored horizon the provider stops reporting falls back to the window it does report rather than blanking the gauge to `--`. The rail's geometry is untouched, VoiceOver and keyboard users get the switch as a named action on the provider cell with the window named in the cell's value, and Escape or a click outside still unpins the dock. (#1243) ### Changed -- **The Capacity Dock card no longer prints a pace verdict under each quota window.** The "On pace" / "Lasts until reset" caption from #1314 added a third line to every window cell and made the card read as clutter; the cells are back to percent, label and countdown, and the pace math still feeds the tooltip and the agent-tab card. +- **The Capacity Dock card no longer prints a pace verdict under each quota window.** The "On pace" / "Lasts until reset" caption from #1314 added a third line to every window cell and made the card read as clutter; the cells are back to percent, label and countdown, up to three windows share one row again with a fourth wrapping to a second, and the pace math still feeds the tooltip and the agent-tab card. ### Fixed - **Shared and MCP-redacted payloads no longer carry git branch names or the working directory of a session.** Two identities were riding along in `current`: the `topSessions` rows added in #1316 carry `projectKey`, a dash-encoded absolute path such as `-Users--Projects-`, which `redactProjectNames` left verbatim even when an MCP client asked not to see project names, and the per-branch rows added in #788 carry the raw branch, which both `sanitizeForSharing` and the MCP pass let through, so a branch such as `exp/extraction-arms` reached a shared payload as typed. The MCP pass now hashes `projectKey` with the same salted pseudonym it already applies to `topProjects[].id`, hashes the drill-through `sessionId` on both `topSessions` and `topProjects[].sessionDetails` (a Codex id embeds the rollout timestamp the pass blanks out of `date`), and gives each distinct branch a stable `branch-xxxxxx` pseudonym, keeping the cost, calls and session counts untouched; a `null` branch stays null, because unbranched spend is not a name. Sharing drops the per-branch block outright, the way it already drops the project and session rows, since a pseudonymized branch tells a peer device nothing anyway. Nothing changes for the local menubar, the desktop app or the web dashboard, which read the unsanitized payload, and nothing changes for an MCP caller that passes `include_project_names: true` โ€” it still gets every name as recorded. (#1325, #1321) diff --git a/mac/Sources/CodeBurnMenubar/Views/CapacityDockView.swift b/mac/Sources/CodeBurnMenubar/Views/CapacityDockView.swift index ad5398d7..183c814a 100644 --- a/mac/Sources/CodeBurnMenubar/Views/CapacityDockView.swift +++ b/mac/Sources/CodeBurnMenubar/Views/CapacityDockView.swift @@ -168,11 +168,10 @@ enum CapacityDockGlance { ).rounded() } - /// One or two windows stay on one compact row. Three and four windows use - /// two columns and enough row height for every percentage and reset. This is shared by `detailHeight` and the actual SwiftUI grid. + /// Up to three windows share one compact row; a fourth starts a second row. This is shared by `detailHeight` and the actual SwiftUI grid. static func windowColumnCount(for windowCount: Int) -> Int { guard windowCount > 0 else { return 0 } - return min(windowCount, 2) + return min(windowCount, 3) } static func windowRowCount(for windowCount: Int) -> Int { @@ -1129,9 +1128,8 @@ struct CapacityDockDetailView: View { } /// One cell per quota window, in the order the provider reported them. - /// One or two windows stay on a compact row. Three or four windows use a - /// two-column grid whose cell width comes from the actual content geometry, - /// including its inter-column gap. + /// Up to three windows share a compact row; four use two rows. Cell width + /// comes from the actual content geometry, including its inter-column gap. @ViewBuilder private func windowsSection(_ quota: QuotaSummary) -> some View { let s = model.detailScale @@ -1168,7 +1166,7 @@ struct CapacityDockDetailView: View { (geometry.size.width - columnSpacing * CGFloat(max(0, columnCount - 1))) / CGFloat(max(columnCount, 1)) ) - VStack(spacing: windows.count > 2 ? CapacityDockGlance.windowsRowGap * scale : 0) { + VStack(spacing: rowCount > 1 ? CapacityDockGlance.windowsRowGap * scale : 0) { ForEach(0.. full) } @Test("A vertical tail adds its allowance to the panel height")