Skip to content

fix(statusline): keep the status line up across /clear and harden against dropouts - #242

Merged
st0nefish-ci[bot] merged 1 commit into
masterfrom
worktree-wip-statusline-survive-clear
Nov 11, 2026
Merged

st0nefish-ci[bot] merged 1 commit into
masterfrom
worktree-wip-statusline-survive-clear

Conversation

@St0nefish

Copy link
Copy Markdown
Owner

Summary

The status line went blank after /clear or /new, and occasionally dropped segments (user@host, branch, inbox flags). Per the mod API, session.start never fires on /clear, so nothing wrote the new session id's line file until the next poll, and the stub prints nothing without it.

  • Carry the last line to the new session id within 500 ms of a /clear (id watcher), so the stub always finds a file.
  • Serialize line writes: overlapping publishes shared one .tmp, and a rename between truncate and write could leave an empty file (blank line).
  • session.start loads are independent (allSettled): one failing read no longer skips the publish or the pollers; a model-only line renders before the first usage reading.
  • user@host retried (throttled to 30 s) until it lands; empty id/hostname output rejected.
  • A failed git status in a known repo keeps the last value instead of dropping the branch; status now uses --no-optional-locks.
  • Inbox flags stay when the state file is unreadable (vs. absent).
  • Rate-limit windows carried forward until their reset time.
  • statusline 3.5.0 -> 3.5.1.

Test plan

  • bash .github/scripts/validate-all.sh passes; claude plugin validate plugins-claude/statusline passes.
  • Review: two passes (high, medium), findings triaged, real ones fixed.
  • Not run in a live session; tsc is not available here, so no standalone type-check.
  • Known trade-off: right after /clear the carried-over line briefly shows the old context % and cost until the first usage update.

🤖 Generated with Claude Code

https://claude.ai/code/session_018KC1pVGuHWxKo5CbsdGfm8

…inst dropouts

session.start never fires on /clear, so the new session id had no line file
until the next poll and the stub printed nothing. Other paths could also blank
the line or drop segments.

- carry the last line to the new session id within 500ms of a /clear
- serialize line writes (overlapping publishes could leave an empty file)
- load session.start inputs independently so one failure cannot skip the
  publish or the pollers; render a model-only line before the first usage
- retry user@host until it lands (throttled), reject empty id/hostname output
- keep the last git value when status fails in a known repo
  (and use --no-optional-locks so the poll never contends with the user's git)
- keep inbox flags when the state file is unreadable rather than absent
- carry rate-limit windows forward until their reset time
- bump statusline to 3.5.1

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018KC1pVGuHWxKo5CbsdGfm8
@st0nefish-ci
st0nefish-ci Bot enabled auto-merge November 11, 2026 23:20
@st0nefish-ci
st0nefish-ci Bot merged commit 10e3aa2 into master Nov 11, 2026
8 checks passed
@st0nefish-ci
st0nefish-ci Bot deleted the worktree-wip-statusline-survive-clear branch November 11, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant