mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
Merge pull request #1357 from getagentseal/fix/dock-live-sessions-provider-id
menubar: match dock live sessions by the provider's payload ids
This commit is contained in:
commit
651030f7b7
2 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
### Fixed
|
||||
- **The menubar refreshes usage within five minutes while a session is running, instead of up to thirty.** The background change guard only stats directories, so a session appending to its transcript looked unchanged and the app skipped every refresh for half an hour; the skip now lasts at most five minutes, and the Kimi Code session store joined the watched roots.
|
||||
- **The Capacity Dock card lists running sessions for providers whose CLI id differs from the dock id.** The card matched live rows against the dock's own identifier ("kimi"), while the CLI reports "kimicode", so a running Kimi Code session read "none running"; the card now matches the provider's payload ids, which also lets the Cursor card count cursor-agent sessions.
|
||||
- **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-<user>-Projects-<repo>`, 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)
|
||||
- **A pull request row now opens the sessions that produced it.** Every other aggregate in the app drills through — a day bar, a model name, a task category, a project — but the Pull requests section only ever expanded and collapsed: the PR selection builder and the drill-through callback were threaded through the section four component levels deep and nothing ever called either, so the one report that names actual shipped work had no way into the sessions behind it. An expanded PR row now carries a `View sessions for this pull request →` control above its work breakdown, the same affordance a project row in Spend already offers; it selects the PR by its URL — the aggregation key the by-PR report is built on — and lands in Sessions with the chip applied and each session's per-turn contribution reconciled against its full cost. The control is its own click target rather than the row, so clicking it or pressing Enter on it never costs the expansion, and a legacy row with no per-turn detail offers it too. Two smaller items from the same review: the sessions list's return-to-the-first-page reset wrote internal state the app does not read while it owns the pagination depth, so revealing another 120 rows and then changing the sort or removing a chip left you deep inside a list that had just been reordered — the reset now rides the same commit as the change that caused it, and the depth a Back/Forward restore brings back is left alone. And the investigation chips were keyed by the label they display, which truncates a session id to 12 characters and a project to its last path segment: two chips that read alike collided into one React key, warned about it, and risked reconciling or removing the wrong one — they are now keyed by the full provider+id and project+branch identity the selection is deduplicated by. (#1317)
|
||||
- **The menubar second row's quota line now names the provider the flame is warning about.** "Quota remaining" picked each provider's *headline* window — weekly, else monthly, and only then the busiest one — which is the Capacity Dock's billing horizon, not a warning: on a machine with Cursor's API window at 100% and Claude's 5-hour window at 18%, the row reported Monthly 9.5% and Weekly 5% and read as if nothing were near a limit. Each provider now contributes its worst window, per-model rows included, which is exactly what the menu-bar flame already tints by, so the two surfaces agree. A provider backing off after a failed fetch keeps its last-known window instead of dropping out, so the row no longer vanishes — resizing the status item — for the length of a retry, matching what the dock shows dimmed. The row is also capped at 24 characters, shortening a long provider name ("GitHub Copilot 12% left · 6d 3h") rather than letting the second line more than double the item's width, and the two-line title now carries a VoiceOver label that reads as one phrase instead of a string with a newline in it. With the setting off nothing changed: the snapshot that feeds the row is no longer even built on a refresh, and the title is the single-row composition it has always been. (#1310)
|
||||
|
|
|
|||
|
|
@ -2248,7 +2248,10 @@ final class AppStore {
|
|||
/// "none running".
|
||||
func capacityDockLiveSessions(for provider: CapacityDockProvider) -> [LiveSession]? {
|
||||
guard let block = menubarPayload?.liveSessions else { return nil }
|
||||
return block.sessions.filter { $0.provider == provider.id }
|
||||
// The CLI names providers by their own ids ("kimicode", "cursor-agent"),
|
||||
// not by the dock's raw identifiers ("kimi"); match the payload ids.
|
||||
let ids = provider.payloadProviderIDs
|
||||
return block.sessions.filter { ids.contains($0.provider) }
|
||||
}
|
||||
|
||||
/// Today's totals for the dock popover. The background loop keeps the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue