Repository navigation
fix(statusline): treat COLUMNS=0 as no width, not a zero budget - #3318
Merged
Merged
Conversation
`terminal_dimensions()` parsed `COLUMNS` into the width unconditionally, so `COLUMNS=0` returned `Some((0, None))`. The statusline then subtracted its UI margin, collapsed the content budget to zero, and dropped every segment — rendering an empty line instead of falling through to the untruncated render the docstring promises for "no detectable width". Treat a zero `COLUMNS` as absent (return `None`), so absurd values render untruncated like a missing `COLUMNS`. Follow-up to #3286, which introduced the `COLUMNS`-based statusline sizing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
max-sixty
enabled auto-merge (squash)
June 29, 2026 08:28
This was referenced Jun 29, 2026
Merged
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
worktrunk 0.64.0
Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`
---
Created with `brew bump-formula-pr`.<details>
<summary>release notes</summary>
<pre>## Release Notes
### Improved
- **`{{ git.branch.* }}` template namespace for custom columns**: `wt list` custom columns can now read a branch's own git config via `{{ git.branch.<key> }}` — both convention keys you set yourself (`branch.<name>.jira`) and the git-native `branch.<name>.description` — without re-storing the values through `wt config state vars set`. It complements `{{ vars.* }}`, which reads only worktrunk's own state namespace. ([#3319](max-sixty/worktrunk#3319), thanks @cazador481 for the request)
- **Faster warm-cache `wt list` re-runs**: A repeat `wt list` (with `.git/wt/cache/` already populated) is ~36% faster, by removing redundant per-row git subprocesses — priming the commit→tree cache from the `%ct` batch already issued, persisting merge-base results to a content-addressed on-disk cache, and seeding worktree roots and git-dirs from the single `git worktree list` instead of re-forking `git rev-parse` per worktree. ([#3334](max-sixty/worktrunk#3334))
### Fixed
- **Refs that look like flags can't inject git options**: `wt`'s `git diff` previews and diffstats (picker diff previews, `show_diffstat`, push diffstat) now fence user-controlled refs behind `--end-of-options`, and branch removal (`git branch -D`) passes them after `--`, so a branch literally named like a flag (`-x`, `--foo`) reaches git as a positional ref instead of being misparsed as an option. ([#3317](max-sixty/worktrunk#3317))
- **Statusline renders untruncated when `COLUMNS=0`**: `wt list statusline` treated `COLUMNS=0` as a zero-width budget and dropped every segment, rendering an empty line. A zero or unparsable `COLUMNS` is now treated as no detectable width, so the line renders everything untruncated — as the statusline sizing already documented for a missing width. ([#3318](max-sixty/worktrunk#3318))
- **Watchdog "still waiting" line uses the hint symbol**: The transient `Waiting for the commit message (Ns)` line shown during a slow `wt step commit` LLM call now uses the hint prefix (`↳`) instead of the info symbol (`○`), matching the convention for fully-dim status lines. ([#3330](max-sixty/worktrunk#3330))
## Install worktrunk 0.64.0
### Install prebuilt binaries via shell script
```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-installer.sh | sh && wt config shell install
```
### Install prebuilt binaries via powershell script
```sh
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-installer.ps1 | iex"; git-wt config shell install
```
### Install prebuilt binaries via Homebrew
```sh
brew install worktrunk && wt config shell install
```
## Download worktrunk 0.64.0
| File | Platform | Checksum |
|--------|----------|----------|
| [worktrunk-aarch64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-aarch64-apple-darwin.tar.xz) | Apple Silicon macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-aarch64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-apple-darwin.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-x86_64-apple-darwin.tar.xz) | Intel macOS | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-x86_64-apple-darwin.tar.xz.sha256) |
| [worktrunk-x86_64-pc-windows-msvc.zip](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-x86_64-pc-windows-msvc.zip.sha256) |
| [worktrunk-aarch64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-aarch64-unknown-linux-musl.tar.xz) | ARM64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-aarch64-unknown-linux-musl.tar.xz.sha256) |
| [worktrunk-x86_64-unknown-linux-musl.tar.xz](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-x86_64-unknown-linux-musl.tar.xz) | x64 MUSL Linux | [checksum](https://github.com/max-sixty/worktrunk/releases/download/v0.64.0/worktrunk-x86_64-unknown-linux-musl.tar.xz.sha256) |
### Install via Cargo
```sh
cargo install worktrunk && wt config shell install
```
### Install via Winget (Windows)
```sh
winget install max-sixty.worktrunk && git-wt config shell install
```
### Install via AUR (Arch Linux)
```sh
paru worktrunk-bin && wt config shell install
```
</pre>
<p>View the full release notes at <a href="https://github.com/max-sixty/worktrunk/releases/tag/v0.64.0">https://github.com/max-sixty/worktrunk/releases/tag/v0.64.0</a>.</p>
</details>
<hr>
See merge request: Harmonybrew/homebrew-core!13223
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.
Problem
terminal_dimensions()parsed theCOLUMNSenv var into a width unconditionally:So
COLUMNS=0returnedSome((0, None)).terminal_width_for_statusline()then subtracts a fixed UI margin andrun_statuslinesubtracts one more for the leading space, collapsing the content budget to zero —fit_to_widthdrops every segment and the statusline renders empty. The docstring promises the opposite: "ReturnsNonewhen no width is detectable … in which case the statusline renders everything untruncated."This is a follow-up to #3286, which introduced the
COLUMNS-based statusline sizing (replacing the parent-TTY walk).Fix
Treat a zero
COLUMNSas no width at all (None), so an absurd value falls through to the untruncated render exactly like a missingCOLUMNS:Test
Added
test_statusline_zero_columns_renders_untruncated: aCOLUMNS=0render must be non-empty and identical to a wide-terminal (COLUMNS=500) render, since both should be untruncated. The test fails against the pre-fix code (panics on "must not collapse the statusline to empty") and passes with the fix.Found during the nightly code-quality sweep. Low severity in practice — Claude Code (the only caller that sets
COLUMNSfor the statusline) won't pass0— but the empty-render contradicts the documented behavior, so the guard is cheap insurance against any caller that does.