Commit Graph
2837 Commits
Author SHA1 Message Date
Willie 16cfd048f1 test(sourcefs): allow the raw writes prefixed naming adds to targets
The raw-write ratchet flags SetFrontmatterValue and the rename-back after a
failed manifest write. Both only touch target entries (the copied SKILL.md
and a just-renamed managed folder), never the skills source, so they are
listed with the target reason.
2026-10-09 00:53:13 +08:00
Willie b015c7ac25 docs(sync): document target_naming: prefixed
Users need to know when prefixed helps (same-named skills from different
tracked repos), what name it produces, that it is copy-only, and that
switching between any two namings now renames managed entries in place.
The translated pages follow, the ja and zh-Hans naming headings get an
explicit target-naming id so the new links resolve, and the target_naming
runbook gains steps for prefixed sync, flat -> prefixed -> standard
migration and the merge-mode rejection.
2026-10-09 00:50:46 +08:00
Willie 226c5c9a74 feat(target): offer prefixed naming in the CLI, dashboard and schemas
The new naming has to be choosable wherever naming already is: target
--target-naming, the target list TUI, the dashboard target page, shell
completions and the config schemas. Each setter checks the copy-only rule
before saving, for a naming change and for a mode change on a prefixed
target, so an invalid pair never reaches the config file and only surfaces
later as a failed sync.
2026-10-09 00:47:20 +08:00
Willie 35f3bb0e28 feat(sync): add target_naming: prefixed for copy-mode targets
Two tracked repos that ship a skill with the same name cannot both reach a
tool today: standard drops both, flat keeps both folders but tools list
skills by name:. Prefixed gives a skill inside a tracked repo the folder and
name: <repo>-<name> in the copy, so both stay usable and the name shows
where the skill came from. It is copy-only because a merge symlink points
at the source, where name: must not change; config validation rejects it
elsewhere, per target, like extension does.

Switching naming used to know only the flat name as the old one, so
standard <-> prefixed would orphan entries. The migration now checks the
skill's name under every naming, and the copy manifest records the naming
that produced each entry: a switch finds the exact old entry, and a renamed
copy is re-copied so its name: matches even when the source is unchanged.
Manifests without the record fall back to flat, standard, prefixed in turn.
A rename is written to the manifest at once, so a later failure cannot
leave the renamed folder looking user-owned.
2026-10-09 00:44:47 +08:00
Willie a9c3189ce3 feat(utils): add a line-based frontmatter string setter
Prefixed target naming has to rewrite name: in each copied SKILL.md.
ToggleFrontmatterFlag only adds or removes a boolean, so SetFrontmatterValue
sets a plain scalar the same way: one line edited, key order, comments,
CRLF and the body untouched. Both now share the delimiter scan.
2026-10-09 00:44:47 +08:00
Willie d17907ea05 style(ui): tighten the skills toolbar and pin the hub header like it
The skills toolbar sat about 60px under the tabs because its zero-height
stuck marker took its own flex gap. It now sits 16px from the tabs and the
list, and the marker keeps its old distance so the stuck state flips at the
same scroll position as before.

The hub header was a bare sticky div that pinned flush against the list.
It now uses the shared stuck bar, so it gets padding and a bottom line
once pinned while its resting layout stays the same.
2026-10-08 20:56:36 +08:00
Willie 6194655946 docs(readme): credit 0.25 contributors and drop a deleted account
The 0.25 patch releases skipped the Contributors update, so the reporters of #458 and #467 were never credited. EriaWalker's GitHub account no longer exists and its avatar link returned 404.
2026-10-08 17:59:40 +08:00
Willie fbf000d692 Merge pull request #484 from runkids/release-please--branches--main
chore(main): release 0.25.3
v0.25.3
2026-10-08 17:14:49 +08:00
Willie 47ce10b688 docs(changelog): write user-facing notes for 0.25.3
The generated entry listed commit subjects, repeated merged features and fixes, and included fixes to features that are new in this release. Group the changes by area and describe what users see instead.
2026-10-08 17:09:03 +08:00
Willie 1f1bbd1846 docs(ui): describe the dashboard actions added since 0.25.2
The dashboard page reference did not mention Install all, Prune, Discard
all, the unmatched filter notice, Edit target/Edit extra, or that New
skill and Link folder moved into the Install menu, so readers had no way
to find them from the docs.
2026-10-08 17:05:16 +08:00
Willie fb43038179 test(sync): skip the uninspectable-target case on Windows
Windows reports a path under a regular file as not-exist rather than
ENOTDIR, so ClearExtraTarget correctly treats it as missing and the
test's error case cannot occur there. This failed the Windows CI job
since e5dcaa5f6.
2026-10-08 16:48:52 +08:00
Willie 78eccda29f docs(wiki): define which tests are worth writing
Without written rules, new work kept adding entry-point tests that
repeat package rules and rendered UI tests for cosmetic behavior. State
where a rule is tested, what handler/CLI/integration tests cover, and
which dashboard tests to write.
2026-10-08 16:41:09 +08:00
Willie dd46034657 test(ui): keep only rendered tests that protect user data
Most .test.tsx files asserted layout, icons, collapse state, remembered
widths, toasts, focus or shown text. They broke on harmless UI changes
and missed real regressions, which screenshots catch better.

Keep rendered tests for write/delete payloads, confirmations before
destructive actions, drafts kept after errors, stale-version refusal and
sanitizing; logic stays tested in plain .ts modules.
2026-10-08 16:41:09 +08:00
Willie 18d6b11347 test: test each rule once, in the package that owns it
Many integration and handler tests re-checked rules that internal/
packages already test, duplicated each other, or ran no product code at
all (a few re-implemented the logic inline, two could never fail). They
slowed the suite without catching anything new.

Delete those, keeping tests for CLI wiring, JSON output, exit codes,
project/global mode and cmd-only logic. Move the agents/extras overlap
check into sync.AgentTargetPaths so the CLI and the server share one
implementation and it is covered by unit tests instead of seven
integration tests.
2026-10-08 16:41:09 +08:00
github-actions[bot] a8f2971aac chore(release): synchronize release metadata 2026-10-08 08:37:58 +00:00
github-actions[bot] fde609834e chore(main): release 0.25.3 2026-10-08 08:37:55 +00:00
Willie 1bf4c326cb Merge pull request #496 from runkids/runkids/extras-clear-target
fix(extras): prune a symlink target only when it links to the source
2026-10-08 16:37:19 +08:00
Willie 0127a150db fix(extras): only treat an actual link as linking to the source
ResolveLinkTarget falls back to EvalSymlinks, which also resolves a real
directory. A real directory reached through a symlinked ancestor of the
source then counted as a link to it, so --remove-target --prune failed with
"not a symlink" instead of keeping the directory. LinksTo now requires the
path itself to be a symlink or junction.

Refs #491
2026-10-08 16:33:19 +08:00
Willie e5dcaa5f64 fix(extras): keep a target in config when it cannot be inspected
ClearExtraTarget treated every Lstat failure on a symlink-mode target as
"nothing there", so a permission or I/O error made the CLI drop the target
from the config and report nothing pruned. Only a missing target is now
forgotten; other errors are returned so the config is kept for a retry.

Refs #491
2026-10-08 16:27:58 +08:00
Willie 44e8bd5927 fix(extras): recognize junctions as links to the extra's source
On Windows without Developer Mode, directory links fall back to junctions,
which os.Readlink can fail to read. LinksTo then treated a skillshare-made
target as foreign, so --remove-target --prune dropped the config entry and
left the junction behind. It now uses utils.ResolveLinkTarget, which falls
back to EvalSymlinks, and compares with utils.PathsEqual.

Refs #491
2026-10-08 16:22:02 +08:00
Willie 36113be45e fix(extras): prune a symlink target only when it links to the source
The CLI's `--remove-target --prune` removed a symlink-mode target no matter
where it pointed, while the dashboard removed it only when it still linked
to the extra's source folder. A user who repointed that link at their own
folder could lose it from the CLI. Both now go through one shared
sync.ClearExtraTarget, so the safer rule applies everywhere; the CLI warns
and leaves anything that is not a link to the source instead of failing.

Refs #491
2026-10-08 16:19:32 +08:00
Willie 746bb9a77b Merge pull request #494 from runkids/runkids/extras-mode-rules
refactor(extras): keep target mode rules in config and share them in the UI
2026-10-08 16:18:15 +08:00
Willie e1aaf343fe Merge branch 'main' into runkids/extras-mode-rules 2026-10-08 16:17:56 +08:00
Willie b90bf2086f Merge pull request #493 from runkids/runkids/extras-sync-api
refactor(extras): pass targets to sync and filter them in one discovery function
2026-10-08 16:17:22 +08:00
Willie 9edac4d110 Merge pull request #495 from runkids/runkids/extras-validate-names
refactor(extras): validate every mode change and share special extra names
2026-10-08 16:16:52 +08:00
Willie 8ccdc91b29 refactor(ui): share target field rules between Add and Edit target
Add target and the Edit target dialog each implemented the field rules
(an extension forces copy, symlink turns flatten off), and they had
drifted: the dialog kept flatten on through a switch to symlink and
back. applyDraftChange now holds the rules and both use it, so the
dialog clears flatten on symlink exactly like Add target.

Refs #490
2026-10-08 16:08:03 +08:00
Willie d61b25bcf2 refactor(extras): apply target filters in one discovery function
The extras diff, list, status and remove-target commands and the
server's list and diff handlers each discovered an extra's source and
then filtered it with ExtraTargetFiles. A new view that forgot the
filter step would silently show the wrong file count or status.

DiscoverExtraTargetFiles now discovers and filters in one call and
returns the unmatched-include warnings that sync reports. Every caller,
including sync itself, uses it, and ExtraTargetFiles is gone. No
behavior change.

Refs #487
2026-10-08 16:08:03 +08:00
Willie 7a4103b9a8 refactor(extras): validate every mode change and share special extra names
cmdExtrasMode only ran ValidateExtraConfig behind a growing list of
conditions, so each new restriction needed another clause. For a plain
folder extra the full check adds only the mode-name and flatten+symlink
rules, which sync already rejects, so validating unconditionally cannot
refuse a config that syncs today.

The agents and memory extra names were string literals in sync, the
server handlers, the memory store, and the CLI. They now live in
internal/config, and the rename guard moves to ValidateExtraRename so a
future CLI rename reuses it instead of copying the check.

Refs #489
2026-10-08 16:08:03 +08:00
Willie dde1dc6ef7 refactor(extras): keep target mode rules in config
The rules "an extension forces copy mode" and "symlink mode drops
include/exclude" were re-implemented in the create, edit-target, and
quick mode handlers. ExtraTargetConfig.EffectiveMode and Normalize now
hold them in one place, and the handlers call those instead. API
behavior is unchanged: edit-target still clears filters on symlink,
quick mode still rejects symlink when the target has filters, and an
extension still forces copy.

Refs #488
2026-10-08 16:08:03 +08:00
Willie 5c50cc4b2b refactor(sync): pass extra targets instead of long argument lists
syncExtraDir took ten positional arguments, three of them bools, and
CollectExtraFiles took nine. Every new target field meant changing each
signature and every call site, and swapped bools compiled silently.

Both now take the target as config.ExtraTargetConfig plus an
ExtraSyncOptions for dry run, force and project root; SyncExtraTarget
takes the same options. The SyncExtra wrapper only served tests, so it
is gone and the tests call syncExtraDir directly. No behavior change.

Refs #486
2026-10-08 16:08:03 +08:00
Willie b699e1cfce Merge pull request #492 from runkids/runkids/extras-filter-435
feat(extras): choose which files each target syncs, and edit targets in place
2026-10-08 16:07:21 +08:00
Willie c182c42d1a fix(extras): keep filter changes from being dropped or saved invalid
- On a multi-target extra, `extras <name> --flatten --add-exclude ...`
  without --target took the flatten-for-all-targets path, which returned
  before the filter flags were applied, and still reported success. Filter
  flags now require --target there, like --mode.
- The `extras list` TUI mode picker saved a mode without validation, so a
  filtered target could be switched to symlink and break every later sync.
  The change is now validated before saving.

Refs #435
2026-10-08 16:01:01 +08:00
Willie 7740ee8798 fix(extras): relink symlinks to a missing source and accept negated includes
- Pointing a symlink-mode extra at a new source after its old folder was
  moved or deleted left the target broken: the old link no longer resolved,
  so it was not recognised as ours, and the next sync skipped it as pointing
  elsewhere. The link text is now compared with the old source as well.
- A negated include such as "!draft.md" only narrows earlier rules, so on
  its own it never matches and was always reported as matching no file.
  Negations are no longer checked for matches.

Refs #435
2026-10-08 15:52:47 +08:00
Willie 72ce921eeb fix(extras): validate hand-written filters and keep links when a save fails
- Sync validation skipped directory extras, so a malformed include such as
  "[" written in the config matched nothing and merge sync pruned every
  link. Extras with include/exclude now go through ValidateExtraConfig.
- The dashboard's quick Mode menu could switch a filtered target to symlink
  and save filters that every later sync rejects. That change is now
  validated with the target's filters and refused.
- Changing an extra's source removed the links into the old folder before
  saving the config, so a failed save left working targets broken. The
  config is saved first.

Refs #435
2026-10-08 15:44:39 +08:00
Willie c979bf0701 fix(ui): keep a context submenu open after switching back to it quickly
Every submenu trigger closed whichever submenu was open when its 180ms
leave timer fired. Moving from Mode to Flatten and back let Flatten's late
timer close Mode's submenu a moment after it opened. A trigger's timer now
closes only its own submenu.
2026-10-08 15:44:39 +08:00
Willie a9ae5349a2 feat(extras): choose which files each target syncs, and edit targets in place
A directory extra used to sync every file to every target, so a tool that
only wanted a few docs got the whole folder. Each target can now set
gitignore-style include/exclude patterns, matched on the path inside the
source. Merge targets prune links to files that stop matching; copy targets
keep earlier copies, since nothing records which copied files are ours.
Filters are rejected for symlink mode and single-file extras, and sync warns
when an include matches nothing.

The dashboard previously forced users to delete and re-add a target or an
extra to change it. Edit target now changes the folder, file name, mode,
flatten and filters with a live preview; Edit extra renames an extra or
points it at another source folder. A moved target or source drops the
links left at the old place and syncs right away.

CLI: --include/--exclude on extras init, and --add-include, --add-exclude,
--remove-include, --remove-exclude on extras <name>.

Refs #435
2026-10-08 15:31:51 +08:00
Willie 8d40e06975 Merge pull request #485 from runkids/runkids/unmatched-include-copy
feat(sync): explain include filters that select no skill
2026-10-08 15:16:48 +08:00
Willie bd7e67fffd fix(git): report unmatched include filters from the sync after a pull
The pull response copied only the sync's warnings, so with unmatched
include filters moved to their own field, the Git Sync page stopped saying
that a filter selected nothing after its automatic sync. The pull response
now carries them and the page shows the same notice as the Sync page.
2026-10-08 15:06:59 +08:00
Willie 81e0824396 fix(sync): skip unmatched include notices when the source is incomplete
When a followed source link cannot be read, the skill list is partial and
pruning is already skipped. Reporting a filter as unmatched in that state
told users the target gets no skills and sent them to edit a filter that
may be fine.
2026-10-08 14:59:59 +08:00
Willie 819ea634f5 fix(ui): show unmatched filter notices in every sync dialog
The project sync dialog and the sync preview modal show only the response's
warnings. With unmatched include filters moved to their own field, a sync
from those dialogs no longer said that a filter selected nothing. Both now
render the same notice as the Sync page.
2026-10-08 14:53:52 +08:00
Willie 47be5105f5 fix(sync): link each target's unmatched filter and ignore blank includes
Two global targets with the same unmatched filter were merged into one
notice whose Edit filter link opened only the first target, leaving the
other unfixed. Only a project's targets share a filter, so other targets
now keep their own notice and link.

A target whose includes were an unmatched pattern plus a blank entry was
not marked as getting no skills, because the check counted the raw list
while filtering drops blanks. It now counts the effective patterns.
2026-10-08 14:48:29 +08:00
Willie 5d5b0f3efb feat(sync): explain include filters that select no skill
The dashboard showed the CLI's raw line, "api-server@claude: include pattern
"*review*" matches no skill in the source", once per target. It named a
config field, did not say the target ends up with no skills, and gave no way
to fix it. Sync now returns these as structured entries; the Sync page
groups a project's targets into one localized notice that says what happens
and links to where the filter is edited. The CLI line also says the filter
adds nothing to the target.
2026-10-08 14:26:41 +08:00
Willie 1b1c8da5b4 feat(ui): keep Sync in reach on the Sync page
The Sync button sat in the sticky bar and the last-sync card started below
it, leaving the right column misaligned with the page header. The buttons
now sit on the card, which sticks with them, so Sync stays visible while the
change list scrolls. The Include bar keeps tight gaps at rest, gets more room
and a bottom line once it sticks.
2026-10-08 14:26:41 +08:00
Willie 0edbadca04 Merge pull request #483 from runkids/runkids/install-from-config
feat: install config entries from the dashboard, prune deleted skills, calmer Sync and Skills pages
2026-10-08 13:27:07 +08:00
Willie 7d6b26c759 docs: show the owner-repo name in the tracked --into example
Tracked repos are cloned as _owner-repo now, so the guide's devops/_skills
path and its flattened target name no longer match what install creates.
2026-10-08 13:05:41 +08:00
Willie e550874899 docs(install): name the tracked repo example by owner-repo in help
Tracked repos are cloned as _owner-repo now, so the help example pointed
users at a _shared-skills directory that no longer exists after install.
2026-10-08 13:00:23 +08:00
Willie 66750ac4e5 fix(ui): leave collapsed groups out of the Skills list paging
A collapsed group's items still used up the 100-item page, so later groups
stayed hidden behind Show more and the footer counted rows nobody could see.
2026-10-08 12:54:45 +08:00
Willie 906669df75 fix(install): reuse a tracked checkout cloned under the old basename name
Tracked repos are now named owner-repo, so repeating `install --track` for a
repo cloned earlier as _<basename> went to a new _owner-repo path and cloned a
second copy whose skills collide during sync. When that older checkout has
the same remote, keep using its name so the install skips as the same repo.
2026-10-08 12:54:45 +08:00
Willie 2188be740e fix(ui): require a fresh check before offering prune
Check statuses persist in one non-expiring localStorage entry shared by every
dashboard on the origin. A restored stale status could offer Prune for a
skill reinstalled since, or one in another project, and prune force-moves it
to trash. Stale is no longer restored from the cache, so Prune only appears
after a check in the current session.
2026-10-08 12:47:13 +08:00
Willie e84075dcec fix(ui): refresh the sync matrix after installing config entries
Newly installed skills had no target entries in the cached matrix while the
Skills page kept it mounted, so the Sync page could hide Discard all for them
until the cache went stale.
2026-10-08 12:40:30 +08:00