Skip to content

Detect Brainium updates and offer to install them - #27

Merged
moderniselife merged 3 commits into
mainfrom
brainium-updates
Nov 18, 2026
Merged

moderniselife merged 3 commits into
mainfrom
brainium-updates

Conversation

@moderniselife

Copy link
Copy Markdown
Owner

Prism now notices when Brainium has moved on and offers to update it, the same way it offers its own updates.

Where it shows

  • A banner in the hub (and a compact one in the menu bar): "Brainium 0.3.0 is available — you have 0.2.0 (5 changes)" with What's new, Skip and Update.
  • Settings → Second brain → Version: "0.2.0 → 0.3.0 · 5 changes" with What's new / Update to 0.3.0, or "up to date" with Check for Updates.

How it checks (15 s after launch, then at most every 6 hours; Settings re-checks if the last check is over an hour old)

  • Git checkout (what Prism installs): git fetch, then compares with the upstream branch. Commits behind, the new version from upstream's package.json and the commit subjects make up the offer. A checkout with local changes or commits of its own is never touched; Settings says why instead.
  • Downloaded copy (no git): compares GitHub's latest commit on main with the one recorded at install. Installs now write .brainium-install.json; copies without one fall back to comparing versions.

Updating

  • Git: git pull --ff-only. Download: fetch the tarball for that commit and swap it in, putting the old copy back if the swap fails.
  • Afterwards, profiles that already had Brainium wired are wired again so they pick up new instructions and tools. Profiles that weren't wired stay that way.

Tested on macOS against sandbox copies: stale checkout (offered, pulled, then up to date), checkout with local edits (blocked with the reason), downloaded copy with an old record (offered, re-downloaded, record updated), fresh clone (nothing offered), Skip hides the offer. Banner and Settings row rendered in light and dark. Builds with no warnings.


Generated by Claude Code

Prism checks shortly after launch, every six hours and when Settings →
Second brain opens: git fetch for a checkout (compared with its upstream
branch), GitHub's latest commit for a downloaded copy (each download now
records the commit it came from).

- A banner in the hub and the menu bar: "Brainium 0.4.0 is available —
  you have 0.3.0 (5 changes)" with What's new (the GitHub compare),
  Skip (this version) and Update.
- Settings → Second brain shows the version: up to date, or an Update
  button with what's new.
- A checkout with local changes or commits of its own isn't nagged or
  touched; Settings says why.
- Updating a downloaded copy downloads the new one and swaps it in.
- After an update, profiles that were already wired are wired again so
  they get the new instructions and tools.
@moderniselife
moderniselife merged commit 1d7db8d into main Nov 18, 2026
5 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