Show overall build status with a labeled icon in the menu bar - #23
Show overall build status with a labeled icon in the menu bar#23sour4bhdex wants to merge 9 commits into
Conversation
Greptile SummaryThis PR adds a labeled icon to the menu bar (e.g.
Confidence Score: 5/5Safe to merge — all meaningful logic paths are exercised by the new test suite and the previously-flagged stale-cache issue is resolved. The status-counting and cache-refresh logic is well-contained in StatusCounts and refreshDeploySpinner. The three code paths that could leave the menu bar showing stale state (signOut, changeToken, disconnectVercel) now all call refreshDeploySpinner after clearing data. The 60 fps timer is correctly stopped when no builds are running. The test suite covers the full priority ladder (pendingApproval > running > failing > passing > unknown), key-branch exemptions, the recency window, the visibility cap, and the cache-reset-on-clear path — leaving no obvious untested gap. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant AL as AppDelegate.applicationDidFinishLaunching
participant AS as AppState
participant P as Pollers (Build/Vercel/AutoApproval)
participant MBL as MenuBarLabel (60 fps render)
AL->>AS: "Task { await appState.initialize() }"
AS->>P: startPolling()
loop Each poll cycle
P->>AS: update buildsByProject / deploymentsByProject / pendingApprovals
P->>AS: refreshDeploySpinner()
AS->>AS: "menuBarCounts = statusCounts (parse ISO8601 here)"
AS->>AS: "menuBarStatus = overallStatus(pendingApprovals)"
alt "menuBarStatus == .running"
AS->>AS: start 60 fps Timer (deploySpinnerPhase)
else
AS->>AS: stop Timer, reset phase to 0
end
end
loop Each frame (up to 60 fps, only while running)
AS->>AS: "Timer fires → deploySpinnerPhase = elapsed/period % 1"
AS-->>MBL: "@Observable notifies change"
MBL->>MBL: read menuBarStatus (cached)
MBL->>MBL: read menuBarCounts (cached)
MBL->>MBL: render iconView + labelText (no ISO8601 parsing)
end
note over AS,MBL: sign-out / changeToken / disconnectVercel also call refreshDeploySpinner() to clear stale cache + stop timer
Reviews (9): Last reviewed commit: "Reset cached menu bar status on sign-out..." | Re-trigger Greptile |
|
@greptile review |
551aa31 to
c90fc2f
Compare
The menu bar shows a short status label beside its icon. Pending approval takes priority, followed by running, failing, passing, and unknown. The running state animates. The cached status updates after each poll and clears when an integration disconnects.
The branch includes current
master. Sign-out and token-change cleanup use the new repository-card regrouping method and retain the cached-status reset. Existing abandoned feature branches outside the visible, recent set do not keep the overall status failing.Validation on
06dcfcfd31ac068b381bb8b778828fc0900867ef:swift testpasses all 155 tests.SKIP_INSTALL=1 ./build-app.shbuilds and signs the release bundle without replacing the installed app. The isolated app process starts, but the computer-use service times out when inspecting this menu-bar-only app, so a visible menu-bar interaction remains unverified.The configured greploop skill has no reviewer route for
anuj-delta; no bot review is claimed.