Commit Graph
2122 Commits
Author SHA1 Message Date
Willie 7ac7f1f7d7 fix(extras): describe single files and folders accurately in copy
Extras now hold single files as well as folders, but some copy still
spoke only of folders: the zh-TW page title and several tour strings
called extras "directories", and the Add extra name hint promised the
name becomes the folder name even when a custom source folder is used.
The list TUI's sync and collect confirmations named the target folder
instead of the file a single-file extra writes, and its remove prompt
said only config is removed although single-file targets are restored.

Refs #300
2026-09-29 00:54:00 +08:00
Willie 40a4423124 docs: add 0.21.14 changelog entry 2026-09-29 00:30:25 +08:00
Willie 41a560f84d docs(install): cover tree/HEAD links and pinned web URLs everywhere
tree/HEAD/ links now install from the default branch, but the install
page did not say so. The built-in skill reference and the translated
install and hub-index pages also lacked the pinned web URL behavior, so
agents and non-English readers could not learn how to pin a skill or a
hub entry to a tag or commit.

Refs #293
2026-09-29 00:30:25 +08:00
Willie 3248aad384 docs(extras): document single-file extras for any file
The single-file extras docs only showed AGENTS.md, which read as if that
was the only supported file. Lead with a generic example (Pi's
APPEND_SYSTEM.md), document extras init --file/--as and the full-path
list output, show how several extras can pick files from one shared
source folder in global mode, and describe which dashboard tab lists
which extras.

Refs #300
2026-09-29 00:27:53 +08:00
Willie 00f51adbda feat(extras): create and manage single-file extras from the CLI and dashboard
Single-file extras (file + per-target as) already worked in the sync
engine, but the only way to create one was editing config.yaml or the
dashboard's AGENTS.md tab, so they looked like an AGENTS.md-only feature.
Syncing a file such as Pi's APPEND_SYSTEM.md required hand-written config.

- extras init gains --file and --as; the init TUI asks Folder or Single
  file. Validation runs before anything is written, and init neither
  creates the source file nor syncs.
- extras list and add-target show the full source and target file paths.
- POST /api/extras accepts file and per-target as, with the same
  connection checks as add-target.
- The dashboard's first Extras tab becomes "Folders & files" and lists
  every extra except AGENTS.md files; Add extra can create a single file
  with a per-target file name.
- Assigning shared AGENTS.md files now only attaches or detaches AGENTS.md
  extras. Before, saving on the AGENTS.md tab restored and removed any
  other single-file extra linked to the same instruction file.

Refs #300
2026-09-29 00:27:48 +08:00
Willie 13a93242f8 feat(ui): redesign the Hubs page around one list with in-place editing
Previewing a hub from the builder landed on an empty "pick a hub" state:
the builder and the browser kept separate copies of the drafts and the
browser's copy went stale. Merging both into one page removes the split,
so your own hub is shown exactly as others will see it and edited in place.

Hub entries can now be added from any repository URL, not only from
installed skills, with a branch or tag picked from the remote. The version
is written into the source URL, the only place the hub format keeps it,
and a new /api/hub/refs endpoint lists refs and rewrites sources so the UI
never builds tree/<ref> URLs itself. Skills added from installed ones keep
the version they were installed from.

Draft reads and saves read refs from the URLs only, so opening a hub never
waits on a remote. Added hubs get unique labels, since the default hub is
stored by label.
2026-09-28 23:39:19 +08:00
Willie cbaa140289 feat(website): link llms.txt files from the footer
The files were only discoverable by agents that already know the
convention. A footer link lets readers find the URL to hand to an AI tool.
Absolute URLs are used because the files exist only at the site root and a
pathname link would be locale-prefixed on translated pages.
2026-09-28 23:09:19 +08:00
Willie 2782294b01 feat(website): generate llms.txt and llms-full.txt at build time
AI coding agents and docs tooling increasingly look for /llms.txt to get a
site overview without crawling HTML. A local plugin builds both files from
the docs plugin's loaded content in sidebar order, so they never drift from
the published docs and need no extra dependency. Only the English build
emits them, since translated locales would otherwise duplicate the content.
2026-09-28 22:58:33 +08:00
Willie 83aca529f2 docs: credit the contributor behind pinned web URL installs
Refs #293.
2026-09-28 22:27:01 +08:00
Willie 529a8f2771 fix(install): keep config installs on the recorded branch
Installing from config set the branch only when one was recorded, so a
legacy entry with a tree/<tag>/... source and no branch was pinned to
that tag, while update kept it on the default branch. Use
ApplyRecordedBranch like the update paths do. Settling the ref up front
also lets web URL entries from one repo share a single clone again.

Refs #293
2026-09-28 22:12:09 +08:00
Willie 72b6a38dfd fix(install): treat tree/HEAD web URLs as the default branch
GitHub links to tree/HEAD/... when it means the default branch. Since
URL refs became clone refs, HEAD was taken as a branch name: with a
subdir the ref lookup failed, without one git clone --branch HEAD
failed. These URLs installed fine before, so keep them on the default
branch.

Refs #293
2026-09-28 22:12:09 +08:00
a352b8d243 feat(install): pin skills to a tag or commit from their web URL (#293)
* feat(install): pin GitHub tree/blob URLs to their ref

Hub entries only carry a source URL, so a team hub had no way to pin a
third-party skill to a reviewed tag or commit. The parser already read
tree/<ref>/ and blob/<ref>/ URLs but discarded the ref, installing from
the default branch instead of the version the URL names.

Keep that ref as Source.Branch. An explicit --branch (CLI) or branch
(API body) still overrides it; the server handlers now only override
when a branch is given. Batch installs group by repo and ref so two
pinned versions of one repo get separate clones.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(install): describe pinning hub sources to a tag or commit

Explain that a GitHub tree/<ref>/ source URL pins the install, in both
the hub index guide and the install reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(install): pin GitLab/Bitbucket URLs and resolve refs containing "/"

Pinning should not depend on the host, so GitLab (-/tree/<ref>/) and
Bitbucket (src/<ref>/) web URLs now keep their ref too.

Taking the first path segment as the ref broke branch names containing
"/": tree/feature/x/skills/foo cloned branch "feature" and failed. When
the first segment is not a branch or tag on the remote, the longest
matching one is used instead. A ref the remote does not have fails
with a hint to use --branch, rather than silently installing the
default branch. A saved branch that covers more of the path (from
--branch or config) moves the subdir without asking the remote.

The grouped-install round-trip test pinned -/tree/main/ against a repo
on master; the ref used to be ignored, so its branch is now renamed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(install): cover GitLab, Bitbucket and "/" branches in URL pinning

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(install): keep web URL refs correct on reinstall, --branch and grouping

Review of the slash-branch resolution found four gaps:

- A saved branch equal to the whole URL tail (tree/feature/x) did not
  move the subdir back, so every reinstall or update looked for "x".
- An unrelated --branch with a slash-branch URL kept the parse-time
  subdir (x/skills/foo) instead of the URL's real one.
- Grouped installs copy the source to a repo root; resolution then put
  the subdir back and discovery looked under a doubled path. Grouping
  also keyed on the unresolved first segment, so tree/feature/x and
  tree/feature/y could share one clone. Web URLs with a ref now install
  on their own, and resolution leaves a repo-root copy at its root.
- A skill named after the parse-time subdir kept that name once the
  path turned out to be all ref (tree/feature/x named the skill "x").

The unknown-ref error now reads as a missing ref first, since a stale
ref (tree/master after a rename) is more common than a slash branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(update): keep legacy installs on the default branch

Skills installed before URL refs were honoured got the default branch
and recorded no branch. Single-skill update re-parses the recorded
source, so it moved them to the URL's ref (or failed on a stale one,
with a hint to pass --branch, which update does not accept), while
update --all rebuilds from RepoURL and kept the default branch.

ApplyRecordedBranch treats an empty recorded branch as the remote
default and drops the URL's ref. It replaces the branch handling at
every site that reinstalls from recorded metadata: CLI and server
update for skills and agents, and tracked-repo rehydration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* perf(search): share one clone across pinned hub skills from a repo

Any web URL with a path after its ref installed on its own, so a hub
listing many tree/<tag>/ skills from one repo cloned it once per skill.

groupByRepo now resolves each URL's ref before grouping, with a
RemoteRefs cache that lists each remote's refs once, and groups by
repo and resolved ref. Only refs containing "/" (whose subdir the
discovery match cannot re-derive) and refs that fail to resolve still
install alone. A resolved source is marked settled so the grouped
clone does not resolve it again, and ApplyRecordedBranch settles the
subdir from a recorded branch without asking the remote.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Willie <egg358358@gmail.com>
2026-09-28 22:08:16 +08:00
Willie 918cb4eec5 feat(ui): group folder backups by day and restore per folder
Every row repeated the same row of target chips, so recent backups were
hard to tell apart, and restoring meant picking a backup and then a
folder in a second dialog step.

Backups are now grouped by day with a compact row per backup. Opening a
row lists each folder with its file count and size and its own Restore
button; Copy path and Delete moved into that panel.

The page also says what it is doing: a list-shaped skeleton with
"Loading backups…" while the list is read, and a progress note while
Back up now runs, instead of a generic card skeleton and a lone button
spinner that read as a frozen page.
2026-09-28 21:51:17 +08:00
Willie d572ba3b32 perf(backup): walk each snapshot once when listing backups
The list endpoint walked every snapshot to size it, then walked all of
them again for the total. With thousands of files and a cold file cache
(right after an upgrade, for example) the Backup page took visibly long
to open.

Each snapshot folder is now walked once for both its size and file
count. Backup and total sizes are sums of those, and the per-folder
counts are returned as `entries` so the dashboard can show what each
folder holds.
2026-09-28 21:51:11 +08:00
Willie fcb83d90d2 fix(ui): keep the upgraded UI cached when restarting after an update
`skillshare upgrade` already downloads the new version's UI assets, and
that download removes older versions. Restarting with clearCache then
deleted the fresh assets, so the new server had to fetch them from GitHub
again before it could answer. On a slow connection that outlasted the
dialog's 20-second reconnect wait and left the page looking stuck.

If the pre-download failed, the restarted server still downloads the
assets because none are cached.
2026-09-28 21:51:07 +08:00
Willie 66f8cf3368 fix(ui): use singular wording when a count is one
Counted labels such as "{count} skills" had only a plural form, so the
dashboard showed "1 skills", "1 of 1 targets", "1 backups" and similar.
Each such label now has a .one and a .other form in every locale, and
the call sites pick by count, as the rest of the dashboard already does.
2026-09-28 21:08:26 +08:00
Willie 49a52498e9 docs: add current screenshots and diagrams to the guides
The dashboard screenshots predated the Projects page and showed codex at
its old path, and the guides for dashboard-only features (AGENTS.md
sharing, MCP, plugins, backups, hubs) had no pictures at all.

- Re-shoot the dashboard screenshots (docs and README copies) and add
  ones for targets, extras, shared AGENTS.md, MCP, project MCP, plugins,
  backups, hubs and project mode.
- Add diagrams for sharing AGENTS.md, MCP sync and migrating with
  collect; fix codex's path in the getting-started diagram.
- Replace terminal screenshots with real output as text, and remove
  images nothing referenced.
- Fix text that no longer matched the dashboard (project mode, hub
  navigation, backup list output).
2026-09-28 21:02:12 +08:00
Willie a911064cb3 fix(ui): stop saying Backup is hidden in project mode
The project-mode note on the dashboard still said Git sync and Backup
are not shown, but Settings › Backup now appears in project mode,
scoped to the project.
2026-09-28 21:02:12 +08:00
Willie 85a86160a3 chore: release v0.21.13 v0.21.13 2026-09-28 20:45:36 +08:00
Willie 7d9d7a8971 feat(backup): list and clean up project snapshots from the CLI
The dashboard lists a project's agent snapshots, but `backup --list -p`
and `backup --cleanup -p` were refused with "not supported in project
mode", so the CLI could only see the global folder. Both now work on
.skillshare/backups/ with -p.

Refs #299
2026-09-28 19:29:49 +08:00
Willie 4c66a06efd docs: document backup management and file history
Describe the new backup commands (--delete, backup files list/show/
restore), the reasons recorded with file backups, and the three sections
of the dashboard's Backup tab, and point the AGENTS.md backups section
there instead of telling readers to copy files back by hand.

Refs #299
2026-09-28 19:26:38 +08:00
Willie 01bf89924a feat(ui): manage all backups from Settings › Backups
The Backups tab only listed target snapshots and was hidden in project
mode, while file backups had no view at all and MCP backups sat in a
dialog on the MCP page. The tab now has three sections: target folders
(filter, copy path, delete one snapshot), files (each version with why
it was taken, a diff or full-text preview, and restore) and MCP (grouped
by agent config, opening the existing restore dialog). It is shown in
project mode too, scoped to the project.

Refs #299
2026-09-28 19:23:22 +08:00
Willie 86dca7924f feat(backup): browse and restore file history, delete snapshots
skillshare backs up AGENTS.md, CLAUDE.md and shared-file locations before
rewriting them, but nothing could list or restore those copies, and a
target snapshot could not be deleted on its own. The file backups now
record why they were taken in their name (<time>.<reason>.bak; older ones
have none), and the server and CLI can list them, show a version and
restore it, saving the current content first. A link is only replaced
when the caller asks for it.

Also:
- DELETE /api/backups/{timestamp} and `backup --delete`.
- Agents snapshots (<target>-agents) could not be restored from the
  dashboard: the name was looked up as a target.
- Project mode uses the project's backups folder for snapshots and lists
  only file backups inside the project.
- MCP backups report which servers they changed and when.

Refs #299
2026-09-28 19:23:16 +08:00
Willie 5262ee32dd docs: describe shared files in project mode
The project Extras page no longer has a file-name field on folder
targets; shared files and their locations moved to the AGENTS.md tab.
Document the project differences (root-relative folders, tool files
allowed, relative links) and update the unreleased changelog entry.

Refs #299
2026-09-28 18:40:45 +08:00
Willie ccd7e31ebb feat(ui): show project shared files on the AGENTS.md tab
Single-file extras in a project sat in the Folders tab and looked like
folder extras: a folder icon, folder modes and a flatten switch, with
no import mode and no sync on add. They now appear as shared-file cards
on the project AGENTS.md tab, reusing the global location rows and Add
location dialog with project-relative paths. The Folders tab lists only
folder extras in both modes, so the file-name field added there is gone.

The CJK location counts now say "locations", since the card header has
no heading next to it to give "2" its meaning.

Refs #299
2026-09-28 18:40:24 +08:00
Willie 342fac7691 feat(server): serve shared files and their locations in project mode
In a project, single-file extras were only reachable through the folder
extras API, which has no file name, no import mode and no immediate
sync. The dashboard now shows them on the AGENTS.md tab like global
shared files, so the instructions routes it needs must work in project
mode: list, create, content, resolve and the locations routes.

A project location must stay inside the project (absolute, ~ and ..
paths are refused with instructions_location_outside_project) and is
stored relative, so a clone keeps working. A tool's own file is a valid
location in a project, so the is_target check is skipped there.

Refs #299
2026-09-28 18:40:15 +08:00
Willie 7d1f1fca91 docs: use a notes folder in the --as changelog example
Gemini CLI is already a target, so the dashboard sends a GEMINI.md
location back to the Targets list; a notes folder with instructions.md
shows what --as is for.

Refs #299
2026-09-28 18:00:36 +08:00
Willie 98bc3b243c docs: add 0.21.13 changelog entry
Refs #299
2026-09-28 17:45:01 +08:00
Willie 1c8b9d6998 docs: mention collect and reapply for edited locations
Refs #299
2026-09-28 17:41:34 +08:00
Willie 01874ed338 fix(ui): offer collect and reapply on edited locations
An edited location only showed a hint, with no way to settle it. It now
gets the same collect and reapply note as a target row. The remove
dialog closes before removing, so the refetch no longer asks for the
preview of a location that is gone.

Refs #299
2026-09-28 17:41:33 +08:00
Willie 0bbcbd7d54 fix(server): settle and roll back instruction locations
A location whose file was edited outside skillshare had no way to collect
or reapply, and a location whose config save failed stayed written on
disk. Resolve now takes a location path, and a failed save restores
what the file held; a failed reload keeps the saved location.

Refs #299
2026-09-28 17:41:33 +08:00
Willie 716d318a51 docs: document other locations for shared AGENTS.md
Explain adding, changing and removing a location outside the tool list,
the refusals, and the file name field on the project Extras page.

Refs #299
2026-09-28 17:33:46 +08:00
Willie 69c2b29b4b feat(ui): manage other locations of a shared AGENTS.md
Show locations outside the tool list under the shared file, with an add
dialog for folder, file name and mode, a restore preview before removal,
and localized errors. The project Extras page takes a file name for
single-file extras.

Refs #299
2026-09-28 17:30:41 +08:00
Willie 04485099ed feat(server): add locations API for shared instruction files
The dashboard could only attach a shared AGENTS.md to known tools, while
the CLI's --add-target/--as already writes it to any folder under any
name. Add list/add/mode/remove/restore-preview routes for such locations,
syncing a new location right away and refusing folders in the way, tool
files and files held by another shared file. The extras add-target route
now accepts as and runs the same config validation as the CLI.

Refs #299
2026-09-28 17:30:41 +08:00
Willie 892d3f5153 docs: sync AGENTS.md and Windows copy-fallback docs with recent fixes
Document local preserved counts, the junction replacement warning,
the Convert dialog without a picker, the folder-in-the-way hint and
update progress so the docs match the dashboard and CLI.

Refs #299
2026-09-28 16:57:03 +08:00
Willie 759269f67f fix(ui): move 'reads skills from universal' into a tooltip
Every rider row repeated the same line under its path on the AGENTS.md page, which is about instructions, not skills. The origin now shows when hovering the tool name.

Refs #299
2026-09-28 16:46:54 +08:00
Willie ea7c2ad6af fix(ui): say the copy Sync button appears on this page
Naming the Targets heading was confused with the Targets page.

Refs #299
2026-09-28 16:33:31 +08:00
Willie de0fbdee63 fix(ui): point the copy hint at the Targets heading
The Sync button sits beside the Targets heading, not above the list.

Refs #299
2026-09-28 16:31:43 +08:00
Willie acbe757574 fix(ui): say where to sync an out-of-date copy
"Run a sync" did not say where. The copy option now points at the Sync button that appears above the targets when the shared file changes elsewhere.

Refs #299
2026-09-28 16:30:37 +08:00
Willie e386e15bce fix(ui): give the copy mode its own description
The copy option reused the Skills folder-copy text and glued a second sentence on with a space, which read oddly in Chinese. It now has one sentence about copying the shared file.

Refs #299
2026-09-28 16:27:37 +08:00
Willie 7baf716c63 feat(instructions): translate dashboard warnings and errors
Mode changes, attach and the other AGENTS.md actions returned English
sentences, so a zh-TW dashboard showed "backed up ... before replacing
it" and "... is a directory" untranslated. Warnings are now
{code, params, message} and every instructions error carries a code,
so the dashboard shows them from i18n and falls back to the English
message for unknown codes. CLI output is unchanged.

Also from the Windows re-test:
- replacing a user's junction says so and where it pointed;
- status, doctor and sync agree on identical unowned copies (kept, not
  linked), and an identical copy no longer suggests --force;
- the targets list shows a Developer Mode tooltip when file links are
  unavailable;
- file names are taken from Windows paths too.

Refs #299
2026-09-28 16:12:59 +08:00
Willie aafb55a309 fix(ui): name the instructions tab by file name on Windows
The tab split the path on / only, so on Windows it showed the whole C:\...\CLAUDE.md path. fileName splits on both separators.

Refs #299
2026-09-28 16:05:21 +08:00
Willie 8063a6f424 chore(windows): add UTM verification helper and skill
Windows acceptance on the local UTM guest was a pile of one-off
commands: finding utmctl, polling async exec, running as the desktop
user with a basic token, pinning builds, and pre-seeding the UI cache.
utm.sh wraps those steps, manual-setup.ps1 gives a one-line hands-on
setup in an isolated home, and the skill records the workflow and the
pitfalls hit along the way (S4U tokens, ARM64 emulation, zsh echo).

Refs #299
2026-09-28 16:05:16 +08:00
Willie 29e140e1c8 feat(ui): show update progress and group failed updates
Updating many resources gave no sense of progress, and a failure was
easy to miss among the rest. The status card now shows a progress bar,
the row being updated gets a moving line and a pop when it finishes,
and blocked or failed updates move to their own section with a
one-line reason. Motion is off under prefers-reduced-motion.
2026-09-28 16:05:16 +08:00
Willie 2e7164fbb5 fix(ui): drop the one-option shared file picker in convert
When every shared file is already used by the target, the picker only offered "New one…"; the dialog now asks just for the name.

Refs #299
2026-09-28 16:05:16 +08:00
Willie 0ae1e17e15 fix(instructions): say when a folder blocks a target, pluralize kept files
A real directory at a target path showed the generic drift hint ("sync
will change it back") although sync refuses to replace a directory. The
assignment now carries reason "directory" and the row says to remove or
rename the folder.

The restore plan read "personal stay" in English because the kept-files
line had no singular form.

Refs #299
2026-09-28 15:41:35 +08:00
Willie 81ed0f1529 docs(extras): document shared-file ownership, --as, and restore behavior
Refs #299
2026-09-28 15:37:03 +08:00
Willie c6ed46260f fix(ui): skip copy-held targets in connect-all and lift tab underline
Connect-all still planned to switch a target that another shared file
holds in copy mode (the API marks only links as linked_shared), which
would silently take it from that file. Any link or copy assignment now
marks the target as held, so the switch step is gone.

The header tabs sat on the strip's divider; they are now centred with
room under the underline.

Refs #299
2026-09-28 15:31:08 +08:00
Willie 87e6cc9538 fix(extras): guard shared-file ownership and keep user files on restore
Exploratory CLI, dashboard and real-Windows testing of single-file extras
found paths that corrupted another shared file, lost user content, or
reported the wrong state.

- One shared file per link/copy target is now enforced in config
  validation, so the CLI, sync and API all refuse it; an import is never
  written through a link into another shared file (409
  instructions_target_held in the API).
- Restore recreates an original Windows junction as a junction, which
  needs no privilege, and remove restores before saving config so a
  failed restore no longer orphans the record.
- Imports into dotfiles links, damaged managed blocks, repointed links
  and CRLF files keep the user's content; project imports use paths
  relative to the file so a moved repo keeps working.
- Mode and assign responses carry sync warnings; dry-run says when an
  edit would be backed up; invalid modes no longer show as healthy.
- An edited copy reports modified, identical unowned copies count as
  synced without being owned, and relative project links no longer show
  drift.
- sync extras --json exits non-zero on errors; extras <name> --help
  works; --add-target gains --as; detach messages match behavior.

Refs #299
2026-09-28 15:27:02 +08:00
Willie 4a2d05e9ce fix(ui): guard AGENTS.md edits and surface shared-file conflicts
Exploratory testing of the dashboard found edits lost without warning,
Cmd+S saving the page editor through an open dialog, and a connect-all
plan that would write an import through another shared file's link.

- Unsaved edits now ask before leaving the target tab, closing the edit
  dialog, or reloading.
- Cmd+S does nothing to the page editor while a dialog is open.
- Connect-all skips targets already held by another shared file
  (linked_shared), and 409 instructions_target_held shows its reason.
- Mode and attach warnings (such as a backed-up edit) show in a toast.
- Restore wording matches what restore does; the per-file connect time
  was dropped because the record is per target file.
- Convert defaults to a new shared file; a new file is selected at once;
  an unknown ?file= falls back and fixes the URL.
- The collapsed shared-file card scrolls instead of clipping.
- Change location is disabled while a shared file holds the target.

Refs #299
2026-09-28 15:24:56 +08:00