fix: correct jq path for PAI version in statusline script#461
Open
pybe wants to merge 1 commit intodanielmiessler:mainfrom
Open
fix: correct jq path for PAI version in statusline script#461pybe wants to merge 1 commit intodanielmiessler:mainfrom
pybe wants to merge 1 commit intodanielmiessler:mainfrom
Conversation
The statusline script was reading `.pai.version` from settings.json, but install.ts writes the version to `.paiVersion` at the root level. This mismatch caused the statusline to always show the fallback version instead of the actual installed version. Fixes danielmiessler#446 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
Code Review (ran locally)I noticed the Claude Code Review workflow was failing due to an OIDC token issue, so I ran the review locally in case it helps. Files Changed: 3 files (same fix in 3 locations)
The Change: - PAI_VERSION=$(jq -r '.pai.version // "—"' "$SETTINGS_FILE" 2>/dev/null)
+ PAI_VERSION=$(jq -r '.paiVersion // "—"' "$SETTINGS_FILE" 2>/dev/null)Review: ✅ APPROVEDVerification: I checked the {
"$schema": "...",
"paiVersion": "2.3", // <-- Top-level key
"env": { ... },
"pai": { // <-- Nested object (no .version inside)
"repoUrl": "..."
}
}The fix is correct. The version is stored at Assessment:
Recommendation: Merge. This is a straightforward bug fix. Review performed by Val (AI Assistant) using Claude Code locally |
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.
Summary
.pai.versionto.paiVersionto match what install.ts writesProblem
The statusline script was reading from
.pai.versionin settings.json, butinstall.tswrites the version to.paiVersionat the root level. This caused the statusline to always show the fallback version ("2.0" or "—") instead of the actual installed version.Solution
Updated the jq query on line 94 in all three copies of the script:
.claude/statusline-command.shReleases/v2.3/.claude/statusline-command.shPacks/pai-statusline/src/statusline-command.shVerification
Tested locally by comparing jq queries:
Test plan
paiVersionat root levelFixes #446
🤖 Generated with Claude Code