v0.42.2: statusline reads cwd too (fix blank badge)#43
Merged
Conversation
Follow-up to v0.42.1. The badge still showed bare `[TP]` for the user even with the cumulative fix. Cause: tp-statusline.sh read only `workspace.current_dir` from the Claude Code statusline payload, but the 2.1.165 bundle uses a top-level `cwd` field far more (grep: cwd 10x vs current_dir 1x). When CC sends `cwd`, the script resolved no project dir → found no events file → blank badge. Fix: read `current_dir`, fall back to top-level `cwd`. Verified both payload shapes now render `[TP 14k]` against a real project; neither present still degrades gracefully to `[TP]`. Tests: 1350/1350 pass (+1 cwd-fallback).
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.
Follow-up to v0.42.1. Badge still showed bare
[TP]. Cause: tp-statusline.sh read onlyworkspace.current_dir, but CC 2.1.165 uses a top-levelcwd(grep: cwd 10x vs current_dir 1x). When CC sendscwd, no project resolved → no events → blank badge.Fix: read current_dir, fall back to cwd. Both shapes now render
[TP 14k]; neither degrades to[TP]gracefully. 1350/1350 tests.