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.
Detect overlapping target paths during sync — either two targets
sharing the same primary path, or cross-runtime discovery via the
also_scans table — and surface a brief one-liner pointing users at
`skillshare doctor` for the full breakdown.
Triggers in both CLI (sync.go, sync_project.go) and Web UI (sync API
warnings array, rendered by existing SyncPage warnings card). Detection
logic lives in internal/config/path_overlap.go and is shared between
both paths.
Quiet by design: no output when no overlap exists. JSON output mode
remains untouched.
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.
Reorder handleUninstallRepo to move repo to trash before removing the
.gitignore entry, preventing accidental exposure of tracked content
when trashing fails.
ProjectGitignoreTarget now returns empty strings for source paths
outside projectRoot, since parent-relative patterns (../) are invalid
in .gitignore. All six callers guard on empty gitignoreDir and skip
gitignore management for external sources.
reloadConfig now updates s.cfg.Source and s.cfg.AgentsSource from the
refreshed ProjectConfig so project UI handlers see the latest source
directories after a config edit.
Add ProjectGitignoreTarget helper that computes the correct .gitignore
directory and entry prefix based on whether the source path is inside
.skillshare/ or a custom location. All gitignore write and remove
operations (reconcile, install, uninstall, server handlers) now use
this helper instead of hardcoded 'skills/' prefix.
Fix nil projectCfg panics in three server tests that simulate project
mode by setting projectRoot without projectCfg.
Add ProjectSources struct to ProjectConfig with optional skills, agents,
and extras fields. When set, project-mode commands resolve source paths
from these values instead of hardcoded .skillshare/{skills,agents,extras}/.
Config example:
sources:
skills: ./docs/skills
agents: ./docs/agents
Three EffectiveXxxSource(projectRoot) methods provide the central
resolution logic with fallback to defaults. The projectRuntime gateway
and server layer route through these methods, so most commands get
custom source support automatically.
Closes#153
- Project mode JSON sync now includes context_cost (was nil)
- Server handler respects symlink mode (skips include/exclude filters)
- checkBudget reports all targets exceeding threshold (not just worst)
- Budget warnings include target name in CLI and UI output
- ConfigPage indentation restored to original 2-space style
- install_project.go: pass AzureHosts to temporary Config (was only
passing GitLabHosts, so project-mode direct install ignored azure_hosts)
- update_agents.go: thread ParseOptions through batchUpdateAgents and
reinstallAgent, replacing bare ParseSource with ParseSourceWithOptions
- handler_update.go: use ParseSourceWithOptions with s.parseOpts() for
agent update in web UI
Without this fix, azure_hosts in .skillshare/config.yaml was silently
ignored during project install and agent update, causing on-prem Azure
DevOps URLs to be parsed incorrectly.
Add azure_hosts config parameter (analogous to gitlab_hosts) that allows
users to register self-hosted Azure DevOps Server hostnames so they
receive proper URL parsing without appending .git to clone URLs.
- Add AzureHosts field to Config and ProjectConfig structs
- Add SKILLSHARE_AZURE_HOSTS env var support with merge semantics
- Generalize hostname validation into shared normalizeHostList/mergeHostsFromEnv
- Add azureOnPremPattern regex and parseAzureOnPrem for /_git/ URL routing
- Add isAzureHost for config-based host detection (no auto-detect)
- Update TrackName to handle on-prem Azure DevOps clone URLs
- Wire AzureHosts through InstallContext, ParseOptions, and Server
- Add JSON Schema, UI fieldDocs, and website documentation
- Add 19 new tests covering config, source parsing, and server
Closes#147
- Add ErrSkillNotFound sentinel error in search/preview.go so callers
can distinguish 404 from other errors with errors.Is instead of
brittle string matching
- Cap previewCache at 200 entries with TTL purge + full reset on
overflow to prevent unbounded memory growth
- Make Card and SearchResultsTable rows keyboard-accessible
(role=button, tabIndex=0, Enter/Space handlers)
- Refactor SkillPreviewModal to accept a single SearchResult prop
instead of 6 individual fields — reduces prop drilling and keeps
the modal in sync with the result shape
- Fix search_online_test: add --list flag so output is not gated
behind interactive TUI
Add a preview modal so users can read a skill's SKILL.md content
before installing. Clicking a search result card or table row opens
the modal; the Install button is now inside the modal.
Backend:
- New GET /api/preview?source=owner/repo/path endpoint
- FetchSkillContent fetches SKILL.md from GitHub Contents API
- Git Tree API fallback for hub sources where the install shorthand
doesn't match the repo's actual file path
- In-memory TTL cache (5 min) via sync.Map
- Proper 404/429/500 error handling with rate-limit support
Frontend:
- SkillPreviewModal component (DialogShell-based, lazy-fetch)
- Cards and table rows clickable to open preview
- Graceful fallback: if fetch fails but hub metadata exists, show
description + tags instead of error
- Hide Stars column in table view for hub mode
- Fix Card component missing onClick prop passthrough
- Fix IntersectionObserver not reconnecting after loading more items
- Prevent background scroll when any modal is open (DialogShell)
- i18n keys added to all 11 locales
Closes#141
Add PATCH /api/resources/{name}/source endpoint to update the source URL
for installed skills. For tracked repos, all sibling skills sharing the
same git remote are updated together with the new repo base URL, and the
git remote origin is also updated.
Frontend changes:
- Add Source URL input field in the skill editor (visible for all skills
with metadata)
- Use shared Input/Textarea components in FrontmatterEditor for visual
consistency, with new size='sm' variant
- Replace custom kind-badge/tracked-badge with shared KindBadge/SourceBadge
components in the editor header
- Preserve original YAML frontmatter formatting when only the body or
source URL is changed (avoids spurious quote style / line wrap diffs)
- Skip diff review dialog when only source URL is modified
Backend fixes:
- Two-pass skill lookup in handleGetSkill: prefer exact FlatName match
over baseName fallback to prevent name collisions between standalone
and tracked repo skills
- Add basename-only fallback in MetadataStore.GetByPath for tracked repo
skills stored with short keys
- Use cfg.Source (global) consistently in save/patch handlers to match
the source used by list/detail handlers in project mode
Closes#142
- pickEditor now rejects unknown editor aliases instead of executing
arbitrary binaries from PATH (security)
- withinDir uses filepath.Rel instead of strings.HasPrefix for
correctness on case-insensitive filesystems
Introduces a full in-browser skill editor reachable from the skill detail
page, replacing the previous read-only detail view for edits.
Editor
- Two-pane layout with Markdown textarea, live preview, and synced scroll
- Edit / Split / Preview mode toggle in the status bar (⌘P to cycle)
- Keyboard shortcuts: ⌘S save (with diff review), Esc cancel
- Outline drawer with jump-to-heading
- Token / word / line / file count in status bar, 5K budget warning
Frontmatter
- Grouped field editor (Identity / Invocation / Execution / Metadata)
matching the 13 official SKILL.md fields
- Shared 1,536-char budget enforced across description + when_to_use
- Switch toggles for booleans, segmented control for enums, chip array
inputs for list-valued fields
- Metadata group edits nested metadata.* keys directly, with stable row
ids so typing key → clicking value no longer remounts the inputs
- Special handling for metadata.targets so values serialize as a YAML
list (backend ParseFrontmatterList requires arrays)
- YAML mode for raw editing; Fields ↔ YAML round-trips cleanly
- Legacy root-level 'targets:' migrated to metadata.targets on load
Diff review
- Save triggers a side-by-side diff modal built on the shared DialogShell
with focus trap and backdrop, using the Button component for actions
- YAML serializer emits plain scalars when safe instead of wrapping every
value containing ':', '*', '#', or '"', eliminating spurious churn in
the save diff
Misc
- DialogShell gains 4xl–7xl maxWidth presets
- Resource detail sidebar shows a Targets row when metadata.targets is set
Backend additions (server handlers):
- POST /api/resources/:name/content save SKILL.md content
- POST /api/resources/:name/open open in local editor
Add agentLocalCount to target API and CLI JSON output so the UI can
display how many local (non-source) agents exist per target.
- Add LocalCount to AgentSummary, computed via FindLocalAgents
- Surface agentLocalCount in both CLI target list JSON and server API
- Show local agent counts in target detail summaries (CLI + UI)
- Collect button now appears for targets with local agents and routes
to CollectPage with scope=agent query param
- CollectPage reads scope from URL and auto-scans on mount
- Fix BatchUninstallPage: agents tab was collapsing individual agent
names into the repo name via buildApiNames(), causing 'agent not
found' errors; now sends each agent flatName individually
- Invalidate targets + diff queries after successful collect
Extend install/update with agent-aware --json output and apply the same
audit block-threshold gate skills already use.
Install:
- install --json: imply --force; imply --all only when neither
--skill nor --agent is set (so explicit selectors still work)
- project-mode install now routes through cmdInstallProjectParsed
so --json suppresses UI and emits a pure-JSON payload
- agent installs propagate SourceDir so metadata lands in the
agents root, not the install subdir
- validation error lists --agent / --kind / --branch explicitly
Update agents:
- update agents supports --force, --skip-audit, --audit-threshold
- tracked agent repos + metadata-backed single-file agents now run
the same audit gate as skills; blocks roll back from a temp stage
- JSON output returns the final per-agent status
(updated/skipped/failed/up_to_date/...) by merging check results
with batch update outcomes
Audit:
- auditInstalledAgent shares one helper with auditInstalledSkill
(scan + cleanup callbacks); single-file agent scans now use
audit.ScanFile / ScanFileForProject instead of staging the file
into a temp directory
- UpdateAgentFromDiscovery stages to temp, audits, then renames
atomically (rename already overwrites on POSIX)
Refactors pulled in while reworking these paths:
- extract jsonUISuppressor helper in json_output.go and use it
from install/update/update_agents; collapses 4 copies of the
suppress/restore closure dance and the per-error failJSON block
- drop relPath plumbing from installAgentFromDiscoveryInternal
now that ScanFile doesn't need a staged relative path
- list.go render functions now use theme.ANSI() so NO_COLOR is
respected in plain-text output
Tests:
- add TestInstallAgentFromDiscovery_HighFindingBlocked (unit)
- add TestUpdate_Agents_HighFindingBlockedByThreshold (integration)
- add TestInstall_Project_JSON_Agent_PureJSON,
TestUpdate_Agents_JSON_ReportsFinalStatus
- fix TestList_SKILLSHARE_THEME_Light / TestList_NO_COLOR to
write a config before invoking list
- fix TestTargetList_NoTUI_FallsBackToPlainText assertion to match
the new structured Mode: merge output
- fix TestDoctor_AllGood_PassesAll by pinning SKILLSHARE_THEME=dark
so the no-TTY theme fallback warning doesn't fire
- add list_tui_content_test.go covering light/dark glamour base
- list detail pane now picks LightStyleConfig on light terminals
Docs:
- update install.md, update.md, understand/agents.md for the new
flags, JSON shapes, and agents update workflow
Add GET/PUT /api/agentignore endpoints mirroring the existing
skillignore API, backed by skillignore.ReadAgentIgnoreMatcher()
and resource.AgentKind{}.Discover() for ignore stats.
On the frontend, extend the Config page with a third tab for
editing .agentignore. Generalize the former SkillignoreTab into
a shared IgnoreTab component with a kind prop, and extend
AssistantPanel to show ignored agents in the sidebar.
Agent discovery was treating non-agent files (CLAUDE.md, AGENTS.md, etc.)
as agent resources when they appeared in tracked repos.
Two fixes:
- Expand ConventionalExcludes with 7 well-known convention filenames
(CLAUDE.md, AGENTS.md, GEMINI.md, COPILOT.md, CONTRIBUTING.md,
CODE_OF_CONDUCT.md, SUPPORT.md)
- For tracked repos with an agents/ subdirectory, only discover files
inside agents/ — skip repo root files and other subdirs (docs/, etc.)
Also includes UI polish:
- Display flat names (__ separator) as path separators in toasts/labels
- Consolidate batch install errors into single toast
- Show .agentignore state in sync diff/preview responses
- Track badge + friendly repo name in resource list/folder tree
Add local-path resource discovery so install flows can detect agents as well as skills. Preserve nested agent paths and suffixless agent metadata keys during batch install and update, and refresh the UI copy to use resource-aware wording on the install surface.
collectSkillRef now has optional kind field. Items with kind=agent
are resolved against agent target paths and pulled via PullAgents().
Results from skills and agents are merged into a single response.
Oplog tracks skill and agent counts separately for observability.
handleCollectScan now accepts ?kind=skill|agent query parameter.
When kind=agent, scans for local agent files in agent target dirs.
When kind is empty, scans for both skills and agents.
- Fix data race: read agentsSource inside RLock in handleDiffStream
- Validate kind param in handleSync (reject invalid values)
- Add test for symlink-points-elsewhere agent diff case
- Always show KindBadge on DiffItemRow (default to 'skill')
- Discover agents from agentsSource() and compute per-target diffs
- Merge agent diff items into existing target results
- Set Kind='skill' on all existing skill diff items
- Set Kind='agent' on all agent diff items
- Targets without agentPath are skipped (matches CLI behavior)
Agents are individual .md files discovered by resource.AgentKind{}.Discover(),
but audit was using collectInstalledSkillPaths() which calls
sync.DiscoverSourceSkillsLite() — designed for skill directories. Then
ParallelScan() called ScanSkill() which expects directories, not files.
Changes:
- Add IsFile flag to audit.SkillInput; when set, ParallelScan uses
ScanFile/ScanFileForProject instead of ScanSkill variants
- Add collectInstalledAgentPaths() using resource.AgentKind{}.Discover()
and resource.ActiveAgents() for proper agent file discovery
- Add toAgentAuditInputs() helper that sets IsFile=true
- Branch on kindAgents in auditInstalled(), auditFiltered(), and
launchAuditTUIWithTabs() to use agent-specific discovery and inputs
- Add discoverAuditAgents() in server handler and update
resolveAuditSource() to return isAgents flag
- Update handleAuditAll, handleAuditStream to use agent-aware discovery
and build SkillInput with IsFile=true for agents
- Add resolveAuditSource() helper that returns source dir and result kind
based on ?kind query param (agents → agentsSource(), default → skills)
- Update handleAuditAll() to use resolveAuditSource() and set Kind on
all results after processAuditResults()
- Update handleAuditStream() with the same pattern for SSE endpoint
- Update toAuditResponse() to propagate result.Kind into response JSON
- Add agent-mode batch uninstall handler with kind-based routing
in handler_uninstall.go (skill/agent dispatch)
- Add Skills/Agents tab navigation to BatchUninstallPage and TrashPage
with per-tab filtering and scoped empty states
- Extract SourceBadge component to replace duplicated getTypeLabel /
skillTypeLabel helpers across ResourcesPage, ResourceDetailPage,
BatchUninstallPage, and AnalyzePage
- Add kind field to BatchUninstallRequest API type
- Capitalize badge labels for consistency (tracked → Tracked, etc.)
- Fix sync matrix using wrong builtin agent targets in project mode
(DefaultAgentTargets → branch on IsProjectMode)
- Fix sync matrix not skipping filters for agent symlink mode,
matching the existing skill symlink behavior
- Remove double-defensive slice copies in handleListTargets since
targetsummary.Builder already clones Include/Exclude
- Extract shared findAgent() to deduplicate discovery logic between
resolveAgentResource and resolveAgentRelPathWithStatus
- Update test URLs from /api/skills to /api/resources and response
keys from skills/skill to resources/resource to match the route
rename from the resources refactor
Backend:
- PATCH /api/targets/:name accepts agent_include/agent_exclude fields
- POST /api/sync-matrix/preview returns agent entries with kind=agent
- GET /api/overview returns agentsSource and extrasSource paths
- Fix ResolveProjectTargets to resolve Agents sub-key (path + filters)
- Add agent filter CLI flags: --add-agent-include, --add-agent-exclude,
--remove-agent-include, --remove-agent-exclude, --agent-mode
- Unify target list JSON/TUI to show agent info and filters
Frontend:
- FilterStudioPage: kind-driven single-context view (?kind=skill|agent)
- KindBadge: use design system tokens (ss-badge + wobble in playful)
- TargetsPage: link to Filter Studio with ?kind= param
- ResourceDetailPage: capitalize type labels (Local, GitHub)
- ResourcesPage: sync activeTab from URL searchParams on navigation
- DashboardPage: show agents/extras source dirs, link skills card
with ?tab=skills for reliable tab switching
- API client: extend updateTarget and previewSyncMatrix for agent filters
Tests:
- Agent include/exclude round-trip persistence
- Invalid agent pattern returns 400
- Preview with agent entries and kind field
- No agent entries for targets without agent path
- CLI target agent filter integration tests
- Promote agents from nested dashed box to equal-level section panels
with same visual treatment as skills (bg panel, label, controls)
- Move StatusBadge from card header into per-section labels
- Add agent mode dropdown (PATCH /api/targets/{name} now accepts agent_mode)
- Unify agent filter text to match skills pattern (All N agents / N/M agents)
- Add agentPath to available targets API and Add Target flow
- Convert inline Add Target form to DialogShell modal (max-h-[60vh])
- Add Agents Path input for custom targets and selected target preview
- Show both Skills/Agents paths in picker rows for supported targets
Align agent target naming with the skills-style __ flattening so nested agents do not collide by basename in flat agent directories. Add unit and project-mode integration coverage to verify repeated syncs stay stable and no longer report false updates.
Three bugs introduced during centralized metadata migration:
1. Batch agent installs via UI wrote metadata to skills/.metadata.json
instead of agents/.metadata.json because handleInstallBatch hard-coded
SourceDir to s.cfg.Source. Override SourceDir with agentsSource() when
body.Kind is agent.
2. CheckAgents used LoadMetadataOrNew which silently converts parse
failures into an empty store, making all tracked agents appear local
and suppressing drift/update diagnostics. Switch to LoadMetadata and
surface corruption as status=error with the parse error message.
3. findMetaEntry only climbed 3 parent directories when searching for
.metadata.json, but --into supports arbitrary nesting depth. Raise
the ceiling to 10 (root sentinel still terminates early).
Production code no longer reads or writes .skillshare-meta.json sidecars:
- InstallAgentFromDiscovery: write to centralized store via WriteMetaToStore
- agent_check.go: read from centralized store passed as parameter
- handler_skills.go: read agents from s.agentsStore
- audit.go: readMetaFileHashes reads from parent .metadata.json
- analyzer_metadata.go: extract findMetaEntry to deduplicate walk logic
- uninstall_agents.go: remove entry from centralized store on uninstall
- batchUpdateAgents: pass store to reinstallAgent, remove dead field
- Replace LoadMetadata+nil guard with LoadMetadataOrNew across 6 files
All call sites that looked up metadata entries using filepath.Base()
now use store.GetByPath(relPath) which handles both full-path keys
and legacy basename+group keys transparently.
Also fixes makeInstallOpts() to set SourceDir from updateContext,
preventing nested skill updates from writing metadata to wrong dir.
Code quality fixes from review:
- Extract RemoveByNames() to eliminate copy-paste in uninstall Phase 7
- Add MetadataKindSkill/MetadataKindAgent constants
- Remove dual-write shim (findSkillsRoot + writeMetaToCentralized)
- install_apply.go uses WriteMetaToStore with SourceDir (no sidecar)
- Move LoadMetadata out of walk loops (P0 efficiency fix)
- isGroupDir accepts store parameter to avoid redundant loads
- Add SourceDir to InstallOptions for --into group support
- Dual-write in WriteMeta: also writes to .metadata.json for backward compat
- Migration looks in parent dir for registry.yaml
- Group uninstall matches entries by Group field + full path
- Sync test uses MetadataStore instead of registry.yaml
- All integration tests pass (0 FAIL)
Replace every remaining call to the old per-skill metadata API
(ReadMeta, RefreshMetaHashes, config.LoadRegistry) with the centralized
MetadataStore across 10 files:
Server handlers:
- handler_check.go: use s.skillsStore.Get() instead of ReadMeta
- handler_check_stream.go: same pattern as handler_check.go
- handler_skills_batch.go: use s.skillsStore.RefreshHashes() + Save()
CLI commands:
- check.go: load store once in collectCheckItems, use MetadataEntry
- doctor.go: load store once in checkSkillIntegrity
- list.go: load store once in buildSkillEntries (replaces parallel ReadMeta)
- uninstall.go: use skillsStore for display/dry-run/finalize
- uninstall_project.go: same pattern, remove config.LoadRegistry
- update_batch.go: pruneRegistry now uses MetadataStore
Hub:
- hub/index.go: load store once in BuildIndex
The only remaining ReadMeta call is in a test file
(search_batch_meta_roundtrip_test.go) which tests the shim itself.