PAI v4.0.1 — Upgrade Path & Preferences
Patch release addressing community feedback on upgrade difficulties, missing preferences, and statusline bugs.
What Changed
1. Upgrade Path Documentation
The main README now has separate Fresh Install and Upgrading from a Previous Version sections with explicit backup, merge, and post-upgrade checklist steps.
2. Temperature Unit Preference
New preferences.temperatureUnit field in settings.json — choose Fahrenheit or Celsius. The installer prompts for it during setup, and the statusline honors the setting.
3. Statusline Bug Fixes
Community-reported fixes from PRs #762, #780, and #806:
- Hardcoded timezone removed — reads
principal.timezonefromsettings.jsoninstead of hardcodedAmerica/Los_Angeles - Broken context fallback removed —
/clearno longer produces stale context percentages - Startup estimate removed — the self-calibrating estimate that inflated fresh session context % is gone
- f-string syntax fix — nested escaped double quotes inside Python f-strings caused parse errors on some shells
4. FAQ Fixes
- Removed stale Python reference — PAI v4.0 is TypeScript and Bash, not Python
- Improved "What if I break something?" answer with backup/merge/preserve guidance
Files Changed (from v4.0.0)
| File | Change |
|---|---|
settings.json
| Added preferences.temperatureUnit field
|
statusline-command.sh
| Temp unit pref, dynamic timezone, context/startup/f-string fixes |
PAI-Install/engine/types.ts
| Added temperatureUnit to collected data and PAIConfig
|
PAI-Install/engine/config-gen.ts
| Outputs preferences section
|
PAI-Install/engine/actions.ts
| Temp unit prompt in identity step, preserves preferences on upgrade |
Quick Manual Upgrade (from v4.0.0)
If you just want the fixes without re-running the installer:
- Add to your
~/.claude/settings.json:
"preferences": {
"temperatureUnit": "celsius"
}- Copy the updated
statusline-command.shfrom this release over your existing one. - Delete your weather cache:
rm -f ~/.claude/MEMORY/STATE/weather-cache.json