fix: stop dashboard auto-exiting + theme key + debug log + settings file#16
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses spurious dashboard exits by treating read -t EOF as a no-op, and adds user-configurable theming plus optional debug logging to help diagnose interactive issues.
Changes:
- Ignore
read -tEOF in the dashboard loop (no longer used as a quit signal) and show a one-time hint when stdin appears unstable. - Add persistent theme support (settings file +
themesubcommand +[t]hotkey in dashboard) with env var override. - Add opt-in debug event logging via
GH_RUNNER_STATUS_DEBUG=1, and document theme/logging in the README.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
gh-runner-status |
Adds settings persistence, theme subcommand/hotkey, debug logging, and changes dashboard EOF handling. |
README.md |
Documents theme configuration options and debug logging usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
You hit two related issues:
Root cause of the auto-exit
read -rsn 1 -t Nreturns rc=1 on EOF. We were treating that as "user pressed Ctrl-D" → arm quit-pending. But bash's read returns rc=1 from any stdin issue: closed fd, terminal multiplexer churn, the gh extension wrapper doing something to stdin. Indistinguishable from a real Ctrl-D press.After a long timeout, getting back-to-back EOFs would interpret as "two Ctrl-D presses → confirmed quit." That's the 60s-ish exit — two refresh cycles where stdin glitched.
Fix: drop Ctrl-D-as-quit entirely. EOF on read is now a no-op with a one-time hint:
qand Esc both still quit reliably (Esc still requires double-press). Trade-off is honest: Ctrl-D detection in bashreadisn't reliable enough to tie to a destructive action.Theme settings
Three ways now, in priority order:
[t]key in the dashboard cycles dark → neon → light → dark, persists automatically.gh runner-status theme {dark|light|neon|next}— CLI subcommand, persists.GH_RUNNER_STATUS_THEME=neonenv var — wins over settings file (one-shot).Settings file at
~/.config/gh-runner-status/settings(key=value), parsed safely (nosource).Debug log
GH_RUNNER_STATUS_DEBUG=1 gh runner-status # events → ~/.local/state/gh-runner-status/debug.logLogs key presses, EOF events, refresh cycles, theme cycles, dashboard entry/exit. Helps diagnose stuff like "why did it auto-exit again" — readable timestamped lines per event.
Test plan
shellcheckcleangh runner-status theme next)gh runner-statusand walking away for 5+ minutes🤖 Generated with Claude Code