Skip to content

fix(statusline): keep the line file alive across /clear and long-lived sessions - #230

Merged
st0nefish-ci[bot] merged 1 commit into
masterfrom
fix/statusline-disappearing
Oct 30, 2026
Merged

st0nefish-ci[bot] merged 1 commit into
masterfrom
fix/statusline-disappearing

Conversation

@St0nefish

Copy link
Copy Markdown
Owner

Summary

The status line disappeared after /clear and occasionally in long-lived tmux sessions. The mod's per-session line file could be deleted under a live session (the session.end handler on /clear, the 7-day purge of an unchanged file) and nothing rewrote it until the next measure/turn event.

  • Remove the session.end handler (it could delete the new session's file and cancel its poll on /clear)
  • healLine on the idle poll: touch the file, or rewrite it (recreating the directory) when missing
  • Atomic write via .tmp + mv
  • Reset lastGit/lastNowAt/lastLine at session.start
  • Update the purge comment in sync-install.sh; bump statusline to 3.2.2

Review

/code-review medium raised 7 findings; triage judged none significant. Two minor ones were fixed (dirReady reset in healLine, comment wording). The rest were not real or not worth fixing: per-tick sh spawn (same order as the existing git status), possible .tmp leftovers (weekly purge), timer cancel (session.start already cancels), stale atoms.

Test plan

  • bash .github/scripts/validate-all.sh passes (6/6)
  • Manual: /clear in a session and confirm the line stays; leave a tmux session idle and confirm the file mtime keeps refreshing

Not reproduced live. With gitPollSeconds=0 there is no idle poll, so no self-heal.

🤖 Generated with Claude Code

…d sessions

The line disappeared after /clear and occasionally in long-lived tmux
sessions. The per-session line file could be deleted out from under a live
session and nothing rewrote it until the next measure/turn event.

- Drop the session.end handler: on /clear it could run after the new session
  started and delete the new session's file and cancel its poll
- Add healLine to the idle poll: touch the file (keeps mtime fresh against the
  7-day purge) and rewrite it, recreating the directory, if it is missing
- Write the line atomically via .tmp + mv so the stub never reads a partial file
- Reset lastGit/lastNowAt/lastLine at session.start so module caches cannot
  outlive the session they describe
- Bump statusline to 3.2.2

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@st0nefish-ci
st0nefish-ci Bot enabled auto-merge October 30, 2026 14:48
@st0nefish-ci
st0nefish-ci Bot merged commit b184a9f into master Oct 30, 2026
8 checks passed
@st0nefish-ci
st0nefish-ci Bot deleted the fix/statusline-disappearing branch October 30, 2026 14:51
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