Project uninstall had its own name resolver that turned every problem
into "not found", hiding that a name matched several nested skills or
pointed at a file. It now uses the global resolver, so both modes report
the same specific errors; only the not-found wording still names the
project's skills directory.
Close to thirty components and pages each spelled out the same query key,
fetcher and stale time for these shared queries. They now call one hook
per query and pass only what differs per page: enabled flags, polling,
and the MCP stale time, which pages already disagreed on and keep.
uninstall, update, status, list and the Web API now report "failed to
check git status: <err>", but the error was only "exit status 128"
because IsDirty dropped what git printed on stderr. The message now says
why git status failed, such as a corrupt index.
status and list discarded the error from the uncommitted-changes check,
so a tracked repo whose git status could not be read was shown as
up-to-date. They now show it as unknown with a warning naming the repo
and error; status --json sets the existing status and message fields.
The commands still succeed, since they only report.
Project uninstall backfills logs/, trash/ and backups/ into a gitignore
for projects created before v0.17.3. Since 60e19f96 ensureProjectGitignore
takes the .skillshare directory, but this caller still passed the project
root, so those entries landed in the project's own .gitignore.
About 57 handlers decoded request bodies with no size limit, and the few
that had one each picked their own. They now go through decodeJSON with a
1 MiB default; handlers that need more keep their larger limit. An
oversized body gets 413 instead of whatever the handler returned for bad
JSON (MCP and plugin requests used to answer 400). Every other decode
error keeps the handler's existing status and message.
Before merging the two uninstall flows, pin where they differ today
(glob expansion, resolve errors, --json support, preflight messages,
prompts, dry-run and gitignore output, lock pruning, oplog) so the merge
and the fixes that follow show up as deliberate test changes.
ConfigPage repeated the same load, dirty-tracking, save and reset state
for config.yaml, .skillignore and .agentignore. One hook now holds it,
with tests, and each editor passes only its own save call.
The discard check for the extensions tab no longer reads the .agentignore
dirty flag, which the old three-way ternary returned for any other tab.
update discarded the error from the uncommitted-changes check, so a repo
whose git status could not be read was treated as clean and pulled over
whatever local edits it had. It now fails that repo with "failed to check
git status: <err>" unless --force, matching uninstall and the Web API.
Batch update counts these as failed instead of skipped and exits non-zero.
The audit and log TUIs each hard-coded 70 columns in three places as the
width below which they drop to a vertical layout. It is now one named
constant next to tuiMinSplitWidth, the separate 80-column threshold the
list and trash TUIs use.
The skip added in b062a113 was only tested in global mode, where agent
target paths are absolute. Project mode resolves relative paths against
the project root, so it gets its own test.
audit.go had grown to 1821 lines mixing result scoring, skill and content
scanning, markdown link checks and content integrity. Each now lives in
its own file, matching how the tests were already split. Code is moved
verbatim; only package and import headers were added.
hub (five subcommands) and search still inlined the auto-mode check that
resolveAutoMode already implements, so a change to auto-detection would
have to be repeated in six more places.
Search kept its own name check, which rejected mixed-case names such as
"MySkill" that install happily accepts, so those skills never showed up
in results. It now uses validate.SkillName, the rule install applies.
Names install rejects, such as a leading underscore, stay hidden.
`sync extras` already exits non-zero and logs "partial" when a target
fails, but `sync --all` only printed a warning and exited 0, and its
--json path ignored extras errors entirely. The Web API always logged
"ok". Both now follow the CLI: `sync --all` exits non-zero on an extras
failure in text and JSON, global and project, without holding back MCP;
the Web API oplog records the error count with status "partial", or
"error" when every target that ran failed. The HTTP status stays 200.
After the server fixes, the CLI's collect*SyncResult functions and the
Web API loop ran the same merge/copy/symlink and prune logic twice. Both
now call sync.SyncSkillTarget and only render its result: the CLI keeps
its parallel grouping and progress output, the server stays sequential.
The stats helpers this orphaned are removed.
The server's "pruned" list is now always an array; it could be null
when a prune removed nothing.
The CLI skips targets of the "agents" extra whose path the agents sync
already writes to, so the two syncs do not fight over the same folder.
The Web API synced them anyway. It now builds the same set of agent
target paths and marks those targets with skipped_by "agents", the CLI's
JSON field name; existing response fields are unchanged.
Global sync created a missing extras source, project sync and `sync
--all` skipped it, and the Web API created it while ignoring any
MkdirAll error. Creating an empty source only hides a misconfigured path,
so every caller now skips the extra and tells the user to create the
directory. The Web API reports the hint in a new per-extra "warnings"
field; existing response fields are unchanged.
In symlink mode the Web API called SyncTarget directly, so a target
symlink pointing somewhere else was handled differently from `skillshare
sync`: no conflict message, and force had no effect. It now checks the
link first like the CLI. Without force the target fails with "conflict -
symlink points to X (use --force to override)" and counts as a failed
target; with force the link is replaced.
The Web API dropped the error from pruning orphaned skills and never
passed on the prune's own warnings, so a dashboard sync could leave stale
entries behind with no sign of it. It now reports them the way the CLI
does: "<target>: prune failed: <err>" followed by the prune warnings.
The Web API returned 500 at the first skills target that failed, so
every target after it was left unsynced and agents, extras and MCP never
ran. It now follows the CLI: the failing target becomes a
"<target>: sync failed: <err>" warning, the rest still sync, and the
oplog records the real targets_failed count with status "partial". When
every skills target fails the request is still an error, so single-target
setups keep seeing one.
Global sync, project sync, `sync --all` and the Web API each carried a
copy of the extras target loop, and the server inlined its own mode
switch. All four now call sync.RunExtraTargets, and the TUI calls the
exported sync.SyncExtraTarget.
This is a pure refactor. The caller differences (missing-source policy,
agent-overlap skip, path resolution, error precedence) are options on
the runner, and characterization tests pin them so the follow-up fixes
show up as deliberate test changes.
Both the CLI and the Web API discarded the error from pruning orphaned
agents, so a target whose directory could not be read looked clean while
stale links stayed behind. The shared runner now turns the error into a
"<target>: agents prune failed: <err>" warning, which both callers
already render. The sync itself still counts, matching how skills treat
prune failures.
The CLI and the Web API each carried their own filter, sync or transform,
then prune loop for agents, and the copies had started to drift. Both now
call sync.RunAgentSync and render its per-target results as before.
This is a pure refactor: characterization tests pin the server's 200 with
warnings on a per-target failure, the CLI's non-zero exit, the server's
silent skip of targets without an agents path, and the merge of agent
lists into the skills row. Prune errors are now returned in the result
but still ignored by both callers; surfacing them is a separate fix.
When git status failed, the CLI printed a warning and uninstalled the
repo anyway. A repo that cannot be read may still hold uncommitted
work, so moving it to trash risked losing it without the dirty-check
prompt. Without --force, that repo now fails with "failed to check git
status: <err>" and is counted as failed; clean items in the same batch
are still removed. --force keeps proceeding with a warning. This
matches the Web API since 20ae89a8.
The project uninstall test that asserted the old warn-and-continue
behavior now asserts the block.
Reduce repeated fixtures while retaining CLI flag, output, pruning,
copy-mode, and combined source/target symlink coverage. Keep manifest
orphan pruning and exercise repeated sync through both symlinked paths.
Removed integration cases and their retained unit coverage:
- TestSync_MergeMode_IncludeFilter -> TestFilterSkills_IncludeOnly.
- TestSync_MergeMode_ExcludeFilter -> TestFilterSkills_ExcludeOnly.
- TestSync_Pruning_PreservesLocalDirectories -> TestPruneOrphanLinks_KeepsLocal.
- TestSync_Agents_IncludeFilter -> TestFilterAgents_IncludeOnly.
- TestSync_Agents_ExcludeFilter -> TestFilterAgents_ExcludeOnly.
- TestSync_Agents_GlobExcludePattern -> TestFilterAgents_ExcludeOnly and
TestFilterSkills_GlobPatterns (shared flat-name matcher).
- TestSync_SourceDirIsSymlink -> TestSyncTargetMerge_SourceIsSymlink.
- TestSync_TargetDirIsSymlink -> TestSyncTargetMerge_TargetIsSymlink.
For the removed TestInstall_SkillIgnore_* cases, internal/skillignore
retains the following semantic coverage:
- ExcludesMatchedSkills -> TestMatch_ExactMatch and TestMatch_NoMatch.
- GroupPattern -> TestMatch_GroupPrefix and TestMatcherMatch parent
directory inheritance cases.
- PrecisePathInGroup -> TestMatcherMatch contains / is anchored cases;
also folded into the retained Git-discovery WildcardPattern test.
- DoubleStarPattern -> TestMatcherMatch double-star cases and
TestDiscoverSourceSkills_IgnorePatterns/DoubleStarPattern.
- DirOnlyPattern -> TestMatcherMatch directory-only cases,
TestRegressions/#83_trailing_slash, and
TestDiscoverSourceSkills_IgnorePatterns/DirOnlyPattern.
- CharClassPattern -> TestMatcherMatch character-class cases and
TestDiscoverSourceSkills_IgnorePatterns/CharClassPattern.
- CombinedPatterns -> TestMatcherMatch negation cases,
TestReadPatterns_ParsesFile, and TestRegressions.
Keep Git discovery wildcard and negation tests, including nested paths
and traversal into an ignored parent with a negated child.
Convert five TestDiscoverSourceSkills_*Pattern functions into matching
named subtests of TestDiscoverSourceSkills_IgnorePatterns, preserving
all fixtures and asserting the exact retained skill set. Preserve the
separate Lite traversal and WithStats behavior tests.
Convert all 18 Test{MoveToTrash,MoveAgentToTrash,Restore,RestoreAgent}
_RejectsTraversal_* cases into identically named subtests under their
respective Test*_RejectsTraversal functions. Retain every malicious
input, rejection assertion, and canary check.
Validation (Linux devcontainer):
- make build
- go test ./tests/integration/... ./internal/sync/... ./internal/trash/... -count=1
- make check
- git diff --check (host)
All passed.
ResourcesPage.tsx had 1301 lines and was the second most changed
dashboard file. Pure sorting and grouping helpers sat next to the page
state, and ResourceDetailPage imported the uninstall dialog from
another page.
The React-free helpers now live in lib/resourceGrouping.ts with focused
tests, and UninstallDialog lives in components/resources/. The page is
286 lines shorter, and its behavior and markup are unchanged.
Nothing in the repository calls these three unauthenticated wrappers.
Every caller uses the WithAuth or WithEnv variants, which stay. Removing
them means new code cannot pick the variant that silently skips token
auth.
The dashboard check fetched the remote HEAD without credentials when a
skill had no pinned branch. Private repos therefore reported an error in
the dashboard while the CLI check, which uses
GetRemoteHeadHashWithAuth, succeeded. The pinned-branch path already
used auth, and the default-branch path now matches it.
Twelve Bubble Tea screens built the same "/ " filter input and pasted
the same key handling. esc clears the filter and re-applies it, enter
locks it in, and typing re-applies it only when the text changed. A fix
to that behavior had to be made in every screen, and the shared filter
bar renderer lived in list_tui.go even though every TUI used it.
newTUIFilterInput and handleTUIFilterKey now hold that logic in
tui_helpers.go, next to renderTUIFilterBar, and focused tests cover the
key rules. The target list keeps its own handler because its enter and
typing behavior differ. The hard-coded split width of 70 in the log and
audit screens is left as is, because changing it would change layout.
Install, batch install, tracked-repo install, uninstall and rehydrate
each repeated the same nine-line block to reconcile the project or
global skills config. reconcileSkillsConfig now holds that block, so a
change to reconcile behavior or logging is made once instead of five
times. Each caller still passes its own source directory, so behavior
is unchanged.
The dashboard check reimplemented the CLI's per-repo check but fetched
without the HTTPS token and ignored git status errors. Private tracked
repos could fail in the dashboard while `skillshare check` worked, and a
repo whose status could not be read showed as up to date. Both check
endpoints now call check.ParallelCheckRepos, the same code the CLI uses.
The JSON and SSE response shape does not change.
Batch uninstall treated a failed dirty check as clean and moved the
repo to trash. Without force, that item now fails with the git error
instead. This is stricter than the CLI, which only warns and continues.
Batch target updates ignored metadata save failures and still reported
success, so an override could silently disappear on the next reload.
They now return 500.
client.ts had grown to 1835 lines of types and calls for every page. In
six months it changed in 71 commits, more than any other source file,
so almost every dashboard change had to edit one oversized file.
The transport now lives in http.ts, and each domain has its own call
module and type file. client.ts stays as a barrel that composes the
same api object. The 124 exported names and 145 api keys are
unchanged, so importers and the tests that mock api/client need no
edits. Domain modules import from http.ts, not from client.ts, which
avoids an import cycle through the barrel.
syncTarget and syncTargetWithSkills had no callers, so the merge, copy
and symlink helpers behind them were unreachable. That was 256 lines
kept alive next to the parallel sync path that replaced them, and
readers had to work out which path was real.
Twenty-five commands also repeated the same seven lines that turn
modeAuto into project or global mode. resolveAutoMode keeps that rule
in one place. Commands whose auto-detection differs, such as hub,
search, backup, init and plugin, are left unchanged.
The in-sync and ignored lists were grouped earlier, but the list of
resources that exist only in targets was still one comma-joined line.
It merged every target's names, so a reader could not tell which target
held a resource before collecting it.
Each target now gets its own group with its logo chip and count, and
each name carries a skill or agent icon.
The picked tool drew a rounded inset ink ring inside the list, which
looked like a card dropped into the rows and clashed with the dashed
separators in Playful. It now uses .ss-r.sel, the tinted fill that the
collect and install dialogs already use for a selected row.
The server put a fixed English sentence into the sync warnings, so the
dashboard showed it untranslated in every locale. The sync response now
reports the overlap as a path_overlap count, and the dashboard renders
it from the locale files with a button that opens the Health Check page.
The pull flow keeps the English sentence because it only shows raw
warning strings.
The page subtitle already says nothing is written until you press Sync,
so the playful-only hand note repeated it. The Kalam hand font has no
CJK glyphs, so in Chinese, Japanese, or Korean the note fell back to a
large system font squeezed into 150px and read as stray text.
When several targets tied for the worst context cost, the warning joined
their names but listed top offenders from whichever target was seen
first, so the offenders could belong to a different target than the
one a reader looks at. Map iteration order also made that choice
random.
Ties now resolve to the alphabetically first target, and the warning
carries that target's own offenders. The test gives each tied target a
different skill so a mismatch between target and offenders shows up.
Refresh the UI build stack and align local, container, and release workflows on pnpm 12.6.0. Record the approved esbuild install script and repair UI dependencies on initialized devcontainer starts.
Context-cost warnings in the Web API's sync response never carried a
target name: the warning struct tracked the worst token totals across
targets but dropped which target hit them. The CLI's sync --json and
the dashboard's ContextCostWarning both include target, so the
dashboard's i18n string rendered its {target} placeholder verbatim
instead of the target's name.
computeContextCost now records the names behind the worst always-loaded
and on-demand totals, joining ties with a comma, and reports them as
the warning's target. Regression tests cover both the tied case and a
worst-offender that only one target receives.
Markdown previews rendered much of what people write as plain text:
HTML such as <details>, GitHub alerts, ::: containers, emoji shortcodes
and markdown-it's ==mark==/++ins++/^sup^/~sub~. Tables squeezed short
columns until words broke, and file previews joined single line breaks
even though the tool reads the file as written.
HTML now renders through a sanitizer, since previews show skills from
anyone. A leading --- block counts as frontmatter only when it is YAML,
footnote links resolve, short inline code no longer splits at hyphens,
and outside links open in a new tab so the dashboard stays open.
Both lists were one comma-joined line. With project targets named
<project>@<tool> mixed in with global ones, and every ignored name
repeating its folder, they were hard to scan. In-sync targets now show
as logo chips, global apart from each project's, and ignored names are
grouped by their ignore file and folder.
Pi's logo is now coral, blue and yellow, so the black mask we drew no
longer matched what users see from Pi itself. The icon is pi.dev's own
logo cropped to the mark.
The MCP guide still said an Agent's existing server always shows as a
conflict once added to the source; a matching one is now taken over on
sync. The Extras reference now says a single file's name follows its
file name until one is typed.
Refs #303
Refs #300
Pi and OMP read APPEND_SYSTEM.md next to their skills, and editing it
meant leaving the dashboard. A target page now shows extra file tabs:
built-in ones come from targets.yaml `files:` (APPEND_SYSTEM.md for pi
and omp), and users can add their own, including files in subfolders.
Paths stay inside the tool's folder; three tabs show and the rest move
to a menu. "Share with Extras" opens Add extra prefilled with the file's
folder and name, so the same file can be shared across tools.
A single-file extra's name now defaults to its file name without the
extension (APPEND_SYSTEM.md -> APPEND_SYSTEM) until the user types one,
and the hint suggests the file name, as the #300 reporter asked.
Refs #301
Refs #300