Commit Graph
2848 Commits
Author SHA1 Message Date
Willie ea45a45bda refactor(ui): let SegmentedControl name icon options by title alone
The aria-label branch special-cased string labels, but lucide icons are
aria-hidden, so an icon-only button already takes its accessible name
from title and a text label wins over it; the attribute was redundant.
A disabled segment also still brightened on hover, so the hover rule now
skips disabled segments. In TargetDetailPage the mode reset and the
naming options move out of one-line expressions so they read at a glance.
2026-10-09 02:25:40 +08:00
Willie 3d55f4cb1a feat(ui): show prefixed naming disabled outside copy mode
Hiding prefixed unless the draft mode was copy made the option hard to
discover, and a user who left copy mode with prefixed drafted kept a
naming the server would reject on save. Following the approved design,
the naming control now always lists flat, standard and prefixed;
prefixed is a disabled segment with a "Needs copy mode" tooltip and an
info line saying why. Leaving copy mode resets a drafted prefixed back
to the saved naming (or flat when prefixed was saved), and a pending tag
marks an unsaved naming change.

SegmentedControl gains a per-option disabled flag. Its title no longer
replaces a text label's accessible name, so the disabled segment is
still announced as "prefixed"; icon-only options keep title as name.
2026-10-09 02:23:46 +08:00
Willie 73a3c5176a fix(target): describe prefixed in the TUI naming picker
The naming picker's description map only knew flat and standard, so the
new prefixed row showed a bare name with no hint that it needs copy mode.
Add its description and a record-tui screen so the picker can be checked
visually.
2026-10-09 02:17:01 +08:00
Willie f5f45e56ea refactor(sync): return the legacy entry as a namedTarget
findLegacyTargetEntry returned the old entry's name and naming as two loose strings although namedTarget already pairs them; returning the struct keeps the pair together for both callers.
2026-10-09 01:03:08 +08:00
Willie e2571c2e8b docs(sync): note that filters stay on flat names under prefixed too
The sync command page said filters keep flat names only for standard
naming; prefixed names target entries from SKILL.md as well, so the same
caveat applies. Translations follow.
2026-10-09 01:02:54 +08:00
Willie 096de1ad9b fix(sync): drop a copy whose prefixed name could not be written
When the name: rewrite failed after the copy, the new folder stayed in the
target with no manifest entry, so later syncs took it for a user's folder
and never refreshed it. The copy helper now removes the folder it just made
before returning the error; the next sync copies it again.
2026-10-09 01:02:43 +08:00
Willie 9ed8272891 fix(config): reject prefixed naming on non-copy projects entries
The dashboard saves projects: through ValidateProjects, which checked only
the sync mode, so a project with prefixed naming and the merge default was
accepted and failed later at sync. It now applies the same copy-only rule,
with the project inheriting the global mode and naming like its targets do.
2026-10-09 01:02:13 +08:00
Willie e0b930cad0 refactor(sync): trim the naming migration's I/O and manifest bookkeeping
The legacy lookup stat'ed the skill's current entry before looking for old
names, adding syscalls to every flat sync; it now stats only the candidate
names other than the current one (usually none exist) and checks the
current entry only once an old managed entry is found. ReadManifest now
always returns a Naming map, Manifest.Remove drops an entry's records in
one place, copySkillToTarget takes the name to write instead of deciding
it, and diff reads the manifest only for copy targets.
2026-10-09 00:58:34 +08:00
Willie 92f3d809c0 fix(server): refuse a global mode that breaks inherited prefixed naming
Targets that set prefixed naming but inherit the skills mode depend on the
global mode staying copy. Changing it from the dashboard left those targets
invalid until the next sync reported them; the global mode setter now runs
the same copy-only check the per-target setters do.
2026-10-09 00:58:34 +08:00
Willie e44466c9fc test(sync): cover prefixed naming in project mode
Project mode inherits target_naming from the project config through a separate path (defaultTargetNaming on ProjectTargetEntry), so it gets its own end-to-end check that two same-named tracked-repo skills both sync.
2026-10-09 00:53:37 +08:00
Willie 1e00939512 fix(sync): keep naming migration from claiming another skill's entry
The legacy lookup checks a skill's flat, standard and prefixed names. With
a manifest that has no naming records yet, aaa/dev looked at "dev", found
the top-level dev skill's managed copy and synced into it, because nothing
said the entry belonged to someone else. A skill that already has its
current entry now skips the lookup, and names other skills sync to in the
same run are never treated as old names.
2026-10-09 00:53:13 +08:00
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