Output left + right with a single space separator instead of trying
to right-align to a detected terminal width. Terminal detection is
unreliable when all fds are piped by Claude Code, and hardcoding a
width defeats the purpose. Also removes the x/term dependency.
term.GetSize returns unreliable values when running inside Claude Code
over SSH. Replace the hardcoded statuslineWidthOffset with STATUSLINE_WIDTH
env var (set in Claude Code settings), falling back to terminal detection,
then 80 columns.
When Claude Code captures stdout, term.GetSize on stdout fails and
falls back to 80 columns. Now tries stderr and stdin first (which
remain connected to the TTY), then COLUMNS env var, then 80.
- Extract TokenUsage as named type (eliminates inline struct repetition)
- Refactor main() into testable functions:
- readInputFromStdin: Read JSON from stdin
- parseStatusInput: Validate and parse JSON
- buildStatusLine: Construct left and right statusline parts
- calculatePadding: Compute padding for alignment
- formatOutput: Combine components into final output
- Add comprehensive tests for extracted functions
- Improve coverage from 45% to 71% (+26 percentage points)
- All new functions have 100% test coverage
- Clean linting with zero issues
- Add .golangci.yml with sensible defaults for the project
- Add lint and lint:fix tasks to Taskfile
- Remove unused findGitRoot function
- Apply gofumpt formatting fixes
Replace pgrep with gopsutil/v4 for pure Go process detection.
Now fully cross-platform (Linux, FreeBSD, macOS, Windows) with
zero external exec calls. Add Taskfile and test fixture.
Replace shell-based statusline with native Go for ~4x speedup.
Parses JSON natively, detects git status, checks gitea process,
and formats colored output with proper terminal width handling.