When the binary lived in a root-owned directory, upgrade re-ran the whole
command under sudo. The built-in skill download, UI asset cache, and oplog
then landed in the user's home as root-owned files, and a later git pull
of the skills source failed with "unable to unlink old
'skillshare/SKILL.md': Permission denied".
The sudo child now only receives an internal --replace-binary=<version>
flag that downloads and swaps the binary. The parent waits for it and
does everything else as the invoking user. The needs-password hint shown
by the CLI and dashboard drops its sudo prefix, since a fully root
upgrade reproduces the same breakage.
After the previous fix the dashboard failed fast but showed the whole
CLI transcript ending in "sudo: a password is required", which does not
tell the user what to do next.
Probe `sudo -n true` before re-executing and return a message naming the
terminal command. The server maps that to an `upgrade.needs_sudo` error
code so the update dialog and the Doctor page can show a translated
sentence in every locale.
Also bound the release download with a client timeout; http.Get had
none, so a stalled connection could hang an upgrade indefinitely.
Accept leading v prefixes during version checks, keep local metadata builds in dev mode unless they are clean exact release tags, and prevent cleanup warnings from leaking into JSON-mode stderr.
Return explicit comparison errors for non-numeric version segments instead of treating them as zero.
Fail closed in update checks when current or cached latest versions are malformed, and cover numeric, malformed, and cache-preserving cases.
Update registry.yaml path references from ~/.config/skillshare/
to ~/.config/skillshare/skills/ in schema description, quick
reference docs, and migration guide. Fix whitespace alignment
in lint.go constants and remove blank line in skill.go imports.
Move version field from top-level frontmatter to metadata block:
metadata:
version: v0.17.11
ReadLocalSkillVersion and FetchRemoteSkillVersion now parse
metadata.version with fallback to top-level version for backward
compatibility.
Homebrew formula updates lag GitHub Releases by hours/days, causing
Homebrew users to see "update available" when `brew upgrade` says
already up-to-date. Now detect install method from executable path
and query `brew info --json=v2` for Homebrew installs instead of
the GitHub Release API.
- Add InstallMethod type with DetectInstallMethod() and
FetchBrewLatestVersion() in internal/version/homebrew.go
- Check() accepts InstallMethod to branch fetch strategy
- UpdateNotification() accepts upgradeCmd (shows correct command)
- UpgradeCommand() method on InstallMethod centralizes the mapping
- doctor.go reuses versioncheck.Check() (fixes semver string
comparison bug in old fetchUpdateMessage)
- Remove duplicated isHomebrewInstall() from upgrade.go
- Skip post-command version check for doctor (has its own)
- Remove duplicated RateLimitError, newGitHubRequest, newGitHubClient,
checkRateLimit from internal/version — now uses internal/github client,
which also fixes missing `gh auth token` fallback for version checks
- Add GH_TOKEN as fallback in install.resolveToken() for GitHub platform,
matching github.GetToken() resolution order (GITHUB_TOKEN → GH_TOKEN)
- Add GH_TOKEN to sanitizeTokens() redaction list
- Extract shared IsAuthError() in install/auth.go; push.go and
wrapGitError() both delegate to it (adds "Access denied" coverage)
- Consolidate shouldFallback*TrackedClone auth checks via isAuthOrAccessError()
- Thread single *http.Client through search.Search() and all callees,
reducing ~60 redundant TLS handshakes to connection-pooled reuse
- Pass *http.Client to downloadFile() instead of creating per-file clients
- Replace sourceHost() with extractHost() (same package, identical purpose)
- Remove unused isGitRepo() alias; callers use IsGitRepo() directly
SKILL.md frontmatter may contain "version: v0.15.0" (with v prefix),
but callers already prepend "v" when formatting. Normalize at the
source by trimming the prefix in both ReadLocalSkillVersion and
FetchRemoteSkillVersion.
Move GetCacheDir() from version package to config.CacheDir(), consistent
with BaseDir()/DataDir()/StateDir() pattern including Windows fallback.
Add XDG_CACHE_HOME and cache paths to website docs.
Replace the embedded SPA (go:embed + build tags) with runtime download
from GitHub Releases. The binary no longer bundles UI assets — they are
downloaded on first `skillshare ui` launch and cached at
~/.cache/skillshare/ui/<version>/.
- Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler
- Simplify ensureUIAvailable(): cache check before dev-mode fallback
- Pre-download UI assets in `skillshare upgrade` (best-effort)
- Remove Node stages from production and CI Dockerfiles
- Keep Node stage in sandbox for playground UI cache pre-population
- Remove ui-embed-check CI job and -tags dev build flag
- Update Makefile, mise.toml, GoReleaser, release workflow
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.
Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
- Skip CLI upgrade silently when API rate limited and no cache
- Use cached version to upgrade when API fails but cache exists
- Extract BuildDownloadURL for direct URL construction without API
- Add GetCachedVersion to expose cached latest version
- Handle .zip format for Windows releases (vs .tar.gz for others)
- Add extractFromZip() and refactor extraction logic
- Update test to use --force flag for upgrade flow
Refactored GitHub API logic into shared internal/version/github.go:
- Support GITHUB_TOKEN and GH_TOKEN environment variables
- Clear error message when rate limit exceeded with fix instructions
- Removed duplicate API code from upgrade.go and check.go
- Add tree structure UI (▸ → ├─ → └─) for install progress
- Add SkillBox component for displaying skill details
- Customize survey multi-select with cleaner icons (✓, ▸)
- Unify UI across all install modes (discovery, track, subdir, direct)
- Show version number in logo for install commands
- Add logo to doctor and status commands
- Quiet git clone output for cleaner experience
Move version-check.json from ~/.skillshare/ to ~/.cache/skillshare/
to align with XDG Base Directory Specification. Add support for
XDG_CACHE_HOME environment variable. Auto-cleanup legacy cache
location on first run.
If user manually updates (not via skillshare upgrade), the cache
may still show an older "latest" version. Now clears cache when
current version >= cached latest to trigger fresh fetch.
- Check GitHub releases API for new versions (24h cache)
- Display colorful update notification when update available
- Skip check for dev builds
- Cache stored at ~/.skillshare/version-check.json