Skip to content

feat: add refreshInterval configuration for Claude Code status line - #297

Merged
sirmalloc merged 2 commits into
sirmalloc:mainfrom
Jaahuo:feat/refresh-interval-config
Apr 17, 2026
Merged

feat: add refreshInterval configuration for Claude Code status line#297
sirmalloc merged 2 commits into
sirmalloc:mainfrom
Jaahuo:feat/refresh-interval-config

Conversation

@Jaahuo

@Jaahuo Jaahuo commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new Configure Status Line menu option when ccstatusline is installed in Claude Code
  • Lets users configure the refreshInterval setting (in seconds) that controls how often Claude Code re-runs the status line command
  • Detects Claude Code version via claude --version and gates the feature behind >=2.1.97 (shows disabled with version requirement message for older versions)
  • Sets a default of 10 seconds on fresh install, preserves existing value on re-install
Screenshot_2026-04-09_15-08-54 Screenshot_2026-04-09_15-09-23 Screenshot_2026-04-09_15-28-39

Changes

  • ClaudeSettings.ts: Add refreshInterval to statusLine interface
  • claude-settings.ts: Add getClaudeCodeVersion(), isClaudeCodeVersionAtLeast(), getRefreshInterval(), setRefreshInterval(), pass version support flag to installStatusLine()
  • RefreshIntervalMenu.tsx: New TUI component with inline numeric input (1-60s range, empty to remove)
  • MainMenu.tsx: Show "Configure Status Line" + "Uninstall" when installed (was single toggle)
  • App.tsx: Wire up new screen, state, error handling with rollback
  • isKnownCommand(): Use path-boundary regex for local dev command matching

Test plan

  • 762 tests pass (bun test)
  • Lint clean (bun run lint)
  • Manual test: Install via TUI, verify refreshInterval=10 in ~/.claude/settings.json
  • Manual test: Configure Status Line → change interval → verify saved
  • Manual test: Configure Status Line → leave empty → verify refreshInterval removed
  • Manual test: With Claude Code <2.1.97, verify option shows disabled with version message

Jaahuo and others added 2 commits April 9, 2026 15:30
Add a new "Configure Status Line" menu option (visible when ccstatusline
is installed) that lets users set the Claude Code statusLine
refreshInterval. The setting is written directly to Claude Code's
settings.json.

- Add refreshInterval to ClaudeSettings statusLine interface
- Add getRefreshInterval/setRefreshInterval utility functions
- Add Claude Code version detection (claude --version) with 5s timeout
- Gate refreshInterval behind Claude Code >=2.1.97 version check
- Default to 10s on fresh install, preserve existing value on re-install
- Show disabled state with version requirement message for older versions
- Add RefreshIntervalMenu TUI component with inline numeric input
- Add isKnownCommand path-boundary matching for local dev commands
- Add comprehensive tests for version detection, install flow, and validation
@sirmalloc
sirmalloc merged commit 298c671 into sirmalloc:main Apr 17, 2026
3 checks passed
@sirmalloc

Copy link
Copy Markdown
Owner

Thanks for this, I'll publish it in the next release

pcvelz added a commit to pcvelz/ccstatusline-usage that referenced this pull request Apr 17, 2026
Bring in upstream changes:
- feat: add refreshInterval configuration for Claude Code status line (sirmalloc#297)
- feat: support xhigh thinking effort level (sirmalloc#314)
- chore(deps-dev): bump the dev-dependencies group (sirmalloc#301, sirmalloc#316)
- chore(deps-dev): bump https-proxy-agent from 7.0.6 to 8.0.0 (sirmalloc#302)
pcvelz added a commit to pcvelz/ccstatusline-usage that referenced this pull request Apr 17, 2026
…2.3.16)

When session usage hit 100% but weekly was still below 100%, the Reset
Timer widget incorrectly showed the weekly reset time (hours/days away)
instead of the session reset countdown (5-hour window).

Session and weekly limits reset independently — session filling up on
its own shouldn't swap the timer to the weekly reset. Extra usage only
kicks in when weekly itself hits 100% (or on a charged [1m] model).

Also folds in:
- Opus 4.6 → 4.7 model references throughout docs, examples, tests
- Upstream sync (5 commits): refreshInterval (sirmalloc#297), xhigh thinking
  effort (sirmalloc#314), dev-dep bumps
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.

2 participants