4 Commits
Author SHA1 Message Date
Willie 41e822d979 feat: remove go:embed, serve UI exclusively via runtime download
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
2026-02-16 02:58:22 +08:00
Willie d084e59c8d fix(upgrade): gracefully handle rate limit, use cached version
- 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
2026-02-01 08:33:54 +08:00
Willie Hung bf286f1d88 fix(upgrade): add Windows zip support
- 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
2026-01-31 03:40:34 +08:00
Willie Hung f5798fc0ea fix(upgrade): add GitHub token support and improve rate limit handling
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
2026-01-31 03:10:55 +08:00