文件历史

30 次代码提交

作者 SHA1 备注 提交日期
Matthew Breedlove 860df1763c Version bump and docs update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
Publish / Publish to npm (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-07-20 02:39:55 -04:00
Vishnu J a523195573 feat(renderer): add left/right option for Default Padding (#497)
* feat(renderer): add left/right option for default padding

The Default Padding setting always applied to both sides of a widget.
Add a defaultPaddingSide setting (both/left/right, default both) so
padding can be narrowed to one side without affecting the other,
matching the request in #482.

Both the standard and Powerline renderers honor the new option, and
alignment width accounting (calculateMaxWidthsFromPreRendered) counts
only the sides that are actually applied. Existing configs are
unaffected: defaultPaddingSide defaults to 'both', preserving current
rendering exactly.

* test(renderer): strip ANSI in padding-side assertions, cover merge + TUI cycle

Independent review found the padding-side tests asserted exact strings
against chalk-wrapped padding output, which breaks under FORCE_COLOR=1
since chalk.reset() reacts to ambient color support, not the Settings
colorLevel used elsewhere in the file. Strip SGR codes before every
assertion, matching the repo's existing convention (stripSgrCodes in
renderer-flex-width.test.ts and the separator-collapse tests). Verified
passing under both FORCE_COLOR=1 and NO_COLOR=1.

Also add the two coverage gaps called out in review:
- merge:'no-padding' regression tests (standard + Powerline) proving no
  double-pad and correct glue across a no-padding merge boundary for
  both the 'left' and 'right' padding sides.
- a GlobalOverridesMenu TUI test for the (d) cycle, mirroring the
  existing (m) minimalist-mode pattern.

---------

Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-07-19 23:34:56 -04:00
Treebird 98e3c8bbbc docs: add ccsessions / cc-session-num integration example (#483)
Adds ccsessions to Related Projects in README and a new Integration
Example section in USAGE.md showing how to wire the cc-session-num
companion script as a Custom Command widget to display the current
session rank (#1, #2, …) in the status line.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-07-19 23:24:49 -04:00
Matthew Breedlove 1af051e207 Version bump and docs update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
Publish / Publish to npm (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-07-10 17:49:05 -04:00
Zach Landquist 745299d819 feat(compaction): add a metric selector for composable sub-values (#457)
* feat(compaction): add a metric selector for composable sub-values

compaction-counter only emitted the full composite line. A new `metric` metadata selector (count|auto|manual|unknown|reclaimed) makes one instance emit a single raw value, so several can be composed with custom separators/symbols, following the existing skills `mode` / context-bar `display` metadata-mode precedent. Default `count` keeps the composite display unchanged; sub-metrics render a bare number (reclaimed via formatTokens) and respect hideZero on the selected value.

Closes #450

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(compaction): use reachable metric keybind

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-07-10 17:42:16 -04:00
ekkoitac 460c2519d9 fix: invert plain usage percentages (#473)
* fix: invert plain usage percentages

* fix: clarify usage direction controls

---------

Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-07-10 16:23:28 -04:00
CC d47b7bd902 feat(context): make the context-window fallback configurable (#480)
Motivated by #429. The context widgets already read the real window from Claude Code's context_window.context_window_size when present, and from a [1m]-style model-name hint otherwise; only the final fallback was a hard-coded 200k. On an older Claude Code that does not report the window size for a 1M-context model, that fallback made the bar read against 200k (e.g. 750k/200k, pinned full).

Demote the hard-coded 200k to the default of a configurable last-resort fallback, CCSTATUSLINE_CONTEXT_SIZE_FALLBACK (positive integer, ignored when unset or invalid), mirroring CCSTATUSLINE_WIDTH. The live status field and model-name hint still take precedence, so the override only applies when the window is otherwise unknown.
2026-06-30 13:22:34 -04:00
CC cea4d3c9fd feat(widget): add optional glyph to Current Working Dir (#479)
Wire the shared symbol-override module into the Current Working Dir widget so it exposes the same (g)lyph option the Git and JJ widgets use. The default symbol is empty, so existing output is unchanged and no glyph is emitted unless the user sets one. The glyph also applies in raw value mode, so pairing it with raw value replaces the cwd: label with the chosen icon (e.g. a Nerd Font folder glyph).

Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-06-30 11:48:26 -04:00
Matthew Breedlove 30de97505f Version bump and docs update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
Publish / Publish to npm (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-06-16 02:00:58 -04:00
Matthew Breedlove 6d4f10a273 docs(thinking-effort): clarify ultracode xhigh reporting 2026-06-15 04:20:27 -04:00
Matthew Breedlove 29895206d7 Version bump and docs update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
Publish / Publish to npm (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-06-15 02:45:16 -04:00
CC 3c1f472598 feat(compaction): opt-in trigger split and tokens reclaimed (#445)
* refactor(compaction): compute stats struct (count, byTrigger, tokensReclaimed) from markers

Parse compactMetadata.{trigger,preTokens,postTokens} during the existing
compact_boundary scan. No widget behavior change yet.

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(compaction): freeze zero stats, floor reclaimed at 0, clarify naming

Address review feedback on the data layer: freeze the shared
ZERO_COMPACTION_STATS (incl. nested byTrigger); floor each marker's reclaimed
contribution with Math.max(0, ...) so postTokens>preTokens can't go negative;
rename metaObj -> metaRecord; add unknown-trigger and negative-reclaim tests.

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(compaction): opt-in trigger split via (s) keybind

Adds a per-item showTriggers toggle that appends '(2 auto, 1 manual)';
unknown bucket shown only when > 0; omitted at count 0. Rendering now flows
through formatStats, shared by live render and preview.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(compaction): clarify zero-suffix test name; cover manual-only bucket

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(compaction): opt-in tokens reclaimed via (t) keybind

Adds a per-item showReclaimed toggle that appends the reclaimed token total
(e.g. 887.0k) via the shared formatTokens humanizer; omitted when 0. Stacks
independently with the trigger split.

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: extract formatTokens to a leaf module to avoid a circular import

CompactionCounter importing formatTokens from renderer.ts created a cycle
(renderer -> widget registry -> CompactionCounter) that broke isolated runs of
its test file with a TDZ error. Move formatTokens into src/utils/format-tokens.ts;
renderer re-exports it so existing importers are unaffected.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(compaction): cover tokens reclaimed with a non-default format

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(compaction): document trigger-split and tokens-reclaimed toggles

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(compaction): apply code-review feedback

- use shared isMetadataFlagEnabled/toggleMetadataFlag for the trigger/reclaimed
  flags instead of local copies
- freeze SAMPLE_STATS to match ZERO_COMPACTION_STATS
- guard tokensReclaimed against non-finite (overflow) marker differences
- docs: note the unknown trigger bucket and that reclaimed is floored/omitted at 0

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(compaction): carry the formatTokens rounding fix into the extracted leaf

The reclaimed display calls formatTokens; the extracted format-tokens.ts held the
pre-fix version, so a reclaimed total in [999950, 999999] rendered '1000.0k'
instead of '1.0M'. Apply the same threshold fix as PR #444 here, so the reclaimed
figure is correct and merging both PRs in either order cannot regress it.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-15 02:11:32 -04:00
CC dd820ea42f feat(custom-command): include terminal_width in stdin JSON (#396)
* feat(custom-command): include terminal_width in stdin JSON

Custom Command widgets receive context.data as JSON over stdin, but the
terminal width was not part of it, so scripts had no way to adapt their
output to the terminal (tput/stty/$COLUMNS all return 80 in the piped
context).

Populate context.terminalWidth once in the render pipeline via
getTerminalWidth() (which also lets the renderer reuse it instead of
re-probing per line) and add terminal_width to the JSON piped to custom
commands when a numeric width is known. The field name uses snake_case
to match the existing Claude Code payload (session_id, current_dir, ...).

Resolves the request in upstream issue #308.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(custom-command): document terminal_width in stdin JSON

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-06-14 03:44:17 -04:00
Martijn Riemers 7db0914856 feat: add Extra Usage Used widget showing spent overage budget (#417)
* fix: format extra usage in the currency reported by the usage API

The usage API reports the account's billing currency
(extra_usage.currency, e.g. "EUR"), but ExtraUsageRemaining always
formatted with a hardcoded dollar sign, showing non-USD budgets with
the wrong symbol.

Parse the currency field through the API response schema, file cache,
and prefetch merge, and format the remaining budget with
Intl-based currency formatting (falling back to USD when the field is
absent or invalid, preserving current output for USD accounts).

Fixes #415

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat: add Extra Usage Used widget showing spent overage budget

The usage API's extra_usage.used_credits is already fetched and cached
(extraUsageUsed), but no widget could display it. Accounts with extra
usage enabled and no monthly limit configured get neither of the
existing widgets (both require limit-derived fields), so the spent
amount is the only displayable extra usage number for them.

Adds an extra-usage-used widget modeled on extra-usage-remaining,
including the hide-if-disabled toggle and raw value support.

Closes #414

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat: format Extra Usage Used with the API-reported currency

Builds on the formatUsageCurrency helper from the currency fix so the
new widget shows the account's billing currency too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-06-14 03:39:02 -04:00
CC df25207d18 fix(compaction): count compact_boundary markers instead of inferring from context-% drops (#425)
* feat(compaction): add marker-based compaction counting

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(compaction): count markers instead of inferring from context-% drops

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(compaction): remove obsolete context-%-drop heuristic and cache

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(compaction): pin explicit isSidechain:false; docs: marker-count wording

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-06-14 03:12:56 -04:00
Zach 8ae6481f25 feat: allow overriding widget symbols with a custom glyph (#431)
* feat: allow overriding widget symbols with a custom glyph

Extends the item.character override (already honored by Git
Staged/Unstaged/Untracked) to every widget with a hardcoded symbol and
makes it editable in the TUI.

- Add src/widgets/shared/symbol-override.tsx: shared (g)lyph keybind,
  symbol/prefix helpers, and a slot-based editor (type a character or
  emoji, Backspace renders without a symbol, choosing the default clears
  the override); single-symbol widgets store on item.character,
  multi-symbol widgets keep per-part metadata keys
- Wire it into Git Branch (⎇), Git Worktree (𖠰), Git Worktree Mode (⎇),
  Git Conflicts (⚠), JJ Bookmarks (🔖), JJ Workspace (◆), the three
  presence widgets that already supported item.character, and the
  multi-symbol widgets Git Ahead/Behind (↑/↓) and Git Status (!+*?)
- Add preview-path render coverage for default/override/suppressed plus
  helper unit tests; document the keybind in docs/USAGE.md

Co-authored-by: Claude <noreply@anthropic.com>

* fix: align glyph editor labels

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-06-14 02:56:45 -04:00
Matthew Breedlove 28d98e320c Version bump and README update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
Publish / Publish to npm (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-06-13 23:53:36 -04:00
Cameron Sjo 97108fc1ea feat: Gradient color support and line-spanning foreground gradient overrides (#406)
* feat: line-spanning foreground gradients via overrideForegroundColor

Add a `gradient:<stop>,<stop>,...` form for `overrideForegroundColor` that
paints the whole status line with a continuous gradient — each visible
character is colored by its column position, so the gradient spans the line
rather than restarting per widget. Applies to standard (non-powerline) lines;
powerline separators derive their color from adjacent backgrounds, so a
foreground gradient is intentionally not applied there.

- src/utils/gradient.ts: parse hex stops (`hex:RRGGBB` / `#RRGGBB` / bare),
  interpolate in OKLab for perceptually even, non-muddy blends, and map to
  truecolor or the nearest ansi256 index.
- src/utils/ansi.ts: applyLineGradient walks the assembled line with the
  existing escape/cluster tokenizer, so SGR styling and OSC-8 hyperlinks pass
  through untouched and visible width is unchanged (flex layout unaffected).
- src/utils/renderer.ts: applied after assembly and before truncation in the
  standard path. `overrideForegroundColor` accepts the new `gradient:` form
  alongside the existing `hex:` / `ansi256:` / named tagged-string forms; a
  gradient spec is not treated as a per-widget solid color and degrades to a
  no-op at ansi16 (keeping widgets' own colors).

Tests cover spec parsing, OKLab sampling, ansi256 quantization,
width-invariance, OSC-8 passthrough, and a renderer integration case.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat: add per-widget gradients + presets + TUI picker on the line-span core

Converges the two same-day gradient PRs into one coherent feature. #406
added line-spanning gradients via overrideForegroundColor (OKLab, zero-dep);
#404 (@akkaz) added gradient as a per-widget color with named presets and a
ColorMenu picker. Both created src/utils/gradient.ts and would conflict, so
this meshes them onto a single shared OKLab engine:

- gradient.ts: GRADIENT_PRESETS (akkaz's stops, gradient-string MIT;
  rainbow/pastel re-expressed as multi-stop hue wheels for OKLab); unified
  parseGradientSpec accepting presets, dash (RRGGBB-RRGGBB), and comma
  (hex:..,..) forms; applyGradientToText for the per-widget sweep.
- colors.ts: per-widget gradient hook in applyColors; getColorAnsiCode
  collapses a gradient to its first stop (powerline / ansi16 degrade).
- ColorMenu.tsx: 'g' opens a gradient picker (preset list + custom hex),
  foreground-only, colorLevel >= 2.
- No new dependency (tinygradient dropped in favor of OKLab).

Precedence: overrideForegroundColor gradient (line-span) > widget.color
gradient (per-widget) > solid. Gradients self-degrade at render time, so
color-sanitize leaves them untouched at every level.

Builds on the per-widget design from #404 by @akkaz.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: akkaz <giomarco@cleversoft.it>

* refactor: polish gradient feature — fix truncation reset-leak, tighten, document

Pre-PR polish pass over the gradient feature.

Fix (correctness):
- renderStatusLine now applies the line-span gradient AFTER truncation, not
  before. truncateStyledText cuts from the right and appends a raw "..." with no
  trailing reset, so a gradient applied earlier had its closing \x1b[39m sliced
  off, leaking the last color past the status line. Gradient codes are zero-width,
  so the truncation measurement is unaffected by deferring. Regression test added.

Simplify:
- Add exported isGradientSpec(); reuse it across colors.ts and renderer.ts instead
  of duplicating the 'gradient:' startsWith check. Drop the redundant prefix guard
  in applyColors (parseGradientSpec already self-guards).

Docs:
- Document applyGradientToText's code-point (vs grapheme-cluster) iteration as a
  known limitation, with the ZWJ/variation-selector consequence and the
  circular-import reason it isn't unified with applyLineGradient yet.
- Note that hex:/# /bare stops are valid in both comma and dash parse forms.
- Note getColorAnsiCode's ansi16 branch intentionally emits a truecolor first-stop
  escape (caller-degraded; never reached at a true ansi16 terminal).
- README + docs/USAGE.md: gradient color options (both scopes, presets, forms).

bun test 1433 pass / 0 fail; lint + tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(gradient): preserve escape sequences in widget gradients

Keep ANSI and OSC control sequences byte-for-byte intact when applying per-widget gradients so hyperlinks and pre-styled widget output are not corrupted by inserted SGR codes.

Count and color only visible non-whitespace characters while passing escape sequences through unchanged. Add a regression covering styled OSC 8 link output.

* fix(colors): suppress gradient fallback at ansi16

Prevent stored gradient color specs from emitting 24-bit SGR codes when the active terminal color level has been reduced to Basic or No Color.

Leave gradient settings intact, but return no gradient ANSI fallback at ansi16 and cover the behavior in per-widget and raw-code regression tests.

* fix(renderer): detect truncated gradient lines visibly

Preserve truncation reporting after whole-line gradients insert SGR codes between the ellipsis characters.

Check the visible text for the truncation marker instead of the raw styled bytes, and add a regression where the rendered line no longer contains a literal contiguous ellipsis.

* feat(tui): add gradients to foreground overrides

Let Global Overrides assign a whole-line foreground gradient through the same preset/custom selector used by the color screen.

Move (g) to gradient selection, add (x) as the foreground override clear key, show gradient override values in the menu, and update usage docs for the new controls and Basic/No Color degradation behavior.

In Powerline mode, carry global gradient position continuously across widget text while leaving separators and caps under Powerline contrast rules. Surface an active foreground override warning on the Powerline Setup screen so theme masking is visible.

---------

Co-authored-by: Cameron Sjo <cameronsjo@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: akkaz <giomarco@cleversoft.it>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-06-13 18:56:09 -04:00
Daniel Naves de Carvalho ea97ddd69e feat(terminal): honor CCSTATUSLINE_WIDTH env var to override probe (#380)
* feat(terminal): honor CCSTATUSLINE_WIDTH env var to override probe

Provide an explicit width override so users can bypass the TTY probe
entirely when both ancestor-walk and `tput cols` fall through.

This is the fallback case the existing probe cannot solve on its own:
Claude Code >= 2.1.139 spawns statusline/hooks without terminal access,
and in some configurations (IDE integrations, nested shells, certain
agent-mode spawn paths) no ancestor process owns a TTY either. The
ancestor walk fails, `tput cols` returns 80, and the multi-line layout
truncates regardless of the actual iTerm2/terminal width.

PR #377 (`stty -F`/`stty -f`) covers the case where an ancestor does
hold a TTY but the legacy `< /dev/tty` form errors with ENOTTY. This
patch is complementary -- it handles the case where the ancestor walk
finds no TTY at all -- and gives users a knob today while upstream
work on passing `terminalWidth` via stdin JSON (#308) lands.

Change
------

`src/utils/terminal.ts` -- `probeTerminalWidth` now reads
`CCSTATUSLINE_WIDTH` before any platform check or probe. A valid
positive integer short-circuits with that value; anything else
(missing, empty, non-numeric, zero, negative) falls through to the
existing probe logic.

Usage
-----

Set the env var on the statusLine command in `~/.claude/settings.json`:

```json
"statusLine": {
  "type": "command",
  "command": "CCSTATUSLINE_WIDTH=200 ccstatusline"
}
```

Tests
-----

Four new cases in `src/utils/__tests__/terminal.test.ts`:

- override short-circuits probing entirely
- non-positive override (`0`) falls back to probing
- non-numeric override falls back to probing
- override applies on Windows where probing is otherwise disabled

`bunx vitest run src/utils/__tests__/terminal.test.ts` -> 12/12 pass.
Full-suite delta vs `main`: 4 new passing tests, zero new failures
(the pre-existing 105 env-specific failures in other suites are
unchanged on both branches).

`bun run lint` -> clean.

* docs: document terminal width override

---------

Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-05-17 03:01:58 -04:00
Matthew Breedlove cf5ab7be45 chore: Version bump and docs update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
Publish / Publish to npm (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-05-15 09:42:38 -04:00
Matthew Breedlove f198e72a62 Version bump and doc update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-05-11 03:28:05 -04:00
Sam Hopkins 29c47242a8 feat: add weekly Sonnet and Opus usage widgets (#361)
* feat: add weekly Sonnet and Opus usage widgets

* Fix per-model usage prefetch fallback

* Fix per-model usage cache handling

---------

Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-05-11 02:17:49 -04:00
Bentley(중길) 23b01a3877 docs: add AIWatch integration example (Custom Command + Related Projects) (#365)
Adds a "Integration Example: AIWatch" section to docs/USAGE.md mirroring
the existing ccusage section, plus a Related Projects link in README, per
the placement the maintainer chose in #362.

AIWatch (ai-watch.dev) monitors live status for 30+ AI APIs/apps; the
Custom Command one-liner surfaces degraded providers in the status line
and renders empty when everything's operational.

Co-authored-by: Bentley <bentley@naemomlab.com>
2026-05-11 01:48:40 -04:00
Matthew Breedlove af87d5594b Version bump and doc update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-04-28 02:10:43 -04:00
Matthew Breedlove 1f26e52e80 Version bump and doc update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-04-28 00:06:52 -04:00
Matthew Breedlove 48bc4208fb Version bump and doc update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-04-27 02:03:30 -04:00
Edison 316d727c0f feat: support absolute datetime for reset timers (#220)
* feat: add date mode for block and weekly reset timers

* fix(tui): avoid reset timer timestamp keybind conflict

Use t for timestamp mode so d remains the editor delete shortcut, and hide the weekly hours-only toggle while timestamp mode is active.

---------

Co-authored-by: Fan Bot <clawbot@Fandexuniji.local>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-04-27 00:31:29 -04:00
Matthew Breedlove eb1f0d17f0 Version bump and doc update
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-04-26 23:48:45 -04:00
Justin Mecham afbbf66b3a feat: support GitLab in Git Branch and Git PR widgets (#330)
* feat(git-branch): support GitLab and self-hosted hosts for branch link URLs

Replace the GitHub-only parseGitHubBaseUrl helper with a forge-agnostic
buildBranchWebUrl built on the existing parseRemoteUrl + RemoteInfo
plumbing in git-remote.ts. GitBranch links now work for GitHub, GitLab,
and compatible self-hosted remotes that expose the standard
host/owner/repo path.

Uses a single /tree/<branch> suffix because GitLab redirects it to its
canonical /-/tree/<branch> form, so one format covers both forges.

parseGitHubBaseUrl and its helper were the only GitHub-specific URL
builders in hyperlink.ts; remove them and their tests now that GitBranch
is the only caller and has been migrated.

Also rename the metadata key linkToGitHub to linkToRepo to match the
naming used by GitOriginOwnerRepo / GitOriginRepo / GitUpstreamOwner.
Legacy linkToGitHub is preserved as a read-only fallback: toggling the
modifier strips both keys and writes only linkToRepo, so users who
interact with the feature get their settings quietly upgraded. Explicit
linkToRepo:false wins over legacy linkToGitHub:true.

* feat(git-pr): support GitLab merge requests via glab

Replace the GitHub-only gh-pr-cache with a forge-aware git-review-cache.
The widget now renders pull requests for GitHub (via `gh`) and merge
requests for GitLab (via `glab`), picking the CLI per-repo based on the
origin remote host:

- host contains `github` → `gh`
- host contains `gitlab` → `glab`
- unknown/self-hosted host → probe each CLI with
  `gh/glab auth status --hostname <h>` and use whichever is authenticated
  against that host; if neither is, stay quiet rather than fire wasted
  queries
- no origin remote → try both and let the CLI resolve the repo itself

For forks where the CLI would default-resolve to the parent repo, the
fetch falls back to `--repo <origin-url>` after an empty first query so
the user's fork PR/MR is still found.

GitPr.ts now records the provider on the cache entry and renders "MR #N"
for glab and "PR #N" for gh; raw mode stays `#N` for both. Widget display
name becomes "Git PR/MR".

Also rename the widget `type` from `git-pr` to `git-review` to match the
internal `git-review-cache` name. Legacy `git-pr` configs keep rendering
via a resolver in widgets.ts, and loadSettings silently rewrites them to
`git-review` in-memory so the canonical name lands on the next save —
same pattern as the linkToGitHub → linkToRepo rewrite in the previous
commit.

* docs(usage): describe GitHub and GitLab behavior for Git widgets

Update the Git-section intro to mention both forges and the CLI-selection
rules used for self-hosted hosts, and note on the Git PR keybind line
that the widget renders "MR" for GitLab origins.

* chore(gitlab-support): trim verbose comments to match repo style

Most of this repo's TS files carry zero or a handful of one-line comments;
the verbose rationale blocks added during the GitLab work (multi-paragraph
JSDocs on buildBranchWebUrl, getProviderCandidates, fetchFromProvider, etc.
and long inline explainers in the tests) stood out. Trim them to short
one-liners where the why is genuinely non-obvious, and drop the rest.

* fix(git-review): preserve self-hosted remote ports

* fix(tui): clamp status preview to terminal width

---------

Co-authored-by: jmecham <jmecham@foundrydigital.com>
Co-authored-by: Matthew Breedlove <sirmalloc@gmail.com>
2026-04-23 23:59:41 -04:00
Matthew Breedlove 497b30e0bf Version bump, README cleanup
CI / Lint & Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-04-08 13:21:35 -04:00