mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
* feat(ui): show the install's own upgrade command in the update dialog The update dialog always offered `skillshare upgrade` for the terminal. On Nix that command only prints advice, and Homebrew users are better served by `brew upgrade skillshare`, so the right command appeared only after a click on Update returned an error. /api/version now detects the install method, reports its command as upgradeCommand, and looks up the latest version the way the CLI update notice does for that method. The dialog shows that command, or the existing "update your Nix configuration and rebuild" text when a Nix configuration provides skillshare, so no new translations are needed. * fix(ui): keep `skillshare upgrade` in the update dialog, add only a Nix note Review of the previous commit found three regressions: - `skillshare upgrade` already runs `brew upgrade` on Homebrew and also updates the built-in skill. Showing `brew upgrade skillshare` (or the nix profile command) instead broke the case where only the skill is outdated: the shown command updates nothing. - /api/version looked up the latest version through `brew info` on Homebrew, inside the request with no timeout. Homebrew's auto-update could stall the dialog, and a server without brew on PATH never showed an update. - The rendered dialog tests only checked shown text, which wiki/frontend.md says to leave to screenshots. The dialog keeps `skillshare upgrade` and the GitHub lookup. /api/version reports nixUpgradeCommand only for Nix installs, and when a newer CLI is pending the dialog adds the existing Nix advice under the command. The decision lives in nixUpdateNote, unit-tested in upgradeError.test.ts.