feat: environment widget, auto-wrap, adaptive detail, usage reset countdown#292
Open
renaissance-dan wants to merge 29 commits intosirmalloc:mainfrom
Open
feat: environment widget, auto-wrap, adaptive detail, usage reset countdown#292renaissance-dan wants to merge 29 commits intosirmalloc:mainfrom
renaissance-dan wants to merge 29 commits intosirmalloc:mainfrom
Conversation
Combines the 55 upstream/main commits with the activity widgets branch. Resolved conflicts by merging both feature sets: activity widgets (tools, agents, todo, activity) from the feature branch with speed, skills, thinking-effort, vim-mode widgets from main. Switched to Map-based widget registry pattern from the activity branch.
The BlockResetTimerWidget is registered as 'reset-timer' (matching upstream/main's widget-manifest), not 'block-reset-timer'.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…isplay When the API is unavailable (e.g. Claude Max plans with no API key), SessionUsage and WeeklyUsage now read rate_limits from stdin JSON. Reset timers show remaining time until the usage window resets. formatUsageDuration extended to support day-scale durations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t, update usage descriptions
…ccstatusline:configure commands
Tests for ContextBar, GitBranch, and Environment widgets need explicit terminalWidth: 160 to get wide-mode output, matching pre-detail-level expected values.
…I type and test errors
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…un compatibility)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Enables users to install ccstatusline via: claude plugin marketplace add renaissance-dan/ccstatusline claude plugin install ccstatusline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Setup skill now validates the binary exists and executes before writing config, checks if an existing statusLine is already working before overwriting, and prioritizes local plugin path over cache. Added `prepare` script so dist/ gets built automatically after git clone + install, fixing the issue where cached plugins have source but no build artifacts. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
About the diff size
This PR is ~9,700 lines but most of that isn't new. The breakdown:
feature/activityWidgetsbranch (merged in as a dependency)If you'd prefer a PR scoped to just the new features targeting
feature/activityWidgetsinstead ofmain, happy to restructure.New features (our ~1,250 lines)
Environment widget — shows counts of loaded CLAUDE.md files, MCP servers, rules, and hooks. Hides when all counts are zero. Follows existing widget patterns (rawValue, maxWidth, ActivityWidthEditor, custom keybinds). Config counting logic ported from claude-hud.
Auto-wrap — when widgets on a line exceed terminal width, they wrap to the next line at separator boundaries instead of truncating with
.... Leading/trailing separators are dropped on wrapped lines. Controlled byautoWrapsetting (default: true). Standard mode only — powerline unchanged.Adaptive detail levels — widgets adjust verbosity based on terminal width. Wide (>=100 cols): full labels, 16-char progress bars, token counts. Medium (>=60): compact 8-char bars, short labels. Narrow (<60): text-only percentages. Applies to ContextBar, SessionUsage, WeeklyUsage, Model, GitBranch, Environment.
Usage reset countdown — SessionUsage and WeeklyUsage widgets now show time until reset (e.g., "resets 2hr 15m"). Note: the stdin
rate_limitsfallback itself already exists in main via #253 — this just adds the countdown display.Plugin structure —
.claude-plugin/manifest andcommands/for/ccstatusline:setupand/ccstatusline:configureslash commands.New files
src/utils/environment-counter.ts— config counting utilitysrc/utils/detail-level.ts— detail level utilitysrc/widgets/Environment.ts— Environment widgetsrc/widgets/__tests__/Environment.test.tssrc/utils/__tests__/environment-counter.test.ts.claude-plugin/plugin.json— Claude Code plugin manifestcommands/setup.md—/ccstatusline:setupslash commandcommands/configure.md—/ccstatusline:configureslash commandTests