fix(pai-statusline): Linux/WSL compatibility and UX improvements #430
+42
−26
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.
Summary
Fixes several issues preventing the
pai-statuslinepack from working correctly on Linux/WSL systems.Before / After
Bug Fixes
1. Cross-platform
statcommandThe script used macOS-only
stat -f %msyntax. Linux requiresstat -c %Y.Fix: OS detection at 3 locations:
2.
jqnot documented as dependencyThe README stated
dependencies: []but the script usesjq20+ times for JSON parsing. Withoutjq, all values silently fail to defaults.Fix: Updated README to document
jqas required dependency.3. PWD has no fallback
When JSON input lacks directory info, PWD displays empty.
Fix:
current_dir="${current_dir:-$PWD}"UX Improvements
4. Icon spacing in MEMORY line
Before:
📁0 Work │ ✦2 RatingsAfter:
📁 0 Work │ ✦ 2 Ratings5. "No data" indicator changed from
—to-.-Why: When bugs occurred (missing
jq, failingstat), the display showed—- identical to "no data available". This made debugging impossible since errors looked like missing data.-.-is:X.X)Test Environment
Test Plan
-.-shows for periods with no rating data🤖 Generated with Claude Code