Apply config ignore patterns to copy-mode file traversal, checksum, mtime, CLI diff, and server sync/diff paths.
Add default ignores for .DS_Store, .git, and __pycache__ in global and project init configs.
Tests: go test ./... -count=1
The project-root self-install guard lived only in the CLI handler, so the
web UI could still copy the project root into its own .skillshare/skills/
subtree in project mode. Extract the check into a shared
install.RejectProjectRootLocalInstall and apply it in handleInstall and
handleInstallBatch, returning 400 with the same guidance.
Also restructure the rejection message into a cause line plus an
actionable "Run '...'" hint, matching the project's error convention.
Return errors from branch refresh and checkout when git fetch fails instead of serving stale refs or proceeding with checkout.
Cover branch-list and checkout fetch failures with server regression tests.
Update tracked repo remotes before persisting source metadata so the API cannot report success while the on-disk git remote remains unchanged.
Cover both remote update failure and successful remote plus metadata updates.
When tracked repo metadata is committed but the gitignored clone dirs are
absent on a fresh machine, `update --all` silently reported zero work: the
batch path skipped missing repos with no message, and the web UI's
update-all paths only listed repos present on disk.
Missing tracked repos are now detected and surfaced everywhere:
- CLI: a warning block (human output) plus an aggregated
`missing_tracked_repos` summary (names + one-shot rehydrate hint) in JSON;
the per-item error is concise. Fixed for both global and project modes,
and batch and single-target paths.
- Server: GET /api/update/missing-tracked-repos and the update-all/stream
summaries report them; POST /api/update/rehydrate re-clones them from
metadata (mirrors bare `skillshare install`).
- UI: the Update page shows a warning banner listing missing repos with a
Rehydrate button; strings added to all 11 locales.
Closes#212
Add multi-select mode to the Resources page so users can enable or
disable many skills or agents at once (issue #203), instead of toggling
each one individually.
- New POST /api/resources/batch/toggle endpoint (skills + agents) backed
by the shared .skillignore/.agentignore, returning per-item results and
an updated/unchanged/failed summary
- Selection mode across grid, tree, and table views with a unified
checkbox, folder-level tri-state select-all in the tree, a bottom
action bar (Enable applies immediately, Disable confirms first), and
optimistic updates
- i18n keys for all 11 locales
Tier and cross-skill findings are generated programmatically rather than
compiled from the rule list, so they bypassed the disabled-ID filter applied
at rule-compile time. Setting enabled:false in audit-rules.yaml marked the
rule disabled in the listing but the scan still fired it at full severity.
Filter synthetic findings against the disabled-ID set in both the skill-scan
and single-file paths, threading the set through the cross-skill call sites
(analyzer, cmd, server). Fixes#204.
The web UI skill preview always fetched SKILL.md via api.github.com, so skills from GHE or other non-github.com hubs showed only index metadata (name, description, tags) instead of the full rendered content.
FetchPreview now resolves the source platform: github.com and GHE use the host's REST Contents API, while other platforms (GitLab, Bitbucket, Azure, SSH) fall back to a shallow clone. Sources whose content can't be retrieved degrade gracefully with a clear notice in the modal.
Fixes#193
The skill list endpoint discovers skills with DiscoverSourceSkillsAll
(which includes disabled skills), but the uninstall handler used
DiscoverSourceSkills, which excludes anything listed in .skillignore.
A disabled skill therefore stayed visible in the dashboard yet failed
to uninstall with "skill not found".
Switch handleBatchUninstallSkills to DiscoverSourceSkillsAll so the two
endpoints agree on which skills exist. The CLI was unaffected.
Fixes#190
UI (Extras page):
- Label per-target flatten/extension/mode controls with column headers
- Render flatten as a dropdown so it matches the adjacent selects
- Collapse the add-target form behind a button and widen the path input
- Confirm before removing a target
- Polish layout: tinted icon, inset source chip, hover rows, aligned columns
Components:
- Select: bound the dropdown width so long option descriptions wrap instead
of stretching the popup across the page
- Toast: render messages multi-line, widen the container, and give
error/warning toasts more time to read
Sync feedback:
- Restructure extras sync-failure toasts into readable lines and fix the
contradictory "N more errors" count (new nMoreErrors translation)
CLI/server:
- Match extra target paths by resolved absolute path (handles ~ vs /home)
when adding, removing, or updating targets
Hub index fetch previously handled only unauthenticated HTTP(S) GET or
local file paths, leaving private and GitHub Enterprise repos out of
reach — raw HTTPS URLs redirect to login before token headers apply, and
SSH-style hub URLs were unrecognized.
Resolve SSH hub sources by shallow-cloning the repo with the user's SSH
keys and reading the index from it. The in-repo index path uses the
existing //path subdir convention (consistent with `install`), defaulting
to skillshare-hub.json at the repo root. Both scp-style and ssh:// URLs
are accepted. In the web dashboard, SSH clones are restricted to saved
hubs so a request-supplied URL can't drive an arbitrary clone.
Ref #185
- handler_git: dashboard Pull auto-sync now uses EffectiveSkillsSource()
instead of the git_root scope dir, so it no longer mangles skill rel
paths (skills/foo -> skills__foo) when git_root is root/agents/extras
- extension: run the transform subprocess via CommandContext with a 30s
timeout so a hung extension can't block sync indefinitely
- md-toml.js (codex-agents, gemini-commands): escape values via
JSON.stringify so control characters produce valid TOML basic strings
- gitroot: quote paths in the commit/push mv guidance so paths with spaces
can be pasted safely
- extras list + extras server handlers: warn when an extension fails to
resolve instead of silently falling back and reporting false drift
Lock-contention suggestions on handleSetGitRoot/handleAbsorbNested are not
applied: this is a single-user localhost dashboard, and dropping the write
lock around .git-mutating operations trades safety for negligible throughput.
The /api/extras/diff path resolved the copy mode but ignored a transform
extension's output_ext, so buildExtrasDiffItems compared source relative
paths against the target directory. After a .md -> .toml transform sync,
the diff looked for the original .md name and reported false drift, even
though the status path already handled this.
Export ApplyOutputExt as the single source of truth for source->target
filename mapping (previously unexported applyOutputExt) and use it in the
diff path so sync, status, and diff all agree on the transformed name.
Root-scope git operations detected hazards but proceeded anyway, letting
preventable mistakes reach the remote:
- Nested git repos were only warned about, then committed/pushed as empty
submodules (silent data loss). Now commit/push abort (CLI non-zero exit,
server 400) until the nested repos are disabled, and the web UI disables
the commit/push buttons while any are present.
- The pre-stage safety sweep ran before the dry-run check, so `--dry-run`
wrote .gitignore and ran `git rm --cached config.yaml`. The sweep/guard is
now strictly read-only on dry-run and only reports what would change.
- Server git endpoints used EffectiveGitRoot() without validating git_root,
so a hand-edited invalid scope silently fell back to skills. They now share
a gitSource() guard that rejects invalid scopes with 400, mirroring the
CLI's resolveGitRoot.
The dashboard computed extension target status with EffectiveMode, which defaults an empty mode to merge, so a valid transform extension target (extension set, no explicit mode) was always reported as drift. Introduce sync.ResolveExtensionMode as the single source of truth (empty/copy resolve to copy, anything else errors) and use it across the CLI, sync, status, and diff paths.
At the root git_root scope, `git add -A` over the config base directory
records any subdirectory that has its own .git (e.g. the skills source) as
an empty submodule, and can commit the machine-specific config.yaml.
- Detect nested repos and warn before commit/push (CLI) or surface them on
the Git Sync page with a one-click "Disable nested .git" action (UI),
which renames .git to .git.disabled (reversible) and drops any stale
gitlink from the index so the directory's files track as normal blobs.
- Keep config.yaml out of a root-scope repo automatically: ensure it is
ignored and untrack it (git rm --cached) before staging, on both the CLI
and the web UI commit/push paths.
- Expose nestedRepos/configTracked in GET /api/git/status and add
POST /api/git/absorb-nested (validated against detected nested repos).
The not-a-repo state was a dead end: the scope switcher only rendered once a
repo existed, so there was no way to initialize git or set a remote from the
UI. Add an 'Initialize git repository' button that opens the existing scope
dialog (with optional remote) — POST /api/git/root already inits the scope
repo and wires origin. Dialog title/message adapt for the init case.
Also detect a missing git executable: gitStatus reports gitInstalled (via
exec.LookPath), the page shows a clear 'Git is not installed' notice instead
of a cryptic 500 on init, and handleSetGitRoot rejects with a plain message.
The Git Sync scope switcher now accepts an optional remote URL, reaching
UI parity with the CLI's `init --git-root <scope> --remote <url>`. The
POST /api/git/root handler takes an optional remoteURL and wires origin on
the just-initialized scope repo via a new git.SetOrAddRemote helper (adds
origin when absent, updates the URL otherwise). Adds gitSync.scope.remote*
strings across all locales.
Transform-extension sync previously wrote each generated file via
runExtensionFile unconditionally, so a regular local target file (e.g. a
hand-edited hello.toml) could be overwritten from hello.md without --force,
violating the same conflict contract that copy/merge modes honor.
- Split runExtension (subprocess → bytes) from runExtensionFile (writes),
and have syncExtraTransform apply the conflict/force rules: idempotent
when identical, skipped on conflict without --force, overwrite with
--force, and auto-replace leftover symlinks.
- Centralize the copy-only mode rule in SyncExtra so the API and CLI reject
extension+merge/symlink identically; align the server sync handler's mode
normalization (EffectiveMode's "merge" default no longer leaks through).
- CLI `extras list` no longer short-circuits to an "extension" status before
existence/drift checks. Status is now computed via output_ext-aware
CheckSyncStatus; a new Extension field carries the display label, decoupled
from sync status (plain-text + TUI rendering updated).
- Roll back the optimistic cache update in the UI mode-change handler on
failure (fixes the unused-var build break).
Adds regression tests covering conflict skip/force/idempotent/symlink-replace
and non-copy mode rejection.
CheckSyncStatus compared each source file against targetDir/<source-name>,
but a transform extension renames output (foo.md -> foo.toml), so the
.toml file was never found and the target was always reported as drift —
even right after a successful sync. Thread the extension's output_ext
through CheckSyncStatus so the expected target filename matches the
transformed output. The web list now resolves the spec to pass it.
Add a Remove action to each installed extension in the Config Extensions
list (DELETE /api/extensions/{name}). The list now reports used_by — the
extras whose targets reference each extension — so the row shows an
in-use badge and the confirm dialog warns, in danger style, which extras
will fail on next sync before removing. Path-traversal names are rejected
server-side. Includes server tests for usage reporting and removal.
The web UI sync handler, sync --all --json, and the extras TUI sync all
passed a nil ExtensionSpec to SyncExtra, so a target's configured
extension was silently ignored — files were copied verbatim (e.g. .md
stayed .md instead of being transformed to .toml). Resolve the per-target
extension on each path, mirroring the regular CLI sync. Add a server
regression test asserting the transform runs (output renamed to .toml).
md2codex / md2gemini named the *input* (markdown) and read poorly. Rename
the bundled extensions after what they produce: codex-agents and
gemini-commands. Turn the BuiltinExtensions catalog into structs carrying
a human-readable description so the dashboard can explain each one before
install, and propagate the new names across tests and docs.
The create-extra dialog now offers the same per-target extension
dropdown as the Extras cards. Selecting an extension forces the target
into copy mode and disables the mode selector. createExtra carries the
extension, and the server coerces such targets to copy mode on create.
The "Open directory" action launched a text editor; switch it to the
OS file manager (Finder on macOS, Explorer on Windows, xdg-open on
Linux/BSD) so it reveals the folder as users expect. Drop the editor
override parameter and the {editor} toast placeholder.
Add an "Extensions" tab to the Config page for managing transform
extensions in the active mode (global or project):
- GET /api/extensions lists installed extensions with their manifest
descriptions, merged with the built-in catalog so users can see what
is available to download.
- POST /api/extensions/install downloads a whitelisted built-in
extension into the active mode's extensions directory.
- POST /api/extensions/open opens that directory in the user's editor,
mirroring the skill "open in editor" affordance.
ExtensionSpec now carries the manifest description so the list can
surface it. The UI shows installed extensions with a built-in badge,
available built-ins with a Download button, and an Open-directory
action. Strings are translated across all 11 locales.
Surface the per-target extension transform in the dashboard. A new
GET /api/extras/extensions endpoint lists extensions available in the
current mode's directory (global or project), and the Extras page renders
a picker per target. Selecting an extension forces copy mode (transforms
are copy-only) and locks the mode control; changes apply optimistically
via the query cache. Adds i18n keys across all locales.
Add Config.GitRootMismatch() as the single source of truth for detecting
when the git repo lives at a different scope than git_root configures, and
reuse it across the CLI guidance, the server status response (scopeMismatch
/mismatchScope/mismatchDir), and a new warning banner on the Git Sync page.
Document git_root in the config structure-view field docs (fieldDocs) and the
GitStatus client type, and add the gitSync.scope.* / gitSync.mismatch.* i18n
keys across all locales to keep dictionary parity.
Cover the behavior with config, server handler, and CLI integration tests:
push/pull honor the root scope (agents files reach the remote, config.yaml
stays untracked), POST /git/root inits+persists the scope and rejects invalid
scopes and project mode, and git status reports scope mismatches.
- extract shared git.InitScopeRepo/WriteScopeGitignore/EnsureLocalIdentity (UI-free)
- cmd init delegates to the shared helpers (no logic duplication)
- handler_git operations use EffectiveGitRoot; status exposes the scope
- new POST /api/git/root inits a repo at the target scope dir + persists git_root
The mixed-tracked-repo recovery path used a fragile substring match on
the error message and re-cloned the repo via /discover to count skills
and agents. Both problems share one root cause: the counts InferTrackedKind
already computed during the failed first install were thrown away.
- Add install.TrackKindAmbiguousError carrying the discovered Skills /
Agents counts. InferTrackedKind returns it on the ambiguous branch.
Error() preserves the legacy message verbatim so CLI output is unchanged.
- Server handleInstall track branch uses errors.As to detect it and emits
writeCodedError with stable code 'install.track_kind_ambiguous' plus
skills/agents counts in error_params.
- UI replaces the substring match with an ApiError.code check and reads
counts straight from err.params, skipping the second /discover clone.
- Add unit tests asserting errors.As, count fidelity, and explicit-kind
short-circuit (no clone).
Net result: 2 clones instead of 3 on the mixed-track recovery path, and a
stable cross-language contract instead of a brittle English substring.
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.