mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
08ecb7afad0d3f90e2efeb0bc167a8ea7ffeca14
51
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c040917bc7 |
fix(security): enforce credential and filesystem trust boundaries (#861)
Bind provider credentials to canonical or explicitly configured HTTPS origins and preserve that policy across remote consumers. Reject cross-site credentialed reads, linked fallback directories, and discovered-agent writes outside the source; audit staged content before rooted atomic publication. Add boundary regressions, private Git update coverage, stable cross-platform fixtures, and aligned documentation. Verified the integrated main baseline with all executed CI checks passing. |
||
|
|
828ba93f27 |
fix(git): keep a caller's GIT_DIR out of skillshare's git commands (#854)
* fix(git): keep a caller's GIT_DIR out of skillshare's git commands Git exports GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and related variables to hooks that run in a linked worktree. Every git process skillshare started inherited them, and those variables override the directory the command runs in. Run from a post-checkout or post-merge hook, skillshare therefore acted on the hook's repository instead of its own: install's sparse clone turned on sparse checkout there (a later merge removed every file outside the skill's path), the remote tree check's `git init --bare` made it a bare repository, install's reconcile recorded its origin and branch, and push staged and committed into it. internal/gitenv builds git commands without the variables that `git rev-parse --local-env-vars` lists for choosing a repository, work tree, index, object store or config file. GIT_CONFIG_COUNT and GIT_CONFIG_PARAMETERS stay, because users pass credentials through them and install's token auth appends to the existing count. Every git call in cmd/skillshare, internal/install, internal/git, internal/check and internal/config now goes through it, and plugin runCommand starts native CLIs from the same environment because they run git as well. The hooks service keeps its own stricter filter. Closes #852 * test(gitenv): fail on new git commands that bypass gitenv Each git call site converted for #852 is safe only because it goes through gitenv.Command, and about half have no test of their own. A future exec.Command("git", ...) would silently bring the bug back, so a syntactic guard now rejects one outside gitenv, hooks and testutil, mirroring the sourcefs and sourcewalk ratchets. The Environ test also checks a lowercase name, since Windows environment names are case-insensitive, and compares against literal keys so that removing one from repoVars fails it. The wiki records the rule. |
||
|
|
bb514c9432 |
fix(git): skip gitignored tracked repos in the root-scope nested repo check (#821)
With git_root: root, commit and push aborted on every tracked skill repo because NestedRepos flagged any directory with its own .git. Tracked repos are listed in the managed .gitignore block, so git add -A never stages them, and the suggested remedy (renaming .git to .git.disabled) breaks skillshare update for those repos. NestedRepos now asks git check-ignore about each nested repo and leaves out the ones git ignores and does not track. A repo already committed as a gitlink is still reported, since staging would update it. Paths are checked one at a time because git refuses a whole batch when one path lies inside a gitlink, and any git error keeps the warning. Closes #820 |
||
|
|
efc492fd7a |
fix(update): audit tracked candidates before publication (#647)
* fix(update): audit tracked candidates before publication Prevent rejected tracked-update bytes from becoming readable through published target links by staging and auditing a private candidate before updating the active checkout. Publish the exact approved revision without a second upstream pull. Preserve sparse state, audit metadata, followed checkouts, and compatible edits. Recover staged and unstaged changes after failed forced publication, including deletions, renames, and sparse exclusions. Cover the boundary deterministically and align error messages and localized documentation. * fix(update): preserve local bytes across Git line-ending conversion Overlay dirty worktree bytes after staging candidate patches so core.autocrlf does not silently rewrite local edits. Cover staged, unstaged, and cancelled worktree changes while retaining their index state. Make permission-failure coverage explicitly POSIX-only and compare private checkout contents to their original bytes. Align red-team assertions with candidate rejection and register private temporary cleanup with the raw-write guard. * test(install): normalize checkout after configuring line endings Windows fixtures initially inherit core.autocrlf=true. Reset the isolated checkout after selecting the subtest setting so changing it to false does not turn untouched upstream files into local edits. |
||
|
|
1094668408 |
fix(install): keep git tokens out of process arguments (#566)
Token auth rewrote the clone URL with url.<user>:<token>@host.insteadOf. git hands the rewritten URL to git-remote-https as an argument, so any user on the machine could read the token with ps for as long as a clone or fetch ran. Every platform token (GitHub, GitLab, Bitbucket, Azure DevOps, Gitea, CNB) went through the same rewrite. git now gets the token from a credential helper scoped to the host, which reads it from SKILLSHARE_GIT_AUTH_PASSWORD; printf is a shell builtin, so the token never reaches an argv. An empty helper entry first clears the user's own helpers for that host, so git neither asks their keychain nor erases from it on a 401, and no longer stores the skillshare token there as the URL rewrite did. An http.extraHeader was tried first and dropped: the header goes out before any 401, so a stale token broke installs from public repos, and after a rejection git fell back to the user's helper and erased their stored credentials. Refs #565 |
||
|
|
5c26981e44 |
refactor(git): reuse raw source directory reader
Use sourcewalk with zero options to preserve first-level link identity without adding a raw-walk allowance. Keep Git paths relative to the logical skills source. |
||
|
|
3e8b6e8bd9 |
fix(git): warn before staging first-level source links
Source links can record machine-local paths in Git. Share advisory indexed and ignored checks across CLI, init, and dashboard staging and previews, with scope-correct ignore patterns and manual untracking instructions, without changing staging behavior. |
||
|
|
dd6991ca3c |
fix(push): refuse unpushed config.yaml history at root scope (#366) (#372)
* fix(push): reject unpushed config history at root scope Untracking config.yaml at the tip still uploads its contents from earlier local commits. Refuse root-scope pushes before mutation and before upload when unpublished history adds or changes the file or its directory tree, without rewriting history. Share the check across the CLI and dashboard, return unpushed_config_history, and allow removals and config inherited unchanged from upstream merges. Cover first pushes, dry runs, push --pull, directory paths, renames, and merge commits, and document manual repair in all website locales. Fixes #366 * fix(push): check exactly what push sends for config history Review of the config history guard found two range problems: - The guard checked @{u}..HEAD, but a same-named upstream was pushed with a bare `git push`. With remote.pushDefault or push.default=matching that could send config-bearing commits to another remote, or other branches, that the guard never looked at. PushArgs now always names the upstream remote and branch (read from branch config, so names with "/" survive), so the checked range and the pushed range are the same. - Without an upstream every commit on HEAD counted as unpushed, so a config.yaml already published on origin followed by the "Keep config.yaml out of version control" commit was refused. The guard now checks HEAD --not --remotes=<push remote>. The refusal message now suggests rebasing from just before the oldest offending commit instead of @{u} or --root, which would rewrite commits the remote already has. * fix(push): check config history against the remote's live refs Local remote-tracking refs can be stale. When another machine force-pushes the remote to drop a leaked config.yaml commit, this clone's refs/remotes/<remote>/... still contains it, so the guard treated the leak as already published and HEAD:main, still a fast-forward, would publish it again. The guard now excludes only the objects the push remote's refs point to right now (git ls-remote), limited to objects this clone has. It falls back to local remote-tracking refs only when the remote cannot be reached, in which case the push fails anyway. Revisions go to git log on stdin as "^<id>" lines because git before 2.42 rejects "--not" there. * fix(push): screen config history against every push URL, without replace refs Two more ways the screened history could differ from what git push uploads: - `git ls-remote <remote>` queries the fetch URL, but git push sends to every remote.<name>.pushurl. A commit already on the fetch URL could still be new to a push URL. The guard now lists `git remote get-url --push --all` and excludes only objects that every push URL has. - With a refs/replace/* entry for an offending commit, git log read the sanitized replacement while the push pack carries the original. The log and the rebase-base lookup now run with --no-replace-objects. * fix(push): let pushes the remote will reject reach the pull step Our own review of the config history guard found two problems: - When another machine had pushed, the remote's tip was unknown locally, so no live ref survived the "objects this clone has" filter and the whole history counted as unpushed. A config.yaml published long ago, followed by the stop-tracking commit, then blocked `push --pull` before it could pull, and replaced the plain push's ErrPushRejected hint. A push URL whose destination branch tip this clone lacks rejects the push as non-fast-forward and receives nothing, so it is now left out, and the check passes when every push URL is like that. `push --pull` re-runs the check after pulling, with the tip known. - PushRemote read branch.<b>.remote even when @{u} no longer resolved, while PushArgs then pushed to origin. pushTarget now follows the same HasUpstream rule as PushArgs. |
||
|
|
475b176914 |
fix(pull): keep the local config.yaml when a later pull brings a tracked copy (#362)
* fix(pull): keep the local config.yaml when a later pull brings a tracked copy #357 refuses a root-scope first pull when the remote tracks config.yaml, but once upstream is set, a pull that merges in a remote-tracked copy still replaced this machine's config: Git treats the ignored file as expendable. Snapshot config.yaml around later pulls (CLI pull, push --pull, and the dashboard), restore it, and warn so the user can untrack it with push. Refs #353 * fix(git): untrack config.yaml after push --pull and warn on identical copies push --pull ran the root safety sweep before integrating the remote, so a pull that brought in a remote-tracked config.yaml was pushed back as-is: the remote kept tracking it and the next first pull elsewhere was refused. Re-run EnsureConfigUntracked after the pull and commit the removal before pushing. The warning also depended on the pull changing the local bytes, so a tracked copy identical to this machine's went unreported. KeepLocalConfig's restore now reports whether the repo tracks config.yaml after the pull. * fix(git): only restore config.yaml when the pull could have touched it KeepLocalConfig wrote its snapshot back after every root-scope pull, so an edit made to an untracked config.yaml while the pull ran was silently replaced by the stale copy. Git only rewrites config.yaml when it is tracked before or after the pull, so restore only in that case. * fix(git): restore config.yaml only when the pull changed its index entry Gating the restore on "tracked before or after" still overwrote edits made during a pull when config.yaml was already tracked and the pull left it alone. Compare config.yaml's index entry (mode, blob, stage) before and after the pull instead; a merge, reset or conflict that touches the file changes it, and anything else keeps the current file. * fix(git): warn about a tracked config.yaml only when the upstream tracks it The warning followed the local index, so a config.yaml tracked only by a local, unpushed commit was reported as tracked by the remote, and the suggested push would publish it in history. Check the upstream tree with RemoteTracksConfig("@{u}") instead. * fix(git): restore config.yaml after a pull that aborts its merge A merge that brought in a tracked config.yaml and conflicted elsewhere was aborted, which deleted the file again and returned the index entry to its pre-pull state, so restore saw no change and the local config was lost. Also restore when the snapshotted file is missing after the pull. * fix(git): keep config.yaml ignored when a later rule negates it EnsureConfigUntracked only checked that a "config.yaml" line existed, so a pulled .gitignore with a later "!config.yaml" left the file unignored and the following `git add -A` tracked this machine's copy again. Check the effective ignore state and append an overriding entry when needed. * fix: commit post-pull .gitignore repairs and keep config.yaml's mode push --pull committed only when EnsureConfigUntracked removed an index entry, so a pulled .gitignore that stopped ignoring config.yaml was repaired locally but never pushed, leaving the tree dirty. Commit whenever the safety step leaves changes. KeepLocalConfig skipped the restore when the bytes matched, so a checkout that rewrote config.yaml with the default mode dropped this machine's restrictive permissions. Compare the mode too, and chmod after writing since WriteFile's mode is masked by umask. * fix(git): restore config.yaml over a tracked config.yaml directory A pull that checks out a tracked config.yaml/ tree replaces the ignored local file with a directory, which os.Remove cannot delete, so restore failed and the local config stayed lost. Remove a directory there before writing the snapshot back; its contents are in Git. EnsureConfigUntracked now untracks recursively so push can remove that tree too. * fix: keep post-checkout config edits and preview .gitignore repairs Restore wrote the snapshot back whenever the pull changed config.yaml's index entry, even when a newer copy had been written after Git checked it out. Skip the restore when the file on disk no longer matches the blob the pull checked out. A dry-run push or commit only previewed untracking config.yaml, so when a later "!config.yaml" rule un-ignored it the preview listed config.yaml to commit while a real run repairs .gitignore instead. Preview that repair. * fix: scope the post-pull safety commit and keep post-checkout symlinks The post-pull safety step in push --pull ran `git add -A`, so an edit made by another process while the pull ran was committed and pushed under the config-safety message. Stage only .gitignore on top of the config.yaml removal and commit the index as staged. The post-checkout edit check skipped symlinks, so a dotfiles manager that replaced config.yaml with a newer link after the checkout had it replaced by the stale snapshot. Treat a link where Git checked out a file, or a different link target, as a newer local edit. * fix: preview explicit config.yaml entries and refuse other .gitignore edits A dry run previewed the .gitignore repair only when config.yaml was not ignored at all, but a real run also appends the explicit entry when a broader rule such as *.yaml ignores it. Preview whenever the entry is missing too. The post-pull safety commit staged the whole .gitignore, so an edit made by another process while the pull ran was pushed with it. Refuse unless the file only gained config.yaml lines over its staged version. * fix: report config.yaml restore failures instead of dropping them integrateRemote declared the KeepLocalConfig result with :=, shadowing the named err that the deferred restore joins its failure into, so a failed restore was swallowed and pull or push --pull went on to sync targets with another machine's config.yaml. The dashboard pull replaced the pull's own error with a bare 500 on a restore failure, losing the conflict response and the ops log entry; join the errors so both are reported. |
||
|
|
7fccd6ffa5 |
fix(pull): refuse root-scope first pull when remote tracks config.yaml (#357)
When git_root is configured as root, config.yaml is machine-specific and kept out of version control by .gitignore. If a remote repository tracks config.yaml, a first pull silently overwrites the local config.yaml during git merge or git reset. Detect whether the remote tracks config.yaml at root scope before integrating changes in FirstPull and init remote setup. If so, refuse the operation and report guidance to untrack config.yaml on the remote via push before pulling. Co-authored-by: Willie <egg358358@gmail.com> |
||
|
|
d78e7ce09a |
feat(cli): redesign init and give every command one output style (#360)
* fix(install): omit the empty audit section in dry-run A dry-run skips the security audit, yet the single-skill path still printed the "Audit Findings" heading with nothing under it, which reads as if the audit ran and found an empty result. * feat(init): ask first, confirm a summary, then write The old init asked nine questions in three input styles and wrote files as it went, so cancelling midway left a half-built setup, and detection created tool folders even under --dry-run. Connecting a second machine to an existing repo was only offered at the very end, and the built-in skill defaulted to "no", which read as "not recommended" (#200). init now collects every answer into a plan, shows a summary with Yes / Change settings / Cancel, and writes nothing until confirmed. Esc cancels cleanly. A "Connect my existing skillshare repo" path checks the repo before writing, detects its layout, prefers the repo version of same-name skills and keeps local-only ones for the next push. The built-in skill is installed by default, and the first sync runs at the end so the tools work right away. Prompts use one inline huh-based component with theme colors. Without a terminal (CI, scripts, AI agents) init now applies the same defaults as pressing Enter and prints each decision with the flag that changes it, instead of silently doing less; init -p and --discover add the detected tools. Output that is not a terminal is plain text. BREAKING CHANGE: non-interactive `init` now enables git, installs the built-in skill and selects every detected tool; pass --no-git, --no-skill, --no-targets or --no-copy for the previous minimal setup. Piped or redirected output no longer contains ANSI colors; use --json where offered for machine-readable output. Refs #200 * docs(init): show the new init flow and the connect-a-repo path The getting-started page still described the old four-question wizard with a screenshot of it, the second-machine guide never mentioned the new "Connect my existing skillshare repo" choice, and the recipe told users to run pull and sync after init even though init now does both. Replace the screenshot with ones from the new flow, describe the questions, summary and cancel behavior, and explain what connecting a repo does before and after confirmation. The devcontainer example gains --no-git because init without a terminal now turns git on by default. Refs #200 * feat(devcontainer): seed fake tools and a repo with ssenv --seed Trying init by hand needed several manual steps to fake installed AI tools and a skills repo to connect. `ssenv create --seed` (and `ssnew --seed`) now creates claude/codex/cursor directories with a few skills and a local bare repo at ~/remote/skills.git, so both init paths can be tried at once. Refs #200 * fix(ui): skip the logo on 16-color terminals and hide the cursor while it plays `docker exec -it` sets only TERM=xterm, which reads as 16 colors: the logo was mapped onto the terminal's own palette and its fade-in collapsed into a few flickering cells. Below 256 colors the banner now prints only its text, and the devcontainer sets COLORTERM=truecolor. The visible cursor also jumped along the logo's left edge while frames redrew in place. It is hidden during the animation and restored on exit, including Ctrl+C. Refs #200 * style(ui): color the question mark in prompts The uncolored "?" before each question read like a stray character. It now uses the accent color of the "›" cursor. Refs #200 * fix(init): name the root git scope by what it versions "everything" suggested plugins, MCP servers and hooks were versioned too, but they live in config.yaml, which the root scope gitignores. The option and summary now say "skills, agents, extras" and note that those settings stay in each machine's config.yaml. Refs #200 * feat(init): show --discover in the new init style --discover still printed the old header, "agent(s)" counts and "+ name" lists next to the new prompt. Global and project discover now share init's answered rows (Tools, Config) and a Next line, and call the targets "AI tools" as init's banner does. Refs #200 * feat(init): replace the pixel logo with a SKILLSHARE wordmark The half-block logo looked stretched on terminals with tall line height and turned to mush when shrunk to fit. init now opens with a three-line pixel wordmark, SKILL in blue and SHARE in gold, that lights up from left to right, followed by the version and tagline on one dim line. The generated logo data and its generator script are gone. Without a terminal, without color, below 256 colors or on a narrow terminal, the banner still prints a plain "skillshare vX" line. Refs #200 * refactor(init): label the chosen tools "Targets" init called them "Tools" while the rest of the CLI, the config file and the `target` command call them targets. The answered rows and the summary now say "Targets", the same label the other commands will use. Sentences that describe what was detected ("Found 3 AI tools") stay as they are. The docs tables, the First Sync steps and both init screenshots are updated to match. Refs #200 * feat(cli): ask yes/no questions with the inline prompt uninstall, trash empty, extras remove, target add, collect, update, upgrade and audit each printed their own "[y/N]:" line and parsed the answer by hand, while init already used the inline Yes/No prompt. They now share it: esc answers no, and a declined question prints one dim "Cancelled. Nothing was …" line, as init's cancel now does too. Without a terminal the prompt reads one line from stdin instead, so piped answers such as `echo y | skillshare uninstall x` keep working. It reads byte by byte so a second question still gets its own answer. Refs #200 * feat(sync): report each target on one aligned row Sync printed a ruled header, a "Backing up" block and a "name: merged (43 linked, 0 local, 0 updated, 0 pruned)" line per target, so the counts that changed were hard to find among zeros. It now follows the init style: one row per target with only the non-zero counts, a single Backup row, and a closing line with the duration. `sync --all` names its Skills, Agents and Extras blocks and no longer explains how to set up extras when none are configured. The non-TTY text changes with it; `--json` stays the stable interface for scripts. Tests match rows through the new AssertRowContains helper. Refs #200 * feat(status): show targets as one table Status printed each target as a header with indented skills and agents lines full of bracketed modes and zero counts, and the audit policy as four lines of uppercase labels. Comparing targets meant reading every block. Each target is now one row with a skills and an agents column, a single line names the modes in use, and audit and version take one line each. Global and project mode share the renderer, so project paths read relative to the project root. Refs #200 * feat(install): report each step on one aligned row Install printed a logo, a box-drawn tree, "Next Steps" bullets and a separate "Audit Findings" block, so the result was hard to find. It now uses the same rows as sync and status: Source, Audit and Install with the destination folded to ~, then a closing line and a Next block. Spinners write through a gate that Stop closes before clearing the line. pterm's render goroutine checks IsActive and then writes, so a fast step such as install --dry-run left "Copying files..." stuck in front of the next line. Refs #200 * feat(uninstall): confirm against one line and point at undo Uninstall opened with a boxed header and Name/Path lines, and closed with the trash folder path and a "Next Steps" bullet. Now one line names the target, its folder and what it holds; the result is a single "Uninstall x → trash, kept 7 days" row; and Next offers sync, the trash restore command that undoes it, and the reinstall command when the skill came from a remote source. A batch run with --force or --dry-run no longer lists the targets twice, since there is no question for the list to support. Mixed batches are counted as items, not targets, which already names the AI tools. Refs #200 * feat(update): report each skill or repo on one Update row Update opened with an "Updating" header, the full source path and a "0 tracked repo(s), 1 skill(s)" line, then printed a Changes box and two success lines before "Next Steps". A single update is now an Update row (source or commit count, time), the commits it pulled in dim text, the Audit row, and Next. A batch ends with the audit result and one closing line that leaves out zero counts. Progress bars now clear themselves when they stop, like spinners, so a finished batch no longer leaves "[3/3] ... 100% Done" behind. Refs #200 * feat(check): list what needs attention and close with one line Check opened with a header, the full source path and an item count, counted skills with updates without naming them, and ended with two "Run ..." hints. It now prints one row per repo, skill or agent that needs attention (behind, update available, stale, failed), a closing line that leaves out zero counts, and the update command under Next. A single-name check is one row, like update. Refs #200 * feat(push,pull): report commit, push and pull as aligned rows Push and pull opened with a header and closed with "Push complete" or "Pull complete", so they never said what they committed, where they pushed, or what a pull brought in. Push now prints a Commit row (file count and message) and a Push row naming the upstream branch, never the remote URL since it can carry credentials. Pull prints a Pull row with the commit and file counts and the commits themselves, as update does for a tracked repository, before the sync output. Dry runs list the changed files as ~ + - instead of raw porcelain codes, and error hints are dim notes instead of info lines. Refs #200 * feat(upgrade): report the CLI and the skill on one row each Upgrade opened with the logo and printed a tree of steps per part (current version, latest version, status) ending in "Already up to date ✓". Each part is now one row, such as "✓ CLI v0.22.0 → v0.23.0 · 3.1s" or "✓ Skill v0.23.0, already up to date", with spinners that clear. Sync is offered under Next only when the skill changed, and the star request is a dim line at the end. Refs #200 * feat(new): report the created skill on one row New printed a "New Skill Created" header, the full path, and numbered "Next steps" that told the user to edit the file and run sync. It now prints "✓ Created ~/…/SKILL.md", the folders a pattern added, and sync under Next. A dry run shows the same row, a Preview section with the template, and the dry-run line. Refs #200 * feat(trash): list items and restores as aligned rows The plain trash list printed each item as an info line with its size and age in parentheses under a "Trash" header, and restore printed two success/info lines plus a "Next Steps" label. The list is now rows of name, size and age with one closing count, and restore is one row naming where the item went back, with sync under Next. An item trashed under a minute ago reads "just now" instead of "just now ago". Refs #200 * feat(collect): list local items and results as aligned rows Collect opened with a header, listed local items as "[target] path" list items under a second header, then printed a third header before the per-item results and a metric summary line. It now lists each local item as a row (name, target, path), asks the inline confirm, prints one row per result and closes with "Collected N skills" plus sync and, when the source is a git repository, commit under Next. Refs #200 * feat(hooks): show hooks and their changes as aligned rows Hooks printed "Hooks source: <path>" as an info line, statuses through the fixed-width Status helper, and results as sentences ending in "Run 'skillshare hooks sync' when ready." Hooks and Agent file changes are now rows, with conflicts marked as failures and inactive outputs as warnings, saves and applies close with one line, and the next command sits under Next. The list's "Pending sync" section no longer shows entries that are already in place. Refs #200 * feat(mcp): show servers, changes and checks as aligned rows MCP printed "MCP source: <path>" as an info line, plan changes through the fixed-width Status helper, results as sentences that named the next command inline, and check summaries as "2 server(s) checked: 1 error(s)". Changes and parked servers are now rows with conflicts marked as failures, saves and applies close with one line and Next, and check marks each server with its findings beneath and closes with "Checked 2 servers: 1 error". The Status helper had no callers left and is removed. Refs #200 * feat(plugin): show packages, plans and results as aligned rows Plugin text output was raw "name · target · id · state" lines with "Warning:", "Includes:" and "Revision:" prefixes, and the list walked a map so packages came out in a different order each run. Packages, discovered candidates, planned changes and results are now rows sorted by name, marked by state (registered, not installed, pending, blocked, failed), with details as dim notes and the dry-run line after a preview. JSON output is unchanged. Refs #200 * feat(audit): replace header and summary boxes with rows Audit framed its context in a header box (mode, path, block rule, policy), numbered batch results "[1/2]", printed per-skill verdicts as "→ Aggregate risk / Block decision" lines, and closed with a Summary box that listed every count including zeros. The context is now one title line with a dim note, flagged skills are aligned rows with their highest severity, the summary leaves out zero counts, and the run closes with one line saying whether anything was blocked and by which severity, followed by the command to see the first blocked skill's findings. The progress bar no longer writes its final frame when stdout is not a terminal; that frame had no newline and ran into the next line. Refs #200 * feat(audit): show audit rules as aligned rows The rules list was a fixed-width table framed by 90-character dividers with a "(N rules: N enabled, N disabled)" footer, and rule changes were sentences like "Set severity for X → HIGH". Rules are now rows keyed by ID with a colored severity and the pattern dimmed, disabled rules dim as a whole, the list closes with a count that names disabled rules only when there are some, and each change is one row. Refs #200 * feat(search): drop the logo and tree, show results as rows Search opened with the ASCII logo, drew its progress as a ├─/└─ tree, listed results under a column header with dividers, and ended installs with "Run 'skillshare sync' to distribute to all targets". Results are now aligned rows with the source, stars or risk, and the description and tags beneath; a single install reports the same Install row as `skillshare install`; batch installs list only failures before one Done line; and sync and audit sit under Next. Login and rate-limit problems name the command that fixes them. Non-terminal output no longer prints a "name: installing..." line per skill. Refs #200 * feat(backup): show backups and restores as rows with one closing line Backup and restore opened with headers, announced dry runs with a warning before doing anything, summarized with an operation box, and followed a backup with a "Recent backups" list. Targets now back up in name order as rows with folded paths, runs close with one Done line (and Next restore), listings are rows keyed by timestamp or path with a total, and dry runs end with the shared dry-run line. Cleanup reports how many backups remain instead of a separate "Current" line. Refs #200 * feat(help): one line per command, subcommands in each command's help The top-level help opened with the ASCII logo and listed about 70 lines across ten uppercase sections plus 15 examples, so it did not fit a screen, yet it left out analyze and the common options. It now lists each command once in six groups with the common options, and points to `<command> --help` for subcommands. The mcp, plugin, hooks and extras pages use the same layout and keep all their content. A mistyped command prints one error with the closest command instead of the whole help, a lone option such as --no-tui shows the help, and `skillshare version` prints one line. Refs #200 * feat(extras): show extras and their changes as rows with Next Extras printed a header, "→ name" lines with ad-hoc colored marks (including ✗ for targets that were only waiting for a sync), and ended each change with a sentence naming the next command. The list now shows each extra as a bold name over aligned target rows (! for drift or not synced) and closes with a count and, when something is pending, Next sync extras. Init, collect, add/remove target, mode and source changes close with one Done line, details become notes, and dry-run collect ends with the shared dry-run line. Refs #200 * feat(target): show targets as sections and rows with Next Target info and the plain list printed "Key:" lines at two indent levels, with "(none)" for every unset filter, and remove printed "Backing up" / "Unlinking" headers with one line per step. Info now shows the name over Skills and Agents sections with aligned rows, the list gives each target one row per resource with details dimmed, and empty filters are left out. Remove reports one row per target (plus its backups) and closes with a Done count; dry runs say what would happen per target and end with the shared dry-run line. Skills on/off, add and mode/naming/filter changes close with Done and Next. Refs #200 * feat(doctor): report checks as aligned rows and end with Next Doctor opened with the ASCII logo, split its report under divider headers, mixed ✓/→/! lines with full paths and "(s)" counts, listed targets in random map order, and ended with a bare warning count that left the fix to scattered "Run:" hints. Checks now print as aligned rows under bold sections (Environment, Targets, Extras, MCP/hooks/ plugins, Storage, Version), paths fold to ~, targets are sorted with one row per resource, and the report closes with a Done line plus up to three Next commands collected from the checks (sync, sync agents, sync hooks, upgrade, ...). The --json output is unchanged. Refs #200 * feat(hub): drop the logo and report hub changes with Done hub index opened with the ASCII logo and a tree of spinner steps, then repeated the result as "→ Mode / Skills / Output" lines with the full path. It now shows one spinner that clears itself and a Done line naming the folded output path, skill count and duration, with the index contents as a note. hub list shows aligned rows with the default and built-in hubs marked in dim text instead of a "*" column, and the add, remove and default commands close with a Done line. Refs #200 * test(install): match the shared dry-run line in online tests The online-tagged install tests still looked for the old "dry-run" banner, which install no longer prints since the restyle. They are skipped by default, so the mismatch only showed under -tags online. Refs #200 * fix(target): align remove rows on target names only The label column was sized for "<name>-agents" so an agents backup could fit, which left a wide gap on every row when no agents were backed up. The agents backup row now uses the target name too and says "agents backed up", so the column fits the names. Refs #200 * fix(update): list each item in a batch dry run A batch dry run only said "Would update N skills". Off a terminal the names leaked out through the progress bar's title lines, but on a terminal those lines clear, so the dry run never said which skills or repos it would touch. It now prints one Update row per item, as the single-item dry run does. Refs #200 * fix(ui): keep the progress bar silent off a terminal Off a terminal the bar printed "Title (0/N)", every title change and every phase header as permanent lines, which a terminal shows only as a frame that clears itself. Audit left a stale "Scanning skills (0/7)" line, and scripts saw different content than a terminal. The bar now prints nothing off a terminal, like the spinner. Refs #200 * fix(audit): avoid a double blank line before Summary The audit header ends with a blank line and Summary added its own, so a clean scan with no result rows showed two blank lines in a row. The Summary title no longer adds one; the result rows add it when present. Refs #200 * fix(mcp): drop the blank line above "Saved the MCP source" A save with no backup or migration notes printed a blank line with nothing above it, so mcp add and mcp edit opened on an empty line. Refs #200 * fix(doctor): stop repeating the extra's name in its findings Extras findings printed "rules rules → /home/me/.claude/rules: 1 file(s) out of sync": the row label already names the extra, the path was not folded to ~, and the count used "file(s)". The rows now start at the arrow, fold the path and pluralize the count. JSON details keep the extra's name so each line still stands alone. Refs #200 * fix(doctor): show integrity issues as rows under Integrity Tampered skills and missing hashes printed as free "! Skill integrity: N skill(s) ..." lines after the verified row, breaking the aligned Environment rows. They now sit under a single Integrity row, which turns to ! when any skill has an issue. Refs #200 * fix(doctor): pluralize the Skillignore and Trash rows The rows read "1 patterns, 1 skills ignored" and "1 item(s) (50 B), oldest <1 day". They now read "1 pattern, 1 skill ignored" and "1 item, 50 B · oldest under a day". The JSON messages keep their wording, since scripts may match on them. Refs #200 * docs: show the restyled output of batch 3 commands The reference pages still showed the old output of upgrade, new, trash, collect, audit, search, backup, restore, extras, hub, target and doctor: divider headers, arrow-prefixed lines and "(s)" plurals. The examples now match what the commands print, in all five locales, and the doctor check table uses the new row labels. Refs #200 * feat(trash): let trash empty skip its confirmation with --force Scripts had no way to empty the trash: off a terminal the confirmation reads stdin and cancels on EOF. --force (-f) skips it, as it does for uninstall and extras remove. Refs #200 * fix(doctor): show source, link and target problems as rows Missing sources, unsupported links, folders without SKILL.md, unknown skill targets, bad include/exclude patterns and broken symlinks printed as free "✗ Source not found: …" lines between the aligned rows. They now use the row of the check they belong to, and broken symlinks or a missing source add a Next suggestion. Refs #200 * fix(ui): leave out durations that would read 0.0s Fast commands ended with "· 0.0s", which says nothing. Every result line now formats its time through ui.Took, which init already used for its steps: durations under 0.05s are left out. Refs #200 * fix(ui): print dev builds without a v prefix Version labels were built as "v" + version everywhere, so a dev build printed "vdev". VersionLabel adds the prefix only when the version starts with a digit, and the logo, help header, version command and upgrade output share it. Refs #200 * fix: pluralize category and drop "just now ago" The checklist status bar appended "s" to its item name and printed "categorys". The trash TUI formatted ages with its own helper that added "ago" after "just now". plural now handles consonant + y, and the trash TUI uses the shared timeAgo, which makes formatAge unused. Refs #200 * fix(target): drop the parenthesized counts in the plain list The plain target list printed "merged (43 shared, 0 local)" while target info and doctor print "merged · 43 shared" with zero counts left out. The sync summary now returns both forms from one scan, so the TUI and --json keep their existing text and the plain list matches the other commands. Refs #200 * test(backup): make the agents backup test back something up The test only synced agents, which become symlinks into the source and are skipped by backup, so it passed without any backup being written. It now adds a target-local agent and checks that the file lands in the backup. Refs #200 * refactor(cli): render every command's --help with printHelp About forty help pages were hand-aligned raw strings with "Usage:", "Options:" and "Examples:" headings, while hooks, mcp, plugin, extras and the top-level help already used printHelp. They now share it, so headings, option order (short flag first) and alignment match across commands. Examples align on their own column so long commands no longer push option descriptions to the right, and "--help, -h" rows are dropped as on the converted pages. Refs #200 * feat(enable): print enable and disable results as rows enable/disable still used the old "Disabled: x (added to .skillignore)" line plus a "Run skillshare sync" sentence. They now print one row per pattern, a Next hint after a change, and the dry-run closing line, like the other restyled commands. Refs #200 * fix(sync): pluralize the leftover cleanup note Project sync printed "Cleaned 1 leftover skill(s)". The note now uses the singular or plural noun, and the sync docs show it as the dim note it is instead of an arrow line. Refs #200 * fix(cli): drop the arrow info lines left in install, update and sync These commands were restyled, but about fifty messages still went through ui.Info, which prints a leading arrow, and several said "skill(s)" or "item(s)". Hints now print as dim notes, empty results ("No agents found") as closing lines, follow-up commands as Next, and counts use the singular or plural noun. Refs #200 * fix(cli): tidy small leftovers found in the recorded output doctor printed "0 minutes ago" for a fresh backup and an ASCII arrow in the Update row, unlike trash and upgrade, which say "just now" and "v1.2.0 → v1.3.0". The "bring the Targets up to date" hint capitalized a word mid-sentence, and search --list showed hub sources under the home directory as a cut-off absolute path instead of folding it to ~. JSON messages keep their wording. Refs #200 * fix(search): fit a home-folded source path in the list Folding the home directory to ~ was not enough: a typical local hub path such as ~/.config/skillshare/skills/frontend/react is 42 characters, so the 40-character cap still cut it. Fifty characters next to the 24-character name column stays within 80 columns. Refs #200 * feat(list): print the plain list with rows and a closing count The --no-tui list still used the old header with a divider and an arrow on every skill, so it looked unlike every other restyled command. Skills now line up in one column under their group, tracked repos use the ✓ / ! marks, and the list closes with a count split by tracked, remote and local (zero counts left out). Project mode keeps its scope as a dim "· project" after the title. Global and project had copied the same plain-output code; both now call printSkillList. The loading spinner clears itself instead of leaving a "Loaded N skills" line. Refs #200 * fix(cli): show help for subcommand --help instead of running it target add/remove/list, trash list/empty and hub list/remove passed --help through as an argument, so they ran the command, failed on a target or hub named "--help", or rejected the flag. tui on --help even switched the TUI on. Each now prints its command's help page. The tui status and toggle lines also move to the row and Done style. Refs #200 * feat(diff): print differences as rows and close with next steps The plain diff still printed a Summary line, divider headers, arrow hints and per-target "scanning" lines when output was not a terminal. Each group of targets now lists one row per kind of change ("New a, b"), targets in sync share a single ✓ row, extras use the same rows, and diff closes with a count and up to three commands. The suggested sync command follows what differs: sync, sync agents, sync extras or sync --all. Agents no longer show as "New 1 skill", because rows name the change rather than counting skills. "skillshare diff all", listed in the help, failed with "target 'all' not found"; it now diffs everything, the same as no argument. Refs #200 * test: sync the install warning summary and gofmt two status tests The "6 findings" wording changed in an earlier commit, but the unit test under cmd/ still expected "6 finding(s)": scripts/test.sh and make check only run ./internal and ./tests, so the cmd tests never ran. Two status tests also had comment alignment gofmt rejects, which fails make check's fmt-check. Refs #200 * test: run the cmd unit tests in scripts/test.sh CI runs go test ./cmd/skillshare/... ./internal/..., but the local runner behind make test and make check only ran ./internal/..., so a stale assertion in cmd/skillshare passed locally and would only fail in CI. Refs #200 * feat(cli): restyle commit and analyze output commit and analyze were the last git and inspection commands still printing the old header and table layouts. They now use the same rows, Done line, and Next hints as push and pull, so a commit reads like the commit row of push, and analyze shows each target group as a bold name with aligned token rows instead of a boxed table. Refs #200 * feat(log): show entries as rows and fold the log path The plain log view still opened each section with a boxed header that printed the absolute log path, then a TIME | CMD | STATUS table. Entries now read like every other command: a status mark, the command, when it ran and how long it took, with details indented beneath. The log path is folded to ~ and moves to a dim footnote. log --stats drops its divider and ends with one summary line. It and the TUI stats panel said "just now ago" for a fresh entry; both now use timeAgo, which already handles that case. Refs #200 * feat(cli): restyle completion, ui and leftover arrow lines completion --install, ui start/stop and a few notices still printed arrow info lines with absolute paths. They now end with a Done line, fold paths to ~, and give config-file lines their own bold heading so the lines to paste read apart from the hints. The empty extras TUI now says the same thing as extras list. Refs #200 * feat(init): report git changes on an existing setup as rows init --remote and init --git-root on an existing setup still printed arrow lines with absolute paths and spinner results in a different voice. They now print aligned Git, Remote, Pull and Git root rows like a fresh init, end a dry run with the shared Dry run line, and give the choices after a remote check as Next commands. A source repo the user created before init had no fallback identity, so on a machine without git config the follow-up commit failed and dumped git's whole "Please tell me who you are" message. The existing repo now gets the same local fallback a new one does. Refs #200 * feat(doctor): warn when a newer built-in skill is published status already compared the skillshare skill with the published one, but doctor only printed the local version, so a run meant to find problems called an old skill healthy. doctor now fetches the published version alongside the CLI update check and suggests upgrade --skill. Both commands share a semver comparison. status compared with !=, so a skill ahead of main (a dev build) was reported as having an update. Refs #200 * fix(cli): count batch audit warnings in words and clear progress spinners The batch install and update audit summary still printed "2 skill(s)" and "warning(s)" after the rest of the output switched to "1 skill" / "2 skills". uninstall and agent update also left "Found N skills" and "Check complete" behind, progress messages the restyle clears. Refs #200 * fix(cli): say so when diff or analyze has no targets With no targets configured, diff reported "No differences" and analyze printed only its "Add -v" hint, both reading like a healthy result. They now say no targets are configured and suggest target add, as target list does. Refs #200 * fix(diff): align values across target sections Each target section sized its labels on its own, so a section with "Local only" started its values two columns later than one with only "New", and the list read ragged. All sections now share one width. Refs #200 * fix(doctor): count built-in skill warnings in the summary The skill rows (not found, missing version, newer version available) were marked as warnings and counted by --json, but never reached the text summary, so doctor could print "! Skill not found" and close with "All checks passed". The all-good integration test only passed because of this; it now installs the built-in skill it needs. Refs #200 * fix(init): stop writing a git identity into existing repos On a repo the user created, init stored skillshare@local in the repo config so its one commit would work. That setting outranks --global, so the advice we printed never took effect and later pushes went out as skillshare@local. The commit now gets the fallback through env vars only. The note for repos init creates names the repo-level command that actually overrides it. Dry runs also wrote .gitignore into existing repos while closing with "nothing was written", and warned about --no-git when it was not passed; both now only describe what would happen. Refs #200 * fix(cli): tell "no targets" apart from "nothing reaches them" diff and analyze said "No targets configured" and suggested adding one whenever there was nothing to show, including when targets exist but have skills turned off or no skill is meant for them. Refs #200 * fix(log): drop the trailing separator on instant entries Entries with no recorded duration ended in a dangling " · ". Also removes the formatRelativeTime alias the stats restyle left unused; its test now covers formatDurationShort directly. Refs #200 * docs: match tui, project list and log examples to the real output The tui and project list examples used label widths the CLI does not print, and the plain log example claimed to show non-TTY output, which joins each entry's details on one line. Refs #200 * perf(version): cache the published skill version for a day doctor and status asked GitHub for the latest skill version on every run, adding up to 3 s when offline. They now reuse the answer for 24 hours, the same interval the CLI update check caches for. upgrade --skill still fetches fresh and records what it got. Refs #200 * perf(server): reuse the cached skill version on the dashboard The version endpoint fetched the published skill version on every call, like doctor and status did, so it now shares their 24-hour cache. It also treated any difference as an update, offering a "newer" skill to anyone running a local build ahead of main. Refs #200 * test(redteam): match the restyled update --diff heading update --diff now titles its file list "Files changed" in sentence case, like every other section, so the check for the list looked for the old "Files Changed" box title and failed although the list was there. Refs #200 * test(cli): keep /tmp fixtures unfolded where HOME is /tmp scripts/test.sh now runs the cmd unit tests, so the docker sandbox runs them too, with HOME=/tmp. shortenPath then folds the /tmp fixtures in four tests to ~ and their exact-path checks fail. The tests now point the cached home elsewhere while they run. Refs #200 * fix(init): find skills/ in a repo that holds nothing else The check for a skills/ folder ran only when the repo root had no skill folders, but it counted skills/ itself as one, so it never ran. A repo with only skills/ became the source as a whole, one level too high. Refs #200 * fix(init): keep the skills git scope for a custom source With a remote that has no skills yet, init defaulted to versioning the whole skillshare folder. For a --source outside that folder it holds none of the user's skills, so the commit and every later push carried nothing while init reported the remote as linked. Refs #200 * test(sync): check only the Agents section for updated agents The restyle turned the old "0 updated" check on the agent summary into "no 'updated' anywhere", which also covered the Skills section. On macOS the first project sync reports the skill as updated there, so the test failed on something it was never meant to check. Refs #200 |
||
|
|
6f3d6a310e |
fix(pull): keep files-only local commits on first pull (#352)
* fix(pull): keep files-only local commits on first pull FirstPull decided whether local history was worth keeping by looking only for root-level directories. Agents and extras repos hold their content as root-level files, so a repo with real local commits but no directories was treated as empty and reset --hard onto the remote, discarding that work without --force. Count any root entry except .git and the scaffold .gitignore as local content, matching how init already distinguishes a scaffold commit from real content. A scaffold-only repo still resets for a clean linear history. * docs(i18n): describe first-pull local content rule in translations Keep the ja, ko, zh-Hans and zh-Hant pull references in line with the English page now that any root file, not only a directory, counts as local content worth merging. * fix(pull): ignore git-ignored files when detecting local content A raw directory scan counted ignored files such as .DS_Store as local content, so a scaffold-only repo merged unrelated history instead of resetting onto the remote and could fail when the remote tracks that path. Ask git for tracked and non-ignored files instead. init --remote also told users that 'skillshare pull' replaces local with remote, but with local content pull merges both sides; replacement needs --force. Show both options accurately. * fix(pull): keep local ignore rules when first pull resets With empty directories no longer counting as local content, a root-scope repo holding only its scaffold .gitignore now resets onto the remote. If the remote .gitignore lacks the config.yaml rule, the reset drops it and the machine-local config.yaml shows up as untracked, so the next pull fails as dirty. Carry any rule the reset drops into .git/info/exclude: it stays local, keeps the tree clean, and needs no automatic commit. init --remote's reset path uses the same helper. * fix(pull): keep leading whitespace in migrated ignore rules Leading whitespace is part of a gitignore pattern, so trimming ' foo' to 'foo' before writing it to info/exclude made a plain foo file ignored and silently left out of later commits. Copy raw lines and only normalize to detect blanks. * fix(pull): keep counting directories as local content Dropping directories from the local-content check made a scaffold-only root-scope repo (empty skills/ and agents/) reset onto the remote, where it used to merge. Patching that new reset path kept surfacing edge cases (dropped ignore rules, whitespace-sensitive patterns, an ignored config.yaml overwritten by --hard). Count directories again, so root scope keeps its previous merge behavior, and drop ResetKeepingIgnores, which existed only to patch that path. The original fix stays: tracked or non-ignored root-level files now also count. |
||
|
|
73c4a8d27e |
feat(ui): resolve Git pull conflicts across computers
Guide diverged repositories through pull-and-merge or commit-and-pull before pushing. Compare conflicting file versions in the dashboard and require explicit choices tied to the reviewed revisions, while preserving both histories and automatic metadata merging. Cover previews, modify/delete conflicts, stale and invalid choices, binary and large files, and dry-run behavior. Add an isolated preview fixture, verification runbook, translations, and documentation. Validated with devcontainer make check, targeted Git API and UI tests, UI lint/build, website build, React Doctor, and a real isolated UI pull-resolution-push flow across all four themes. |
||
|
|
6fbb5e109b |
feat(ui): add Git Sync discard changes
Let users discard uncommitted source changes after confirmation, with dry-run support. Restore tracked files to HEAD and remove untracked files while preserving ignored files, nested repositories, and root-scope config.yaml. Guard against ancestor repositories and repositories without a first commit. Cover the API and confirmation flow with regression tests and sync all UI locales and Git Sync documentation. |
||
|
|
b6613b5d12 |
fix(git): include git's stderr when IsDirty fails
uninstall, update, status, list and the Web API now report "failed to check git status: <err>", but the error was only "exit status 128" because IsDirty dropped what git printed on stderr. The message now says why git status failed, such as a corrupt index. |
||
|
|
a2a426b851 |
refactor(git): remove unused Pull, ForcePull and PushRemote wrappers
Nothing in the repository calls these three unauthenticated wrappers. Every caller uses the WithAuth or WithEnv variants, which stay. Removing them means new code cannot pick the variant that silently skips token auth. |
||
|
|
9dab28fc19 |
fix(git): undo a pull's partial checkout and explain permission errors
When git cannot finish a pull's checkout (for example, it may not unlink a root-owned file), it stops without undoing the files it already wrote, and with no MERGE_HEAD there is nothing for merge --abort to undo. The remote's copies then showed up as local changes: the dashboard blocked the next pull and suggested committing them, which would push the stale remote content back as a new commit. A failed pull now restores paths that were clean before it started and now hold exactly the upstream version, leaving the user's own edits alone. The dashboard reports permission failures with a permission_denied code and shows the chown command that gives the source folder back to the current user. |
||
|
|
bf32112032 |
feat(git): show pending remote commits and auto-merge metadata conflicts
Two machines sharing a source repo kept stopping at the same two places. The Git page had no way to know the remote moved until a push bounced, so it now fetches once on open and labels Pull with the commit count (status itself stays offline because the sidebar polls it). And both machines rewrite .metadata.json on every install or update, so nearly every diverged pull conflicted there; those conflicts are now merged per entry, keeping the later installed_at, while any other conflict still stops the pull and names the files. |
||
|
|
51af1d30ba |
fix(git): recover when two machines push to the same source repo
Once both machines committed, the UI push was rejected and the follow-up pull failed with "Need to specify how to reconcile divergent branches", leaving no way out without a terminal. Pull now merges explicitly and aborts a conflicted merge so a later commit-all cannot push conflict markers; a rejected push returns push_rejected so the UI offers Pull. |
||
|
|
338bc2c2a4 |
fix(install): harden ref pinning after code review
- Fallback fetch pulled only the default branch because a depth-1 clone is single-branch; fetch all heads and tags so an abbreviated SHA off the default branch resolves. - Move the --track guard from CLI flag parsing into InstallTrackedRepo so the Web UI is covered too, and reject tags as well as SHAs: both leave HEAD detached with nothing for `git pull` to follow. - An all-hex branch or tag name (e.g. 20240915) was treated as a SHA in check and never queried; look the ref up first and fall back to the literal SHA only when the remote has no such ref. Full 40-char SHAs still skip the network. - Rename the git package's 7-char shortHash to abbrevHash to avoid clashing with install's 12-char helper. Refs #281 |
||
|
|
3000227175 |
feat(install): support commit SHA and tag pinning via --branch
Teams with supply-chain review need reproducible installs, but --branch
only worked for branch names because git clone --branch rejects SHAs.
Clone the default branch and detach at the pinned commit (targeted
depth-1 fetch, falling back to --unshallow for abbreviated SHAs or
servers that refuse arbitrary wants). Resolve tags in check via
refs/tags and the peeled ^{} commit, and short-circuit SHA pins without
a network round-trip since they can never move. Reject --track with a
SHA: a tracked repo must follow a branch to pull.
Closes #281
|
||
|
|
4bcd569e25 |
feat: MCP connections, plugins and a redesigned dashboard (v0.21.0) (#285)
* feat(mcp): sync portable server configuration across six clients
Add inline and external MCP sources with guided CLI and dashboard setup, native imports, conflict previews, ownership tracking, backups, and restore. Support Claude Code, Codex, Cursor, VS Code, OpenCode, and Grok CLI in global and project scopes.
Format YAML on save, document MCP fields in the config assistant, and keep its layout stable for scalar list items. Include schemas, localized UI copy, documentation, and regression and end-to-end coverage.
* fix(config): keep loading config when the MCP section is invalid
A mistake in the mcp section (an unknown key, a targets value that is
not a list, an invalid server field) made config.Load, LoadProject,
Save, SaveIn and ValidateConfig fail. Every command that reads config,
including skills sync, install, list and the dashboard, stopped working
because of settings it never uses.
MCPConfig now keeps a section that does not parse exactly as written and
records the error instead of returning it, so commands unrelated to MCP
load and save the config without touching that section. MCP commands
still validate their source on every run, and the dashboard config
editor calls the new ValidateMCP, so saving an invalid MCP section there
is still rejected.
Also correct the ProjectSources comment: sources.mcp resolves from the
directory containing config.yaml, not from the project root.
* fix(mcp): protect Agent files during concurrent edits and recovery
A release review of the MCP sync engine found ways it could lock users
out, report false conflicts, or change entries it does not own.
Recovery
- A failed write left pending.json behind, and every later MCP command
refused to run. Failed writes now remove their journal, and a journal
whose Agent file changed again is discarded, because ownership hashes
still flag entries that no longer match.
- Preview no longer writes. It reads the ownership that recovery will
record, byte for byte, so a preview stays valid across the recovery
that the next write performs under the lock.
Concurrent Agent writes
- Claude Code rewrites ~/.claude.json on its own, so hashing whole files
expired previews and failed applies. Revisions and pre-write checks
now cover only the MCP entries, and apply rereads each file and applies
the previewed entry edits to its current content, keeping settings the
Agent wrote after the preview.
Comparison and ownership
- Only fields Skillshare renders are hashed, after dropping defaults
Agents add or omit (type stdio/http, empty env, args or headers,
enabled: true) and header name case, so equivalent entries are not
reported as drift. enabled and disabled are compared, so turning off a
managed server is a conflict instead of being overwritten.
- An unmanaged entry that already matches the source is reported as
unchanged but no longer claimed, so removing the server never deletes
an entry the user wrote. Import adopts it explicitly, and without
--replace refuses to rewrite a differing entry, such as a literal token
that import turned into an environment reference.
- Sync keeps Agent-only fields such as timeouts in existing entries.
Import
- Agent-only fields become warnings instead of blocking the import.
- streamable-http is accepted, and enabled/disabled flags are checked
for every client.
- Values carrying a URL password, such as database DSNs, become
environment references, and credential-like arguments are flagged.
Writes and state
- Save only renders the definition first, so a server that could never
sync, such as one without targets, is rejected before it is saved.
- A symlinked config.yaml is written through to its target.
- TOML entries are updated in place, keep CRLF line endings, and repeated
add/remove cycles no longer grow blank lines.
- JSON edits no longer HTML-escape characters such as &.
- GROK_HOME is honored.
- Backups keep the newest 20 per Agent file, pruned by file name, and
damaged backup files are skipped instead of failing the list.
- GET /api/mcp no longer fails when an Agent that no server uses has an
unresolvable path.
* feat(mcp): detect the client format of pasted JSON
Import without --from, the add wizard and the dashboard import API
assumed Claude's mcpServers shape unless a client was named, so VS Code
"servers" and OpenCode "mcp" snippets copied from server docs failed to
import. The client is now chosen by the top-level key, and a bare server
object still reads as Claude's single-entry shape.
TOML stays explicit because Codex and Grok share the format; a .toml
file without --from is still read as Codex.
* refactor(mcp): print CLI results through internal/ui
MCP commands wrote plain fmt output and duplicated statusFromErr, unlike
every other command. Plans, backup IDs and save/apply messages now use
the shared ui helpers, so they get the standard status prefixes and
colors; each change line shows the server name, action and target. The
operation log uses statusFromErr. --json output is unchanged.
* fix(server): serve MCP settings only to localhost or IP hosts
MCP settings include stdio commands that Agents execute, so a web page
must not be able to read or change them. The existing Origin check does
not stop DNS rebinding: once an attacker's domain resolves to 127.0.0.1,
the browser sends that domain as both Origin and Host from a loopback
address, and the dashboard also binds 0.0.0.0 in Docker.
Rebinding always needs a domain name, so every MCP route now also
requires a Host that is localhost or an IP literal, whatever the bind
address. Other dashboard routes are unaffected. Opening the dashboard
through a domain name, including a reverse proxy, therefore returns 403
for MCP settings; the message says to use localhost or an IP address,
because rewriting Host at the proxy would still fail the Origin check
and would reopen the hole.
Remove the unused POST /api/mcp/sync endpoint. Configuring with sync
covers it, and the guard wraps every remaining MCP route.
* fix(sync): make sync --all report MCP results reliably
- "sync -g mcp" and "sync --dry-run mcp" ran skills sync, because mcp
was only recognized as the first argument. It now matches in any
position.
- sync --all --json printed plain-text errors when the MCP preflight
failed, and only an error on conflicts. Preflight errors now use the
JSON error shape, and conflicts also return the credential-free plan so
scripts can see which entries conflict.
- When resource sync failed, MCP was skipped without notice. Text output
now warns that MCP settings were not applied; JSON output omits the mcp
field, which --all otherwise always includes.
- MCP was applied with the preflight revision, which failed whenever the
resource sync changed config or state in between. It is now planned
again under the MCP lock, and conflicts found then still stop the
write.
* fix(sync): recognize agents and extras after flags
sync only checked the first argument for a resource kind, so
"sync --dry-run agents" and "sync -g extras" silently synchronized
skills instead. Sync flags take no values, so the kind now matches in
any position.
The shared parseKindArg keeps its first-argument rule: uninstall, update
and similar commands accept resource names, and a name such as "agents"
must not be read as a kind.
* feat(ui): redesign the MCP dashboard around a server-by-agent matrix
The MCP page listed servers and planned changes as flat text, which made
it hard to see where each server is written and what needs attention.
- A matrix shows each server's status per Agent, summarizes pending
changes and conflicts, and can hide synced entries. Agents whose MCP
file or config directory exists are marked as detected; GET /api/mcp
now returns the detected clients.
- Setup is a two-step dialog: add a remote URL, paste JSON or TOML, or
import from an Agent, then preview which Agent files change. Importing
an entry the Agent already has adopts it, Replace overrides only that
entry, and a target selection equal to the inherited mcp.targets is
saved without pinning targets on the server.
- Conflicts explain their cause and offer Import from <agent> or
Replace. Removal lists the affected Agent files and offers removing
from the source only or removing and syncing. Backups are grouped by
day, with a preview before restoring a file.
- Agent icons appear on the MCP and Targets pages, and the universal
target is marked as a path shared across agents. Brand icons come from
@lobehub/icons-static-svg, with bundled SVGs for Warp and Zed.
- Segmented controls wrap instead of overflowing narrow containers.
- New copy is translated for every supported locale.
* fix(ui): let Sync all apply MCP after syncing resources
Sync all previewed MCP, synced skills, agents and extras, then applied
MCP with the revision from the first preview. When the resource sync
changed config or state, that revision was stale and MCP failed with
"preview again" after everything else had already been synced.
MCP is now rechecked before and after the resource sync by comparing the
reviewed changes (target, name and action) instead of the revision, and
applied with the fresh revision. A different set of changes still stops
before any MCP file is written.
* fix(ui): keep flow-style YAML collections when saving config
Formatting on save forced every collection into block style, so a
hand-written "targets: [claude, codex]" was expanded into a list each
time the config was saved. Each collection now keeps its flow or block
style, indentation is still normalized and comments are preserved, and
flow collections are not padded with spaces.
* docs(mcp): document ownership, normalization and dashboard host rules
- Explain that matching entries stay unmanaged until imported, so
removing a server leaves them in place, and that import adopts an
identical entry while --replace rewrites a differing one.
- Note that Agent defaults and header case are not treated as changes,
that disabling a managed server is a conflict, and that previews stay
valid while an Agent rewrites unrelated settings.
- Describe Agent-specific fields, streamable-http, GROK_HOME, backup
retention, recovery by the next MCP write, and the VS Code limitation
on environment references in headers.
- Document that MCP settings require opening the dashboard by localhost
or an IP address, with SSH port forwarding for remote machines.
- Update the built-in skill for all six clients and the adoption rule,
and the MCP runbook for import refusal, Agent-specific fields and
pulled changes.
* docs(skill): streamline guidance and refresh resource workflows
Keep the built-in skill entrypoint focused and route agent and MCP details to dedicated references. Correct scope, audit, automation, and recovery guidance against the current CLI.
* feat(ui): redesign the dashboard around two styles and a flatter layout
The dashboard had grown page by page, so the same idea looked different
depending on where you met it and pages held controls with nothing to act on.
This rebuilds it on one token set that drives both the Clean and Playful styles
in light and dark, and reshapes the pages around what a person actually does.
Notable changes:
- MCP: replace the server-by-agent matrix with one row per server. The agents a
server writes to are chips inside the row, so the list grows downwards as more
CLIs gain MCP support instead of scrolling sideways.
- Settings: collect General, Backup, Log, Health, Extensions and Files into one
page. The Files tab keeps a panel beside the editor showing what the field
under the cursor does, the file's shape, or the unsaved changes.
- Audit rules: the YAML editor gets the same panel, plus a Test tab that runs a
rule's regex against pasted lines.
- Skills and Agents become separate pages; install, search, updates and trash
move into them. Old routes redirect.
- Tour: rewrite every step's copy, add MCP and Install steps, and anchor each
step to a control that is always rendered so no step silently times out.
- Give every button a pointer cursor; the browser default does not say a button
is clickable and each component class had to opt in by hand.
Docs follow the new Settings tabs and the MCP list.
* chore(devcontainer): move dev servers to uncommon ports
5173, 19420 and 8888 are defaults that other projects on the same
machine already hold, so `make devc` failed to bind and the container
never started. Use 45173, 49420 and 48888 instead, identical inside and
outside the container so every banner, log and doc prints the URL that
actually works.
* feat(ui): link dashboard source counts to their pages
The counts in the playful dashboard's source note named a number but led
nowhere, so reaching Skills or MCP from there meant going back to the
sidebar. Each row is now a link to its own page.
The hover fill uses currentColor because .ss-pinnote.src overrides the ink
tokens for the yellow note.
* feat(ui): build and browse hubs from the dashboard
A hub is a JSON index that lists skills, and until now the web UI could
only consume one someone else had already hosted. Writing the index by
hand was the only way to produce one, and the two halves never met: the
dialog that searched hubs and the page that would have built one shared a
config file but nothing else.
The new /hubs page holds both halves behind two tabs:
Browse pick a hub, filter its contents by tag or text, install from it
without leaving the page
My hubs assemble an index from installed skills, validate it, export it
A draft is offered as a source in Browse straight away, read from the
draft API rather than a file, so you can see what a recipient sees before
deciding whether to host anything. Where the index is hosted is stored on
the draft and stripped from the exported document, so a reopened hub
remembers where it was published and the published file stays clean.
Hub management moves out of the install dialog, which keeps only the
search-source dropdown and links here.
Routing switches to createBrowserRouter for useBlocker, which guards the
builder against navigating away from unsaved entries.
* docs(extras): add shared instructions recipe for AGENTS.md across agents
Answers a recurring question about sharing one instruction file between AI
agents: extras already covers it, since each agent keeps its user-level
copy in its own directory and one extra can target all of them.
Naming the source file AGENTS.md rather than something neutral matters —
Codex concatenates AGENTS.md files and has no import syntax, so it only
recognises the file by name. Claude Code and Antigravity read a fixed
filename of their own but resolve @-imports, so a one-line CLAUDE.md or
GEMINI.md picks up the synced file.
Says plainly that this is not agent memory. Agents keep their own
learnings in private stores — a Markdown directory for Claude Code, a
database for Codex, non-file storage for Cursor — so that side is a
migration problem, not something syncing files can solve.
* feat(ui): filter skills and agents by target
The Targets column showed which targets a resource reaches, but there was
no way to narrow the list down to one. The filter reads the sync matrix —
the same source that column renders — so a result always matches the icons
the rows show.
Options and counts are derived from the matrix, so no target is offered
that would filter to nothing, and the control stays hidden until at least
two targets have something. A selected target that disappears on a kind
switch or an uninstall falls back to All rather than emptying the list.
The toolbar had 24px to spare at 1440px, so the new control wrapped the
row. Source moves from a 325px segmented control to a dropdown like its
neighbours, and every filter now sizes to its label instead of a fixed
width that truncated the longer values.
* fix(ui): tighten page headers and reach hubs from skills
PageHeader carried mb-7 while .ss-wrap already separates its children with a
28px flex gap. Margins and flex gaps add up rather than collapse, so every
page inside the wrapper opened with a 56px hole under its title. Move the
default onto .ss-pgh so the wrapper can zero it, keeping the 28px for pages
that lay out their own children.
Hubs is a source you install from and a catalog you publish, not inventory
you own, so it no longer sits in the Library group next to Skills, Agents and
Plugins. The Skills page header already links to it and the page already
carries a back link there. Skills stays highlighted while the hub page is
open. Plugins takes the Package icon its own page identifies with, so the
sidebar no longer shows two identical puzzle pieces.
* fix(skill): stop implement-feature from running --no-tui as a command
The dispatch-order note wrote "not --no-tui" as !`--no-tui`. In a skill file
that is the syntax for running a shell command at load time, so the skill died
with "command not found: --no-tui" before any of it could be read. Spell the
condition out in words instead.
* feat(list): toggle model invocation for a skill with M
The only cheap gesture in the list TUI was E, which hides a skill from every
harness. Wanting a skill installed but not auto-loaded meant leaving the TUI
to edit SKILL.md, so people disabled skills they only meant to make
manual-only. M flips disable-model-invocation in place and the detail panel
shows a "manual only" badge so the state is never a blind toggle.
Unlike E this edits the skill file, which upstream may own: update skips
tracked repos with local changes, and reinstalling a skill drops the edit. M
says so and asks before writing in those cases. The flag is written as a
single-line edit rather than a YAML round-trip, and turning it back off
removes the line, so two presses return the file byte for byte and a tracked
repo is clean again. Agents are left alone; their harnesses do not read the key.
Refs #283
* feat(plugin): manage complete plugins across agent tools
Add CLI, TUI, and web flows for discovery, adoption, sync selection, updates, and removal while preserving native package formats and unrelated installations.
Support Claude, Codex, Cursor, Antigravity desktop, Pi, and OpenCode. Update help, completions, built-in skill, and documentation; keep plugins outside sync --all.
* docs(skill): describe the redesigned dashboard in the style skill
The style skill still documented the pre-redesign hand-drawn system, so
pages written with it came out on legacy tokens and outside the ss-*
classes; the new Plugins page was the first casualty.
The rewrite names tokens and classes and points to components.css for
their values, because copied values are what went stale last time. The
ui command docs described Playful by the old look as well.
* fix(ui): keep Playful ghost buttons free of stray shadows
The hover and disabled rules outranked the ghost variant's
box-shadow: none, so a frameless button grew a lone shadow arc in
Playful. Bulk toolbar and toast buttons shared the problem.
Ghost also gets a soft outline in Playful: beside 2px ink frames a bare
label such as Cancel did not read as a button.
* refactor(ui): lay out the Plugins page like the MCP page
The page was built on legacy tokens and plain markup, so it missed the
Playful frames and drifted from every other page. A per-agent column
layout would not have scaled either: each agent that gains plugin
support would add a column.
Plugins now follow the MCP server list: one row per plugin with its
agents as toggles inside the row, so the list only grows downwards.
Per-agent sync and update move to package-level actions in the row
menu, and the dialogs use the standard header, body and footer.
* feat(ui): give plugins a kind colour and per-agent actions
Plugins borrowed a neutral grey tile because no kind colour existed,
which made them the one resource without an identity on the page.
Magenta sits furthest from the five hues already taken.
Laying plugins out as rows had dropped the per-agent sync and update.
Retrying one agent after a partial failure should not re-run the rest,
so each agent in the expanded row gets its own menu. Update is left out
for a deselected agent, which has nothing installed to update.
* feat(ui): count plugins on the Dashboard
The source summary listed every resource kind except plugins, so the
Dashboard under-reported what a source holds. The Playful source note
grows to fit a fifth row.
MCP now sits above Plugins in the sidebar to match that order, and its
Dashboard label reuses the sidebar's "MCP" instead of a longer string
of its own.
* feat(scripts): add a host verification environment
Plugin and MCP work talks to the real Agent CLIs, and those live on the
host, not in the devcontainer, where every target reports "not installed".
Verifying by hand meant either pointing a build at real config or
assembling a dozen environment variables each time.
`make verify` builds a host binary and runs it against .verify-home/ in
the repo, redirecting HOME, the XDG dirs and each agent's own config
variable. The environment starts from `env -i`, so a stray
SKILLSHARE_CONFIG in the caller's shell cannot pull the run back to real
paths. Living inside the repo is safe because project-mode detection
only inspects the working directory and never walks up to a parent.
It also seeds the dashboard cache from ui/dist. A dev build serves a
placeholder rather than the working tree, because runtime download only
applies to numbered versions, so the UI was previously unverifiable
without a release.
* fix(ui): show progress while a plugin selection is applied
Toggling an agent shells out to that agent's own CLI, which takes
seconds. The row gave no sign of it: the toggle only greyed out, and
the confirmation badge is hidden while a target is deselected, so
turning one on looked like nothing happened at all.
The toggle being applied now lifts out of the greyed state and spins in
its badge. Agent versions also get room for their real strings, since
"2.1.276 (Claude Code)" was truncated to a width chosen for a bare
version number.
verify.sh gains a 'run' subcommand, so the same throwaway environment
can be driven from a script rather than only an interactive shell.
* fix(ui): spin the control that started a plugin action
Reading the inventory shells out to six agent CLIs and takes about two
and a half seconds, and every action refreshes it afterwards. Nothing on
the page said so: a menu action closed the menu and left the page still,
so the wait read as a freeze.
Each control now tracks its own work. Check, sync and import spin in
place, a menu action spins the row it acts on, and the agents refresh
follows the query itself rather than the mutation flag.
* feat(ui): split MCP add and import by where the configuration comes from
"Import from a target" opened a dialog whose second tab pasted a snippet,
which is not a target and usually comes from a provider's setup page rather
than a tool the user already configured. Pasting is a way to add a server,
so it moves under "Add server" beside the form, and importing now means one
thing: read what an installed Agent already has.
The paste side gains a file picker, matching `mcp import --file`; the API
only ever took content, so the browser reads the file and fills the editor.
The target picker no longer waits for a successful parse, and a footer that
said "writes 0 config files" next to a greyed-out button now names what is
missing instead.
* fix(ui): label the plugins result strip as the last action
The strip and the plugin inventory below it used the same list styling with
no heading on either, so two rows carrying the same plugin name read as one
list. The status word made it worse: "imported" is one of the outcomes
lifecycle.go returns for an action, but it sat where an inventory row shows
state, so it looked like a property of the plugin.
Give it the section heading the Agents list already has, plus a count and a
dismiss button, so it reads as the report it is.
* feat(plugins): expand compatibility and clarify setup guidance
Support additional native targets, safe source links, Git refs, and explicit OpenCode entries while exposing per-target capabilities across CLI, TUI, and UI.
Separate unsupported integrations from environment errors, explain next steps in plain language, and link official documentation. Update built-in guidance, website docs, completions, and regression coverage.
* feat(plugin): serve a plugin's files and translatable discovery problems
The dashboard could only show a plugin's name and targets, so reviewing
what a plugin ships meant opening the snapshot by hand. Files and
ReadFile expose the reviewed local copy read-only through os.OpenRoot,
which keeps reads inside the snapshot even across symlinks.
Discovery problems now carry a key and arguments next to the English
sentence, so the dashboard can translate them while the CLI keeps its
wording. Inventory asks every Agent CLI in parallel and Packages answers
from config alone, so the plugin list no longer waits on the slowest CLI.
* feat(mcp): sync to Pi, show native config, and lay out written entries
Pi has no built-in MCP support, so a server targeting it must name the
third-party extension that will read the file. `--pi-extension` and the
`piExtension` source field record that choice, and sync writes the file
format of the chosen package instead of guessing.
RenderNative and POST /api/mcp/render return what each Agent would
receive for a definition, with secrets kept as references, so the
dashboard can show the result before anything is written.
Sync used to insert entries on a single line and never revisit them. A
managed entry that still sits on one line is now reported as an update
and rewritten one field per line; entries formatted by hand are left
alone.
* feat(ui): choose plugin Agents like MCP, browse plugin files, view MCP config
The plugin fold listed bound Agents with a per-Agent menu, while MCP let
you simply tick the Agents you want. Plugins now work the same way: the
fold discovers where the source can also go, shows those Agents as
unticked toggles, and a tick previews an install. The per-Agent menu is
gone, and updating a plugin targets only the Agents that support it
instead of hiding the action when one of them does not.
A plugin with a local copy can be browsed in a read-only files dialog,
using the same tree as a skill's Files tab. The MCP "view config" moved
out of a fold in the server form into its own view, reachable from the
server menu, so the native result has room to be read. The MCP dialogs
also ask for the Pi extension when Pi is selected.
Playful tile names drop from 25px to 22px: "brainstorming" was 1px wider
than the tile and lost its last letter to the next line.
* docs: reshoot dashboard screenshots for the redesigned UI
The README and website still showed the pre-redesign dashboard, which no longer matches what users see after upgrading.
* docs: describe MCP, plugins and the new dashboard for v0.21.0
The README still announced v0.20.0 and never mentioned plugins, and its
MCP section listed four clients. The built-in skill and the docs pick up
the Pi extension setup, the formatting-only MCP update, and the plugin
fold and files dialog, so agents and users are not surprised by them.
|
||
|
|
01d721a670 | fix(git): preserve push stdout diagnostics | ||
|
|
b48d23b312 | fix(git): sanitize push remote error output | ||
|
|
eda9ac75a4 |
feat(git-root): guard root scope against submodule traps and config leaks
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). |
||
|
|
96ead0b361 |
feat(ui): make Git Sync not-a-repo state actionable
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. |
||
|
|
56766b024c |
fix(git): reject flag-smuggling remote URLs in SetRemoteURL/SetOrAddRemote
A remote URL beginning with '-' could be parsed by git as an option flag (argv injection, e.g. --upload-pack=...). Validate the URL (reject a leading dash) and pass '--' before positional args so git stops option parsing. Covers both the new scope-switch remote path and the existing skill-repo URL editor that funnels through SetRemoteURL. |
||
|
|
53e5b2455b |
feat(ui): set git remote during scope switch on Git Sync page
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. |
||
|
|
16c6e8ec8d |
feat(server): git operations honor git_root scope + POST /git/root to switch scope
- 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 |
||
|
|
012a4ba97e | fix(ui): resolve stuck update checks | ||
|
|
63a4a57a0c |
feat(ui): allow editing source URL on skill detail page
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
|
||
|
|
354db51928 |
feat(check): branch-aware remote ref comparison and registry rebuild
- Add GetRemoteRefHash/WithAuth/WithEnv to internal/git/info.go: uses git ls-remote with refs/heads/<branch> when branch is set, falls back to HEAD when branch is empty - Add Branch field to URLCheckInput and URLCheckOutput in check/parallel.go; ParallelCheckURLs dispatches to GetRemoteRefHashWithAuth when Branch is set - check.go: group skills by RepoURL@branch composite key so skills on different branches of the same repo are checked against the correct ref; urlHashMap keyed by same composite key for correct broadcast - install_config.go (InstallFromConfig): propagate SkillEntryDTO.Branch into Source.Branch for both plain and tracked skill phases so registry rebuild (install --from-config) respects the recorded branch |
||
|
|
3d58765953 |
fix(git): propagate error from GetRemoteURL instead of swallowing it
Callers can now distinguish between "no remote configured" and real failures (e.g. git not in PATH). All existing callers already guard with err == nil so behavior is unchanged. |
||
|
|
7d0952b8b6 |
feat(ui): add branch switcher to Git Sync page
Allow non-technical users to switch branches from the Web UI without needing a terminal. The dropdown shows local branches first, then remote-only branches tagged "(remote)". Backend: - Add ListLocalBranches, ListRemoteBranches, Checkout to internal/git - Add GET /api/git/branches (?fetch=true for remote discovery) - Add POST /api/git/checkout with dirty-check guard + fetch-before-switch - Oplog instrumentation for checkout operations Frontend: - Branch Select dropdown replaces static text when >1 branch exists - Refresh button to fetch new remote branches on demand - Dirty state disables switching with visual hint - Card overflow + z-index fix for playful theme dropdown clipping |
||
|
|
d842d7a871 |
feat(ui): add Repository Info Card to Git Sync page
Replace the minimal Repo Status Card with a full Repository Info Card showing remote URL with platform detection (GitHub/GitLab/Bitbucket), branch tracking info, HEAD commit hash and message, and status badges. Backend: export GetRemoteURL, add GetHeadMessage and GetTrackingBranch to internal/git, extend /api/git/status with 4 new fields. Frontend: new parseRemoteURL utility parses SSH/HTTPS remote URLs and detects platform by exact hostname match. RepoInfoCard displays parsed owner/repo with platform icon, clickable link, copy button, and graceful fallbacks for missing remote or unparseable URLs. |
||
|
|
0a3305f617 |
fix(update): capture git stderr and show actionable error messages
The update handler used internal/git which ran git commands without capturing stderr, so failures like divergent branches only showed "exit status 128". Now runGitWithProgress captures stderr and pipes it through install.WrapGitError for meaningful messages. Also adds: - extractGitFatal() strips verbose hint: lines from git output - Force checkbox and per-item Force retry button in Update UI - "(try force update)" / "(try --force)" hint on pull failures |
||
|
|
b014f8c6dc |
feat: optimize large-repo install and update flows
Implement Issue #46 across install/update paths to reduce perceived hangs and improve subdir installation performance on large repositories. Main changes: - Add git progress streaming primitives in internal/install/git_progress.go. - runGitCommandWithProgress supports stderr streaming callbacks in TTY mode. - scanGitProgress handles both CR and LF progress delimiters. - Thread InstallOptions.OnProgress through clone/pull/discovery/install/update paths. - Keep non-TTY behavior quiet to avoid noisy logs. - Add TreeSpinner.Update for live message updates. - Add progress-aware git update APIs in internal/git/info.go: - PullWithProgress and ForcePullWithProgress (keep PullWithEnv/ForcePullWithEnv for compatibility). - Introduce shared GitHub client utilities in internal/github/client.go. - Centralize token lookup, request construction, and rate-limit handling. - Refactor internal/search/search.go to use shared client while preserving compatibility aliases. - Add GitHub/GHE API subdir fast path in internal/install/github_download.go. - github.com => api.github.com - github-like enterprise hosts => https://<host>/api/v3 - On API failure, emit warning and fallback to git-based flows. - Add sparse checkout fallback for non-GitHub subdir sources in internal/install/sparse_checkout.go. - Use filter+no-checkout+depth=1 then sparse-checkout set + checkout. - Extend discovery/install metadata plumbing. - DiscoveryResult now includes CommitHash and Warnings. - install/discover subdir paths preserve warnings and commit hashes from API/sparse/full-clone flows. - Preserve compatibility and UX expectations. - Keep existing action strings (for tests/UI stability). - Keep legacy discover/pull APIs as wrappers around new progress-aware variants. - Improve --track download efficiency. - Track clone now attempts --filter=blob:none --depth 1 --single-branch first. - Falls back to full clone only on remote capability mismatch, not on auth/not-found errors. CLI wiring: - cmd/skillshare/install.go - TTY handlers now pass progress callbacks and use with-progress discover APIs. - Subdir handler shows API-vs-clone stage messages and renders discovery fallback warnings. - cmd/skillshare/update.go and cmd/skillshare/update_project.go - Use PullWithProgress/ForcePullWithProgress for tracked repos. - Ensure reinstall/update install flows forward progress callbacks. Tests added/updated: - internal/install/git_progress_test.go - internal/install/github_download_test.go - internal/install/sparse_checkout_test.go - internal/install/tracked_clone_test.go - internal/install/source_test.go (GitHubOwner/GitHubRepo coverage) - internal/git/info_test.go (PullWithProgress/ForcePullWithProgress) - tests/integration/install_subdir_optimization_test.go - tests/integration/install_online_test.go (GitHub API subdir case) Validation performed: - go test ./internal/install -count=1 - go test ./internal/git -run 'Test.*Pull.*' -count=1 - go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Subdir|TestUpdate_' -count=1 - go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Track_|TestUpdate_TrackedRepo' -count=1 - go test -tags online ./tests/integration -run TestInstall_GitHubSubdirViaAPI -count=1 - make lint - make test |
||
|
|
a0bfe9958a |
fix: batch update error propagation, skip-audit passthrough, and security hardening (#39)
- P1: Batch/all update now returns non-zero when repos are blocked by security audit (fail-closed for CI pipelines) - P2: Pass --skip-audit to regular skill update via InstallOptions - P2: Add path containment check in content integrity to prevent directory traversal via crafted file_hashes keys - P3: Switch git diff parsing to NUL-delimited (-z) for safe handling of special filenames |
||
|
|
a5f84c2485 |
feat: auto-audit gate after update with rollback and --diff summary (#39)
Supply-chain hardening Phase 2: - Add post-pull audit gate: HIGH/CRITICAL findings auto-rollback in non-interactive mode (fail-closed), prompt in TTY mode - Use full 40-char commit hashes for reliable rollback (avoids short-hash ambiguity) - Add --skip-audit flag to bypass the gate when risk is accepted - Add --diff flag to show file-level change summary after tracked repo update - Add GetChangedFiles() and ResetHard() git helpers - Add audit gate in install --update git-pull path to prevent bypass |
||
|
|
3b8c681bb2 |
feat: auto-inject auth tokens for hub search and Web UI git operations
Add token auto-injection for private repo support across all platforms: - Hub search (--hub): normalize web URLs to raw-content URLs and apply platform-specific auth headers (GitLab, GitHub, Bitbucket) - Web UI push/pull/update: use *WithAuth variants for git operations - Export ResolveTokenForURL and DetectPlatformForURL from install/auth |
||
|
|
836f1b498b | refactor: dedupe git helpers and isolate test state | ||
|
|
89055804ff | fix: harden pull/push first-sync flow and add regression coverage | ||
|
|
6b8c38455c |
fix: overhaul push/pull/init git remote flow
Fixes multiple issues with the cross-machine sync workflow reported in runkids/skillshare#35: - push/pull auto-detect missing upstream and set it on first use (push uses -u, pull uses fetch + reset + set-upstream-to) - First pull checks local/remote skill directories before resetting; refuses to overwrite local skills unless --force is passed - init --remote auto-initializes git when config exists but .git does not - HTTPS token auth (GITHUB_TOKEN, GITLAB_TOKEN, etc.) injected into push, pull, and init remote fetch - init --help shows init-specific flags and examples - Remote repos with only files (README) no longer misdetected as having skills (uses git ls-tree -d) - Error hints suggest skillshare init --remote instead of raw git |
||
|
|
3e218266b4 | fix: add HTTPS token auth to check paths | ||
|
|
15e2b6db58 | fix: add HTTPS token auth to update pull paths | ||
|
|
0c49860d63 |
feat: add project mode labels, privacy-first messaging, and UI polish
- Add (project) labels to status, sync, collect, target, and uninstall headers for clear mode distinction (matching list/target list pattern) - Add ui.WithModeLabel() helper for shared functions that run in both modes - Update uninstall confirmation prompt: "from the project?" in project mode - Add "Privacy-first" to README Why section and website homepage - Replace "Unified Source" card with "Privacy-First" card on website - Unify Quick Actions card heights with h-full in DashboardPage - Add frontend rebuild note to Docker sandbox docs |
||
|
|
092fb14f8a |
feat: add web dashboard with embedded React SPA (skillshare ui)
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. |
||
|
|
9fbfe0e88a |
fix: resolve box rendering issues and improve list UI
- Add displayWidth() to calculate visible string width excluding ANSI codes - Fix box padding calculation in Box, WarningBox, SummaryBox, UpdateNotification - Disable git color output in GetCommitsBetween to prevent ANSI codes in commit hashes - Improve list command: dynamic name alignment, add icons, remove duplicate separators |
||
|
|
806e14096d |
feat: handle force push when updating tracked repos
When using --force flag, use git fetch + reset --hard instead of git pull. This handles cases where remote history was rewritten (force push). |
||
|
|
dda075cffb | fix: disable color in git status output for consistent box rendering |