* test(install): reproduce loss of pulled tracked records
Exercise the two-machine push and pull sequence and reconciliation states so
missing tracked clones cannot silently erase shared install intent.
* fix(reconcile): preserve tracked records missing local clones
Pull transfers tracked repository metadata but not ignored clones. Keep the
missing records during global reconciliation so another install and push cannot
erase shared intent or accepted audit findings on every machine.
* test(reconcile): isolate tracked record fixtures
Use the shared sandbox fixture for both reconciliation tests so their home
and configuration paths remain isolated from the invoking environment.
* fix(reconcile): retain all sourced tracked declarations
Legacy tracked members and unfollowed source links can hide declarations
from the local walk. Preserve sourced tracked records regardless of their
path so unrelated installs cannot erase them or their audit acceptances.
Document restoring a missing checkout before uninstalling it and cover
migration, link collisions, aliases, and explicit removal.
* test(reconcile): drop fixtures existing tests already pin
The tracked-record unit test also seeded a missing plain record and a
live plain record. TestReconcileGlobalSkills_PrunesStaleEntries already
pins both outcomes: a sourced plain record whose folder is gone is
pruned, and one on disk survives. The tracked record with no source
still catches a fix that keeps everything or skips the prune.
The two-machine test passed HOME and SKILLSHARE_CONFIG to RunCLIEnv,
which already sets both from the sandbox for each child process.
Separate homes, XDG paths, client overrides and git config remain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(reconcile): retain tracked entry for unavailable link
Expect sourced tracked declarations to survive reconciliation with either
source-link policy, so the test matches the cross-machine retention contract.
* fix(config): prune legacy tracked members
Retain only sourced tracked repository declarations during reconciliation.
Migrated member records are not restorable as repositories and retaining them
would leave permanent misleading install requests and audit acceptances.
* fix(reconcile): preserve tracked intent across followed links
A source link can exist before a tracked repository declaration is pulled. Preserve that declaration when the linked folder is not a checkout so later reconciliation does not discard its record and audit acceptances.
* test(reconcile): cover grouped followed declarations
A followed group can contain the path of a pulled legacy repository declaration, which must retain its tracked intent while its key migrates.
* fix(test): scope collision fixture runner correctly
Keep the isolated CLI runner in the collision subtest that uses it so the integration test package can compile.
* docs(manifest): clarify tracked checkout recovery
A retained declaration cannot restore a checkout while another folder or source link occupies its destination, and restoration requires a reachable source. State those prerequisites in each manifest translation.
* fix(config): prune members under recorded repositories
A migrated underscore-named member can otherwise survive a missing checkout as a repository declaration. Check recorded ancestor paths while preserving ambiguous grouped declarations and unrelated aliases.
* docs(manifest): restore fresh-clone project guidance
Explain that project declarations without local install records remain available so teammates can install them after cloning.
* refactor(reconcile): drop the tracked-intent walker policy
Restore baseline normalization for present paths while retaining absent
repository declarations through the shared metadata predicate. Isolate the
reconcile fixtures without building a CLI and share native-client overrides
without changing the original two-machine record and audit regression.
Validation: gofmt, git diff --check and context-router check only.
Runtime, builds and tests were not executed under the source-only gate.
* fix: forget linked checkout records and declarations without checkouts
Extend the metadata and uninstall owners to remove a declaration without
reading or moving its occupant, contacting its source, or changing trash
and gitignore. A failed metadata save makes every metadata-only result fail.
Clean up global unlink records in CLI and API, preserve existing-path name
precedence, report record-only results truthfully, and list declarations in
the dashboard API with noCheckout. Keep project removal behavior unchanged.
Remove the obsolete grouped-link walker-policy assertion while preserving
grouped absent declarations and the original record/audit A/B regression.
Validation: source-only five-pass review, gofmt, git diff --check and the
context-router check. No runtime, builds, tests or frontend tooling ran.
Stop at commit 15 for the mandatory Luna checkpoint before UI and docs work.
* fix(server): reload metadata before removing declarations
Preserve CLI records and audit acceptances written while the dashboard is open. Resolve new declarations from disk and refuse stale-cache saves after a reload failure, retaining unlink success when its link already moved.
* feat(dashboard): remove a tracked repository record without a checkout
Show declaration-only rows without checkout actions or status promises. Reuse Uninstall with record-specific confirmation and feedback, keep real-checkout force handling, and refresh the missing-entry list after repository removal or unlink.
* docs: explain kept declarations and how to remove them
Document direct global declaration removal and optional restore in English and all four translations, including occupied paths and normalization after reconcile. Keep built-in guidance accurate and use the existing API removal result for dashboard success feedback after concurrent CLI changes.
* fix(dashboard): confirm restored checkouts after forceable refusals
A tracked declaration can be restored through the CLI while its dashboard
row still says there is no checkout. Treat a forceable uninstall refusal
as evidence of the current checkout and promote the existing confirmation
to its dirty or unreadable-status warning before allowing explicit force.
Author stale-row regressions for both forceable codes before the source
repair, and retain nonforceable failure and actual-result success feedback.
Validation: five serial source review passes, git diff --check, and the
context-router check. Tests, builds, runtime and frontend tooling were not
run under the source-only gate.
* test(server): persist overview declarations before routed request
The overview fixture added declarations only to the in-memory skills store,
which the real request's config reload replaced with on-disk metadata. The
hosted unit, offline, and Nix jobs consequently returned no tracked rows.
Save the complete fixture through MetadataStore before serving the request
and fail setup on a save error. Keep the middleware, assertions, and
production behavior unchanged.
* fix(server): prefer exact declarations before checkout shorthand
Removing a missing _team declaration from the dashboard could resolve the
different org/_team checkout by basename and trash it instead.
Reload metadata before declaration lookup, give exact declarations priority,
and preserve checkout resolution before non-exact declaration fallback.
Add routed absent/occupied regressions and checkout precedence guards, and
persist existing checkout fixtures so the metadata reload keeps their state.
Validation: gofmt, git diff --check, and context-router check passed.
Tests were authored but not run under the source-only fleet restriction.
* fix: preserve removal intent and report partial failures
Bind dashboard record-only removal to its canonical declaration and refuse
restored checkouts before checkout resolution or force. Refresh the row and
require another confirmation before moving a restored checkout to trash.
Keep unresolved uninstall inputs and their reasons in JSON failed results,
including all-invalid requests, partial successes and dry runs. Report unlink
metadata cleanup failures as partial results, refresh completed unlinks and
show localized warnings. Keep CLI and dashboard guidance aligned.
Regression tests were authored before source changes and remain unrun under
the source-only task restriction. Static formatting, diff and router checks
passed; no build, product runtime, frontend tooling or test suite was run.
* fix(unlink): log partial metadata cleanup failures
Write the unlink result after global metadata cleanup so load and save
failures retain their diagnostic and report partial success. Preserve the
successful link removal, warning, target and exit policy, and the existing
link, project unlink and native removal failure behavior.
Add the corrupt-metadata regression before the fix; leave it unrun under
the source-only authorization. Formatting, diff and context-router checks
pass; runtime verification remains with the coordinator.
* fix(unlink): forget records below the removed link name
Reconcile can normalize a followed link's record to untracked, and linked
collections can retain nested repository declarations. Clean the removed
namespace through the existing metadata path owner in both unlink callers,
including audit acceptances, while keeping declaration uninstall strict.
Author CLI and route regressions before the source fix for normalized and
nested records, sibling preservation, and subsequent bare install. Tests
remain unrun under the source-only task restriction; static checks only.
* fix(uninstall): refuse a restored checkout at execution
A declaration selected while absent can become a checkout before removal
runs. Recheck the resolved source-relative name in the shared metadata-only
execution owner and refuse before touching metadata, regardless of force.
Reuse the existing dashboard conflict response and refresh/reselection flow
for this refusal, preserving the earlier record-only intent guard. CLI
results already carry shared execution failures through text and JSON.
Author restoration, force, absent/occupied control and client boundary
regressions before production edits. Correct the unlink fixture name and
response-key assertion found in serial static review. All tests remain
unrun under the source-only restriction; formatting/diff/router checks pass.
* refactor(server): consolidate repository uninstall result handling
Resolve a declaration or checkout to one item and canonical name before
using the existing uninstall, conflict, log and success response tail.
Keep metadata-only removal unforced, preserve its error and cache recovery
behavior, and report movedToTrash from the selected item.
Preserve exact declaration precedence, record-only checkout refusals,
ordinary checkout errors and project behavior without changing tests.
Five serial source review passes, gofmt, diff checks and the context-router
check completed. Tests and builds remain unrun under the source-only brief.
* fix(unlink): preserve independent records and trash undo metadata
Limit unlink's legacy group matching to members so a retained declaration
such as team/_repo survives unlinking _team. Share snapshot and removal
matching while keeping generic uninstall's legacy contract unchanged.
Save the exact removed records, audit acceptances and target overrides
through uninstall's existing trash sidecar owner before pruning metadata.
Keep metadata on sidecar failure and preserve completed-unlink warnings,
fresh reloads, cache refresh and project-mode behavior.
Author owner, CLI and API regressions for namespace collisions, undo,
partial failures and project/empty controls. Source-only verification:
gofmt, diff check and context-router check passed; runtime tests, builds,
frontend checks and final make check remain unrun for root-owned gates.
* fix(install): preserve independent tracked declarations
Limit declaration-only cleanup to the precise namespace and legacy members already used by unlink. Keep independently installed prefixed repositories, their audit acceptances, and overrides when forgetting a missing checkout.
* fix(cli): explain missing tracked repository recovery by mode
Offer global record removal when restoring an unreachable source is unwanted. Keep project recovery scoped to install -p, share the hint with doctor, and align update documentation in every existing locale.
* refactor(uninstall): share declaration and unlink operations
Keep declaration resolution and unlink metadata ordering in shared owners so CLI and API preserve the same scope and recovery behavior. Consolidate domain regressions while retaining caller translation coverage.
Distinguish record-only removals in API and CLI operation logs and CLI JSON, including mixed batches and dry runs. Document outcome fields, warning semantics, and current API error codes across existing locales.
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Willie <egg358358@gmail.com>
* feat(ui): show skill descriptions in the list and let expand all open packages
Reviewing a large library meant opening each detail page just to read
what a skill does (#627, proposal in #631). The resources list response
now carries each skill's and agent's frontmatter description, read in
the same pass as manual-only, and the list shows it truncated under the
name with the full text on hover.
The read now decodes the frontmatter once for both fields. An unquoted
": " in a description is invalid YAML, so a failed decode falls back to
the line scanner instead of dropping the description and manual-only.
Editing a skill refreshes the list too, so the new description shows
right away.
Expand all / Collapse all also opens and closes nested-skill packages
from #624; before, it only touched source and folder groups.
Closes#627
* feat(ui): redesign list packages as an inset panel with a description switch
The chevron-in-a-column nesting read as a second, unrelated table and gave
no room for the descriptions #627 asks for. A count pill after the package
name now opens its skills in one quiet inset panel, with deeper packages
indented under a faint guide, so the hierarchy stays readable at any depth.
The rest closes the gaps left against #627: a Show > Descriptions switch
keeps the compact list one click away, keyboard focus reveals the full
description, a search opens only the packages holding a match without
overwriting what the user left open, and the selection bar says how many
selected items are out of view. Only the name opens the detail page, since
whole-row clicks were easy to trigger by accident once rows held more text.
* fix(ui): keep linked-folder matches when searching a folder group
Searching while grouped by folder took package ancestors only from skills
whose folderOf matched the group key, but groupByFolder keys a linked
folder's skills by the link name. Every skill in a linked folder fell out
of its own group, so the header counted a match and drew no row. The
ancestor pool is now each folder group's unfiltered skills, keyed by
groupByFolder itself, which always contains the group's matches.
* fix(ui): keep the .ss-r .nm.m rule the design token export reads
Merging it into :is(.ss-r, .ss-nr) .nm.m removed the exact selector that
scripts/design/tokens.py looks up for the row name type scale, so the
design token tests failed in CI.
`install --track --into org` clones to org/_repo, but skill discovery
only marked a skill as in-repo when the first path segment started with
"_". Everything downstream also assumed the repo name was that first
segment. Skills of such a repo were therefore treated as loose skills:
no source in the dashboard, not grouped under the repo, a skill count of
0 in `status`, and an install hint that pointed at the wrong name.
Discovery now records each skill's tracked repo root (RepoRelPath). A
first-segment "_" folder still counts as before; a deeper one counts
only when the walk saw it as a git clone, so a plain org/_drafts folder
stays a folder. The repo's .skillignore is looked up by the same root.
Consumers move from "first segment" to that root:
- the API exposes it as repoPath, and the dashboard groups, updates and
uninstalls repos by it;
- `list` and `status` use it for repo names and counts;
- batch uninstall accepts a nested repo name, so the dashboard can still
remove an --into repo now that its skills are in-repo;
- repo names sent to the dashboard by check and update-all use slash
paths, so they match repoPath on Windows too;
- the install hint suggests `skillshare update org/_repo`.
Fixes#470
Tracked repo metadata is keyed by the repo directory (e.g. "_skills"),
but skills inside the repo are discovered with their full path
("_skills/skills/engineering/tdd"). The lookup found no entry for them,
so /api/resources returned an empty source and the dashboard's update
cards showed "tracked" without owner/repo. Repos whose SKILL.md sits at
the root matched the key directly and looked fine, which is why the
issue appeared to correlate with partial clones.
Nested repo skills now fall back to the repo's tracked entry. They also
ignore a bare-basename match, which GetByPath keeps for legacy short
keys but which can belong to an unrelated top-level skill of the same
name. GetByPath itself is unchanged because update, uninstall and check
depend on its current behavior.
Fixes#467
The uninstall sequence (move-out check, dirty check, move to trash,
.gitignore cleanup, metadata prune) lived in the CLI and in three
dashboard handlers, and the copies had drifted: three different prune
rule sets, no dirty check on DELETE /api/repos, and no metadata prune
at all on DELETE /api/resources, which left the removed skill's entry
and target overrides in .metadata.json.
internal/uninstall now owns the sequence for resolved items. Callers
keep name resolution, prompts, output, HTTP status and oplog.
MetadataStore.RemoveByNames is the single prune rule set: an entry goes
when it is a removed path or lies below one, by key or by Group, plus
the tracked legacy group of a top-level repo.
Behaviour changes, all intended:
- DELETE /api/repos/{name} refuses a dirty tracked repo, or one whose
git status cannot be read, with 409 unless ?force=true.
- DELETE /api/repos/{name} refuses a followed link whose folder is
itself a skill, like every other uninstall path.
- DELETE /api/resources/{name} prunes the skill's metadata.
- Removing top-level "foo" no longer prunes "frontend/foo" (CLI), and
removing repo "_team" no longer prunes the untracked group "team"
(dashboard batch); both dropped metadata of skills still installed.
Refs #442
The list TUI marks a skill with disable-model-invocation as manual only,
but the dashboard showed that state only inside the skill editor, so a
skill the model never loads looked the same as any other. The skills list,
tiles and the detail page's info column now carry a manual only tag.
The skills API reports manualOnly, read the same way the TUI reads it.
Agents are left out: their harnesses do not read the key.
Refs #283
reloadConfig now updates s.cfg.Source and s.cfg.AgentsSource from the
refreshed ProjectConfig so project UI handlers see the latest source
directories after a config edit.
Add ProjectGitignoreTarget helper that computes the correct .gitignore
directory and entry prefix based on whether the source path is inside
.skillshare/ or a custom location. All gitignore write and remove
operations (reconcile, install, uninstall, server handlers) now use
this helper instead of hardcoded 'skills/' prefix.
Fix nil projectCfg panics in three server tests that simulate project
mode by setting projectRoot without projectCfg.
- Fix sync matrix using wrong builtin agent targets in project mode
(DefaultAgentTargets → branch on IsProjectMode)
- Fix sync matrix not skipping filters for agent symlink mode,
matching the existing skill symlink behavior
- Remove double-defensive slice copies in handleListTargets since
targetsummary.Builder already clones Include/Exclude
- Extract shared findAgent() to deduplicate discovery logic between
resolveAgentResource and resolveAgentRelPathWithStatus
- Update test URLs from /api/skills to /api/resources and response
keys from skills/skill to resources/resource to match the route
rename from the resources refactor
- Dual-write in WriteMeta: also writes to .metadata.json for backward compat
- Migration looks in parent dir for registry.yaml
- Group uninstall matches entries by Group field + full path
- Sync test uses MetadataStore instead of registry.yaml
- All integration tests pass (0 FAIL)
P2-1: handleUninstallRepo and handleBatchUninstall used s.cfg.Source for
gitignore removal, but project-mode installs write to .skillshare/.gitignore
with a "skills/" prefix. Add gitignoreDir() helper that returns the correct
base directory per mode, and prefix entries in project mode.
P2-2: Registry prune used filepath.Base(repoName) to derive the legacy group,
causing sibling nested repos (e.g., org/_team-skills vs dept/_team-skills) to
collide on the same basename. Now uses exact Group match for nested repos and
restricts legacy basename matching to top-level repos only.
Tests added (15 new):
- resolveTrackedRepo: auto _ prefix, nested, already-prefixed, not-found,
basename fallback
- Registry prune: full-path Group, nested members by prefix, sibling isolation
- Project-mode gitignore: single + batch uninstall
- updateSingle: basename fallback, not-found, regular skill priority
- cleanEmptyParents: multi-level, stops at non-empty, stops at boundary
ReconcileGlobalSkills uses PruneStaleSkills(skillsOnly=false) which
removes agent entries unrelated to the uninstalled repo. The explicit
filter + Save is sufficient; full reconcile deferred to next sync.
P1: updateSingle now uses resolveTrackedRepo (shared with uninstall)
to find nested tracked repos like org/_team-skills instead of only
probing root-level _name/name.
P2: handleUninstallRepo now prunes registry entries belonging to the
uninstalled repo and runs ReconcileGlobalSkills/ReconcileProjectSkills,
matching the cleanup that handleUninstallBatch already does.
Extracted resolveTrackedRepo as a Server method to deduplicate the
nested path resolution logic between uninstall and update handlers.
MoveToTrash, List, Restore, and Cleanup all assumed flat names.
When a nested tracked repo like org/_team-skills was uninstalled,
the trash entry landed in a subdirectory that List could not see
and Restore could not reach.
- MoveToTrash: create intermediate dirs via filepath.Dir(trashPath)
- List: recursive WalkDir to discover nested entries, store full
relative path in TrashEntry.Name
- Restore: MkdirAll on destination parent before rename
- Cleanup: remove empty intermediate dirs after expiry via
cleanEmptyParents helper
Closesrunkids/skillshare#116 follow-up (nested trash path)
Add handler tests for nested tracked repo uninstall, ambiguous basename rejection, and traversal rejection.
Also isolate trash-backed server tests by setting XDG_DATA_HOME in test helpers.