Grey the dot for a session nobody has prompted yet #26
No reviewers
Labels
No labels
bug
docs
enhancement
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pedromcaraujo/forge!26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "status-dot-grey-fresh"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A brand-new session opened on red. The dot had no notion of "untouched": an empty session answers "idle", and the idle clock was seeded from the transcript's mtime — which is per-directory, so a fresh session in a repo you worked in yesterday was born two minutes stale.
What
Claude's terminal title already carries the answer. Its text is the conversation summary, and it stays the literal
Claude Codeuntil there is one — per-pane, nothing to install, same provenance as the busy/idle glyph. That gets its ownfreshstate and a grey dot.The amber → red escalation goes with it, along with the whole clock behind it (
_idle_since, theidle_forfield, the transcript-age seeding). How long a channel has been sitting there says nothing about whether it wants you; all it reliably did was turn every dot red overnight.Also in here: the command palette left focus behind.
closePalettefocused the iframe window, which xterm doesn't read from — it listens on a hidden textarea, and a channel switch reloads the iframe, so at close time that textarea doesn't exist yet.focusTerm()targets the textarea and retries over the first half second, stopping once focus sticks; wired into palette close, iframe load and actions, so a lazygit popup gets the keyboard too. Skipped on touch, where focusing it is exactly what pops the Android keyboard.Test plan
/statusrun against the live tmux server: an unprompted channel reportsfresh, a summarised oneidle, a spinning onebusy_classifyover real titles —✳ Claude Code→ fresh,⠂ Claude Code→ busy (opening seconds of a first turn beat "untouched"),✳ Bump forge git SHA→ idle, non-claude pane → idleA brand-new session opened on red. The dot had no notion of "untouched", so an empty session answered "idle", and the idle clock was seeded from the transcript's mtime — which is per-directory, so a fresh session in a repo you worked in yesterday was born two minutes stale. Claude's terminal title carries the answer: its text is the conversation summary, and it stays the literal "Claude Code" until there is one. That is per-pane and needs nothing installed, same as the busy/idle glyph. A session in that state gets its own state and its own grey dot. Drop the amber -> red escalation with it, and the whole clock behind it (_idle_since, the idle_for field, the transcript-age seeding). How long a channel has been sitting there says nothing about whether it wants you; all it reliably did was turn every dot red overnight. hollow no session grey session, nothing asked yet green working amber waiting on you Also fix the palette leaving focus behind. closePalette focused the iframe window, which xterm doesn't read from — it listens on a hidden textarea, and a channel switch reloads the iframe, so at close time that textarea doesn't exist yet and the focus lands nowhere. focusTerm() targets the textarea and retries over the first half second, stopping once focus sticks. Wired into palette close, iframe load, and actions, so a lazygit popup gets the keyboard too. Never on touch, where it is exactly what pops the Android keyboard.