Skip to content

feat: optional new-version-available notice on status/check #8

Description

@SeanLF

Summary

Optionally surface a subtle "vX.Y.Z available" notice when a newer ccpool release exists. Nice-to-have: brew upgrade already notifies, so this is only for people who forget to upgrade.

Constraints (these are the whole point)

  • No network on the hot path. The statusline render and hooks must never make a network call. So the release check must run detached/warmed and be TTL-cached to disk, mirroring the existing ccusage warm-up pattern (__warm-calib self-exec + the kv/blocks cache).
  • Surface only on on-demand commands (status / check), never blocking a statusline render or a hook. A subtle single line: "v1.4 available (brew upgrade)".
  • Fail open / offline-safe: if the check fails or we are offline, show nothing.

Sketch

  • Daily-cached GET of the GitHub releases API (latest tag) for SeanLF/ccpool, warmed by a detached process, TTL'd to disk (same durability tier as the ccusage blocks cache -- a regenerable cache row, never source-of-truth).
  • Compare against main.version (already injected at build time via ldflags).
  • Print a one-line hint on status/check when a newer version exists.

Why it is low priority

brew upgrade covers the common path already. Build only if the forget-to-upgrade nudge feels worth a second networked subsystem. Keep it fully separate from the handover work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions