fix: clear stale update-success notice after restarting into an old install#190
Conversation
…nstall Homebrew installs can restart into the same pre-update binary when the formula bump doesn't actually land. The persisted "Restart to apply" status survived that restart forever because it only checked job state and target version, not which process wrote it. Scope the notice to the process that recorded the successful update (pid match) so a restart into a still-old version falls back to "Update available" instead of repeating an already-ineffective restart prompt.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds a ChangesRestart-pending notice fix
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
update_restart_pending()now also requires the recordedpidto match the current process, so a restart into a still-old version correctly falls back to "Update available — /update" instead of repeating an already-ineffective restart prompt._compute_update_noticeand_welcome_banner_chipinto the shared helper.Test plan
make check-pythinker-code(ruff + format + pyright + ty) — all checks passeduv run pytest tests/ui_and_conv/test_shell_welcome_info.py tests/ui_and_conv/test_silent_auto_update.py— 46 passedSummary by CodeRabbit