Skip to content

Add sparkline history and reset time toggle#9

Merged
tylergraydev merged 2 commits into
mainfrom
feature/sparkline-and-time-toggle
Feb 23, 2026
Merged

Add sparkline history and reset time toggle#9
tylergraydev merged 2 commits into
mainfrom
feature/sparkline-and-time-toggle

Conversation

@tylergraydev

Copy link
Copy Markdown
Owner

Summary

Two new features for the block segment:

1. Reset Time Toggle

Show either time remaining or absolute reset time:

  • timeDisplay: "remaining" (default) - Shows "3h20m"
  • timeDisplay: "absolute" - Shows "2:30pm" or "14:30"
  • timeFormat: "12h" | "24h" - Configure 12/24 hour format

2. Sparkline History

Visual usage trend using block characters:

  • showSparkline: boolean (default false)
  • sparklineWidth: number (default 8)
  • Stores history in ~/.claude/limitline-history.json
  • Shows last 24 hours of usage data
  • Characters: ▁▂▃▄▅▆▇█

Example Output

With sparkline enabled:

◫ 29% ▁▂▃▄▅▆▇█ (3h)

With absolute time (12h):

◫ 29% (2:30pm)

With absolute time (24h):

◫ 29% (14:30)

Configuration Example

{
  "block": {
    "enabled": true,
    "timeDisplay": "absolute",
    "timeFormat": "12h",
    "showSparkline": true,
    "sparklineWidth": 8
  }
}

Test plan

  • Run npm test - 178 tests pass
  • Run npm run build - builds successfully
  • Test absolute time display with both 12h and 24h formats
  • Test sparkline after multiple runs to build up history

🤖 Generated with Claude Code

xicv pushed a commit to xicv/claude-limitline that referenced this pull request Feb 19, 2026
Add two new block segment features:
- timeDisplay option: show "remaining" (3h20m) or "absolute" (2:30pm) reset time
- Sparkline history: visual usage trend (▁▂▃▄▅▆▇█) stored in ~/.claude/limitline-history.json

Based on tylergraydev#9

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tyler Gray and others added 2 commits February 22, 2026 18:05
New features:
- Reset time toggle: Show either time remaining ("3h20m") or absolute reset time ("2:30pm")
  - Config: `block.timeDisplay: "remaining" | "absolute"`
  - Config: `block.timeFormat: "12h" | "24h"`

- Sparkline history: Visual usage trend using block characters (▁▂▃▄▅▆▇█)
  - Config: `block.showSparkline: boolean` (default false)
  - Config: `block.sparklineWidth: number` (default 8)
  - Stores usage history in ~/.claude/limitline-history.json
  - Shows last 24 hours of usage data

Example output with sparkline:
  ◫ 29% ▁▂▃▄▅▆▇█ (3h)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@tylergraydev
tylergraydev force-pushed the feature/sparkline-and-time-toggle branch from e3f0920 to 2ef0614 Compare February 22, 2026 23:08
@tylergraydev
tylergraydev merged commit 3e0c370 into main Feb 23, 2026
3 checks passed
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