Repository navigation
fix(statusline): keep the line file alive across /clear and long-lived sessions - #230
Merged
Merged
Conversation
…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>
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.
Summary
The status line disappeared after
/clearand occasionally in long-lived tmux sessions. The mod's per-session line file could be deleted under a live session (thesession.endhandler on/clear, the 7-day purge of an unchanged file) and nothing rewrote it until the next measure/turn event.session.endhandler (it could delete the new session's file and cancel its poll on/clear)healLineon the idle poll: touch the file, or rewrite it (recreating the directory) when missing.tmp+mvlastGit/lastNowAt/lastLineatsession.startsync-install.sh; bump statusline to 3.2.2Review
/code-review mediumraised 7 findings; triage judged none significant. Two minor ones were fixed (dirReadyreset inhealLine, comment wording). The rest were not real or not worth fixing: per-tickshspawn (same order as the existinggit status), possible.tmpleftovers (weekly purge), timer cancel (session.startalready cancels), stale atoms.Test plan
bash .github/scripts/validate-all.shpasses (6/6)/clearin a session and confirm the line stays; leave a tmux session idle and confirm the file mtime keeps refreshingNot reproduced live. With
gitPollSeconds=0there is no idle poll, so no self-heal.🤖 Generated with Claude Code