Skip to content

Add update notification (like Claude Code) - #9

Merged
lionuncle merged 1 commit into
mainfrom
feat/update-notifier
Apr 10, 2026
Merged

Add update notification (like Claude Code)#9
lionuncle merged 1 commit into
mainfrom
feat/update-notifier

Conversation

@lionuncle

Copy link
Copy Markdown
Contributor

Summary

  • Checks PyPI for newer versions and shows a boxed notification at the end of each run when an update is available:
    ╭─────────────────────────────────╮
    │ Update available: 0.1.1 → 0.2.0 │
    │ pip install -U rpr              │
    ╰─────────────────────────────────╯
    
  • Runs in a background thread — zero impact on review speed. The check happens in parallel with the actual review work.
  • Results are cached for 1 hour at ~/.cache/rpr/update-check.json so most runs don't hit the network at all.
  • All failures (network errors, cache corruption, PyPI downtime) are silently ignored — the notification simply doesn't appear.

Test plan

  • Run rpr <pr> --dry-run — verify no notification when on latest version
  • Temporarily set __version__ to 0.0.1 and run — verify notification appears
  • Verify ~/.cache/rpr/update-check.json is created after first run
  • Run again within 1 hour — verify no network call (check cache timestamp)
  • Disconnect network and run — verify no errors, notification just doesn't show

🤖 Generated with Claude Code

Checks PyPI for newer versions in a background thread so it never
slows down the review. Results are cached for 1 hour at
~/.cache/rpr/update-check.json. When a newer version exists, prints
a boxed notification at the end of the run, similar to Claude Code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lionuncle
lionuncle merged commit 906fb61 into main Apr 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant