Repository navigation
fix: pr-bug-scan validated finding from #7050 - #7066
Conversation
|
Ready to review this PR? Stage has broken it down into 2 individual chapters for you:
Chapters generated by Stage for commit b74a663 on Jul 2, 2026 3:37am UTC. |
Added open-only sessions re-poll (SESSION_LIST_POLL_MS) and clear sessionsError on popover close; blocks stale-session (C1) and stuck daemon-unreachable badge (C2).
5cf6c12 to
053dba3
Compare
Greptile SummaryThis automated fix-PR adds a single
Confidence Score: 3/5Safe to merge only for the C2 fix it actually delivers; the C1 stale-session bug the PR claims to fix is still present in the code. The diff only clears sessionsError on popover close, which correctly removes the persistent daemon-unreachable badge after recovery. However, the polling interval at lines 870-872 is untouched and still only calls fetchSnapshot(), never refreshSessions(). Sessions spawned or exited outside the UI remain invisible until the user closes and reopens the popover. Half the stated goal of this fix is undelivered. Files Needing Attention: ResourceUsageStatusSegment.tsx at the setInterval block (lines 870-872): refreshSessions() was not added to the polling callback as the PR description asserts.
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx | Adds a useEffect to clear sessionsError on popover close (C2 fix). C1 (sessions re-poll interval) is absent from the diff despite the PR description claiming it was added. |
Sequence Diagram
sequenceDiagram
participant U as User
participant Pop as Popover (open)
participant Effect as open-effect (interval)
participant IPC as Daemon IPC
U->>Pop: Opens popover
Pop->>IPC: refreshSessions() — once on open
Pop->>IPC: fetchSnapshot() — once on open
loop Every POLL_MS (2 s)
Effect->>IPC: fetchSnapshot() only
Note over Effect,IPC: refreshSessions() NOT called (C1 unfixed)
end
Note over IPC: External session exits or spawns
Note over Pop: sessions array stays frozen (stale)
U->>Pop: Closes popover
Pop->>Pop: clearSessionsError() (C2 fixed)
Note over Pop: sessionsError false, daemonUnreachable false
Comments Outside Diff (1)
-
src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx, line 870-872 (link)C1 fix missing — interval still never calls
refreshSessionsThe PR description states the open-effect interval "now re-runs
refreshSessions, not onlyfetchSnapshot", but this interval is unchanged: it only callsfetchSnapshot(). NoSESSION_LIST_POLL_MSconstant was introduced andrefreshSessionswas not added here. As a result, C1 (externally-exited or newly-spawned sessions not reflected while the popover stays open) is still live —sessionsfreezes at the value from the single on-open call, so terminal counts, orphan badges, and rendered rows remain stale for the entire time the popover is open.
Reviews (1): Last reviewed commit: "fix: address pr-bug-scan validated findi..." | Re-trigger Greptile
…ai#7066) Added open-only sessions re-poll (SESSION_LIST_POLL_MS) and clear sessionsError on popover close; blocks stale-session (C1) and stuck daemon-unreachable badge (C2). Co-authored-by: orca-bug-scan-bot <[email protected]>
Automated fix-PR from pr-bug-scan for parent #7050.
Fixer status:
FIXED_WITH_CODE_PROOFSummary: Added open-only sessions re-poll (SESSION_LIST_POLL_MS) and clear sessionsError on popover close; blocks stale-session (C1) and stuck daemon-unreachable badge (C2).
Blocked proof link:
ResourceUsageStatusSegment.tsx:891 (open-effect interval now re-runs refreshSessions, not only fetchSnapshot) and :838 (sessionsError now cleared on close)Typecheck:
skippedProof (from validator)
code_analysiscode_analysisGenerated by
pr-bug-scan(proof-machine architecture). Human approval required before merge.ELI5
Automated fix: resource usage sessions list could go stale or keep a stuck daemon error. Open popovers re-poll sessions and clear errors on close.