Three user-visible additions to the web dashboard, plus the CLI surface
needed to drive them.
* `skillshare ui start` / `skillshare ui stop` — run the dashboard as a
managed background process. Re-running start reuses the existing
healthy process; stop uses the remembered host/port. Foreground
`skillshare ui` keeps working unchanged. Process tracking lives in
ui_process_{unix,windows,other}.go via a PID + current-state file.
* `--app` — opens the dashboard in a Chromium app-mode window (Chrome,
Edge, Brave) on macOS, Windows, and Linux for a separate Dock/taskbar
entry without browser chrome.
* In-place upgrade from the browser — the Update dialog and the Doctor
page's Version card now expose an Update now button. Backed by two
new endpoints (POST /api/upgrade, POST /api/restart in
handler_restart_upgrade.go); the browser polls GET /api/health and
reloads once the new server is ready. Dev builds short-circuit with
`devMode: true` and a simulated restart so the flow can be exercised
without rebuilding the binary.
* Progressive Web App — site.webmanifest, app icons (192/512), and a
minimal service worker registered from main.tsx. Supporting browsers
can install the dashboard as a standalone desktop app.
* Doctor Version card redesign — state-coloured icon (blue when an
update is available, green when up to date), explicit
`current → latest` delta, Update button only when there is something
to upgrade.
* i18n — translate "DEV mode" in zh-TW / zh-CN / ko (previously left
as raw English).
Adds CHANGELOG.md and website changelog entries for v0.19.20 and
refreshes website/docs/reference/commands/ui.md to document the new
modes, --app flag, new REST endpoints, and the in-place upgrade flow.
Make the v0.19.16 sources map actually do something: route all path
reads through Config.EffectiveSkillsSource() / EffectiveAgentsSource() /
EffectiveExtrasSource() so users who set sources.skills / sources.agents /
sources.extras get the configured paths everywhere.
Mechanical changes (~50 files):
- cmd/skillshare/**: replace cfg.Source / cfg.ExtrasSource reads with
cfg.EffectiveSkillsSource() / cfg.EffectiveExtrasSource()
- internal/server/**: replace s.cfg.Source / s.cfg.ExtrasSource reads
with the same helpers; server.skillsSource() / gitignoreDir() use the
global-mode helper
- internal/config/config_validate.go: validate using EffectiveSkillsSource
while still rejecting configs that set neither field explicitly
- internal/config/reconcile.go, registry.go: read via helpers
Behavioral fixes (paired with the migration):
- extras init / extras source / POST /api/extras no longer silently
backfill the legacy extras_source field — the runtime fallback inside
EffectiveExtrasSource() handles it. This stops surprise diffs in users'
config.yaml after running extras commands.
- extras source command writes back to whichever field the user already
configured (sources.extras if set, otherwise legacy extras_source) so
the update is not shadowed.
- source_type in /api/extras and extras list correctly reports "default"
vs "extras_source" by inspecting the raw (unresolved) configured value;
sources.extras counts as configured for this purpose.
UI:
- ui/src/lib/fieldDocs.ts: neutralize sources / sources.* descriptions
so they describe both project and global modes (Phase 5).
Preserved (intentional):
- Direct writes to cfg.Source / cfg.AgentsSource / cfg.ExtrasSource in
init, migrate.go, cloneForSave, and server.reloadConfig — these are
raw-field writes, not path reads.
- Updated test expectations for the removed backfills.
Addresses P1 and P2 from code review on the RWMutex commit:
P1 — Stream handlers now snapshot config under RLock before streaming:
- handleDiffStream: clone Targets map to prevent concurrent map panic
- handleCheckStream, handleAuditStream: snapshot source/projectRoot
- handleUpdateStream: snapshot source (per-item Lock already correct)
P2 — All read handlers now use narrow snapshot instead of defer RUnlock:
- RLock → copy needed fields to locals → RUnlock → do work with locals
- Prevents slow I/O (git fetch, version check, audit scan) from blocking
the auto-reload middleware's exclusive Lock on concurrent requests
Other changes:
- computeTargetDiff takes source parameter (no more s.cfg.Source access)
- Add cloneTargets() helper for safe map copying
- Add writeOpsLogTo/writeAuditLogTo for lock-free oplog writes
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)
The web dashboard now fully supports project-level skills. When launched
with `-p` or when `.skillshare/config.yaml` is auto-detected, the UI
adapts: Git Sync and Backup pages are hidden, Config edits the project
config, Install reconciles ProjectConfig.Skills[], and targets resolve
from project-level definitions.
Server: add NewProject constructor, IsProjectMode/configPath/saveConfig/
reloadConfig helpers, branch all handlers for project mode.
Frontend: AppContext propagates isProjectMode, Layout filters nav items,
Git/Backup pages show unavailable message, Config/Dashboard adapt.
Extract ReconcileProjectSkills to internal/config for reuse by both CLI
and server. Add unit tests and integration tests for project UI.
Update docs, README, and Docker playground with project mode demo project
and skillshare-ui-p alias.
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.