Feat/stale session indicator in entire status#853
Merged
gtrrz-victor merged 6 commits intomainfrom Apr 6, 2026
Merged
Conversation
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a “stale (run …)” indicator to entire status so users can spot sessions that appear stuck in ACTIVE due to no interaction for longer than the doctor staleness threshold.
Changes:
- Update
writeActiveSessionsto append a “stale (run …)” hint when a session is considered stuck. - Introduce
isStuckActiveSessionhelper usingstalenessThresholdto detect stuck ACTIVE sessions (withStartedAtfallback whenLastInteractionTimeis nil). - Add unit tests covering stale vs non-stale scenarios and add a yellow style for the warning label.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| cmd/entire/cli/status.go | Adds stale indicator in active sessions output and introduces stuck-session detection helper. |
| cmd/entire/cli/status_test.go | Adds coverage for stale indicator rendering and stuck-session detection logic. |
| cmd/entire/cli/status_style.go | Adds yellow style used by the stale warning label. |
Sessions that are Phase=active with no interaction for >1 hour now show "stale (run 'entire doctor')" in the stats line, matching doctor's staleness criteria. Falls back to StartedAt when LastInteractionTime is nil to avoid false positives on brand-new sessions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 5d2a49b32bc3
Covers: stale with interaction, stale with nil interaction (old start), not stale when recent, not stale when brand-new, and table-driven unit tests for isStuckActiveSession across all phase/time combinations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: cfc2ad475e21
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 8ac73ce5e1d3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 0d5b5f15eac2
The comment incorrectly claimed matching doctor's criteria. Updated to note the intentional fallback to StartedAt for nil LastInteractionTime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: e449dc12bc71
9f92745 to
54390f3
Compare
Contributor
Author
|
@BugBot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 54390f3. Configure here.
…ve() Both doctor and status had duplicate logic for detecting stuck active sessions, with doctor incorrectly flagging brand-new sessions (nil LastInteractionTime) as stuck. Extract shared logic into a method on session.State that falls back to StartedAt, fixing the false positive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 86a7d2cce301
Contributor
Refactor: unified stuck-active detection
|
gtrrz-victor
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

entire statusfor sessions stuck in ACTIVEphase with no interaction for >1 hour
entire doctorto flag stuck sessionsbrand-new sessions
Note
Low Risk
Low risk: changes are limited to CLI display logic for
entire statusplus new unit tests, with no data mutations or security-sensitive behavior.Overview
entire statusnow flags ACTIVE sessions that appear stuck by appending a yellowstale (run 'entire doctor')indicator when there has been no interaction for longer thanstalenessThreshold(1 hour).This adds
isStuckActiveSession(usingLastInteractionTimeand falling back toStartedAtwhen nil to avoid false positives) and extends status styling with a newyellowstyle. Tests were expanded to cover stale detection and the new output in several interaction/start-time scenarios.Reviewed by Cursor Bugbot for commit 54390f3. Configure here.