A --track install with an explicit kind skips discovery, so check the subdir after the tracked clone and remove it on refusal. Match a case variant of a gitlink path only when it opens the same directory, so Linux keeps a real Vendor/Up next to a vendor/up gitlink. Strip everything before the last @ in a submodule URL so malformed and scheme-relative values fail closed.
On Windows and macOS a case variant such as Vendor/Up opens the empty submodule checkout, so compare gitlink paths with EqualFold. Search results that install straight from discovery now show its warnings too.
Redact query, fragment and userinfo from relative, scp-style and malformed .gitmodules URLs too, clean the subdir before matching gitlinks so vendor//up is caught, and return discovery warnings from /api/discover so the install dialog shows skipped submodules.
skillshare never fetches submodules, so a gitlink is an empty directory
after any clone. Installing that path reported success with nothing in
it, a path inside it failed with a misleading "does not exist", and
whole-repo discovery dropped its skills without a word.
Refuse a subdir that is or lies inside a submodule, naming the
submodule, its pinned commit and upstream URL, and warn for each
submodule skipped by whole-repo discovery and --track.
Refs #433
Release-As: 0.25.1
The bar is position: fixed with left: 50%, so its shrink-to-fit width is
capped at the space right of its left edge, half the viewport. Content
wider than that wrapped inside the fixed 46px height, as seen on the Pi
and OMP pending-changes bars. Size it to its content and cap it at the
viewport instead.
The pages added with the block modes covered what they write, not what
the review fixes made them do. The sharing guide still said sync
overwrites a modified target, which is wrong for a block: sync stops
until the edit is collected or the block is rewritten.
The guide, the extras reference and the built-in skill now cover the
block's Collect and Rewrite choices, block statuses, the target file
dialog, what a mode change removes, how restore treats a block, and
the cases a block target is refused. Common errors gains an Extras
section for the four new messages. The --mode help of extras init,
--add-target and the mode command listed only import among the
single-file modes; it now lists prepend and append too.
Refs #436
Two gaps found by the fifth Codex review of #451:
- A source line that reads as a block marker, such as an unfenced
end marker, was copied into the body, so the freshly written target
parsed as damaged and every later sync, collect and detach failed.
The block is now parsed back before writing, and a source whose block
would not read back as itself is refused.
- When a block had created the target and the user then added lines
outside it, switching to symlink or copy kept the "created" record,
so restoring the link later removed the file and the user's lines
with it. Those lines are now recorded as the restore point.
Refs #436
Four gaps found by the fourth Codex review of #451:
- The check that refuses a target linked to another extra's source ran
for import only, so a prepend or append target linked that way had
its block written straight into that source. It now runs for every
mode that edits the target in place.
- Switching a target with a damaged block to symlink or copy recorded
the damaged block as the user's restore point, so detaching later
brought it back. Recording the restore point now fails on a damaged
block.
- Appending to a file that ends inside an open code fence put the begin
marker inside that fence, so the next sync missed the block and
appended another. Such an append is refused. Separately, a block body
with an unclosed fence now ends at the end marker whose body matches
the block's hash, even when the user's own code follows.
- A second prepend block counted its sibling above it as misplacing it,
so each sync moved one ahead of the other. Placement now ignores other
managed blocks on the same side.
Refs #436
DELETE /api/repos/{name} now refuses a repo with uncommitted changes or
unreadable git status, and the Dashboard page never sent force, so those
repos could not be removed from it at all.
The two refusals force overrides now carry their own error code. The
page still sends the first request without force; on either code the
confirmation says why and retries with force only when the user
confirms. Other refusals, such as a linked folder that is itself a
skill, keep the plain error because force does not change them.
Refs #442
On main these two readers scanned SKILL.md line by line and returned at
the line they were looking for, keeping nothing. After the refactor they
first collected the whole frontmatter block, so a large block cost its
full size on every call even when name came first, and an unclosed one
cost the rest of the file. Sync, target naming and listing call them
once per skill or agent. Reported by Codex review on #457.
The per-line rule (which line opens and which closes the block) moves
into blockWalk, which locateFrontmatter and the new scanLenientBlock
both use, so the streaming path and the byte locator cannot drift.
ParseSkillName and ParseFrontmatterField stop at their key again; the
list and fields readers collect the block as they always did. Results
are unchanged for every entry point.
Refs #449
Five gaps found by the third Codex review of #451:
- Switching a target with a damaged block (a deleted end marker) to
import ignored the parse error and added the @ line, so the tool read
the stale block as well. The switch now fails until the block is
repaired.
- Detaching such a target reported success without touching the file,
so Assign dropped the connection and left the block with nothing
configured to remove it. Detach now returns the error.
- PlanAssign decided whether a non-import target could take several
files, and Assign chose each new file's mode, from the extras before
the files being detached were gone. Removing the only block holder
while adding two files therefore passed the plan, then gave both new
files a link, the second replacing the first. The plan now detaches
first and Assign applies the modes the plan validated.
- When the last block left a file it had created but the user had since
added lines to, the created record stayed, so a later link attach and
restore deleted the user's file. The attach record is cleared once no
managed block or import line remains.
- A source with a fence that never closes swallowed the block's own end
marker on the next parse, so a freshly written target read as
damaged. An open block's end marker now ends it when the fence never
closes.
Refs #436
TestGitRemoteHash_DefaultBranchUsesAuth puts an extensionless shell
script named git first on PATH. On Windows exec.LookPath only resolves
names with a PATHEXT extension, so the script is ignored and the real
git.exe probes github.com, which answers "repository not found" for the
made-up repository. The auth env is built without any platform branch,
so the product path is unaffected; only the test double cannot work
there. Skip it for the same reason the fake-git tests in
internal/install/source_fallback_test.go already do.
Refs #444
Rebuilding the path readers on the shared locator made them read the
whole SKILL.md into memory, where they used to scan line by line and
stop at the closing delimiter. They run once per skill or agent during
sync and listing, so a large body, or a large file with no frontmatter
at all, now cost its full size on every call.
readHead goes back to a bufio.Scanner and keeps the lines from the
opening delimiter to the closing one, nothing before and nothing after.
Reading through the real Scanner also replaces the code that imitated
its quirks (64 KiB line cap, one \r dropped per line); ReadSkillBody,
which needs the body, takes them from scanLines. An unclosed block is
still kept to the end of the file, as the list and fields readers always
did.
Review follow-ups in the same files: RewriteFrontmatterList no longer
copies the content to a string and back, ParseFrontmatterField's two
loops no longer share an index, and the tests share one file helper.
Results are unchanged for every entry point.
Refs #449
Review showed three ways a missing key still passed:
- t('sync.changes') passed because the counted base was accepted for
any string; a string passed straight to t() must now be a key itself.
- plural('typo.key', n) was only seen when its first word was a known
namespace; strings passed straight to plural() are now checked for
both forms.
- The Go test listed the values that complete "plugins.problem." by
hand, so a new case in automationProblem passed; the values now come
from that function's switch.
The files of config paths were also skipped by every check; they are
now skipped only where config paths look like keys, so their t() calls
are checked again.
Refs #448
Two places still wrote out 'translate the backend key, else show its
text' by hand next to keyedText, so the rule had three copies. The Pi
package test also rebuilt the set of Pi targets for every package on
every render; it is now built once per inventory, as before the flow
moved out of the page.
Refs #446
The audit query of a skill is keyed by name and kind, and its cache is
cleared by the ['audit', 'skill'] prefix. The name-only key lost its last
caller when the key literals moved into queryKeys.ts, and read as the real
query key while matching none exactly.
Refs #445
The mode picker stores the new mode before syncing, so the block and
import handlers saw the previous mode's output as the user's content:
copy → prepend kept the whole copied source beside the new block,
import → prepend kept the @ line, and prepend → import kept the block.
The tool then read the instructions twice, and detaching removed only
the new representation.
Entering a block mode now rebuilds a leftover copy from the attach-time
base (backing up an edited copy as a mode-switch drift, as import does)
and drops this extra's @ line; entering import mode drops this extra's
block, keeping a hand-edited one as a drift backup.
Refs #436
Review of the shared uninstall operation found that RemoveByNames still
matched a bare key: removing top-level "foo" pruned the legacy entry
"foo" with Group "frontend", which belongs to the installed
frontend/foo. Entries are now matched by their full path only.
Also from review: a dry run no longer runs git status for tracked
repos (it reports no git state), the unused Outcome.Removed is gone,
the two single-item handlers share one status mapping, and the CLI
reports a single target in one place instead of three flag checks.
Refs #442
The dashboard update of N tracked repos loaded the metadata store 2N times
under the server lock, and each load walks the whole source tree. The refresh
now returns before loading when the repo has no root SKILL.md, reports
whether it saved a change, and the server reloads its store only then,
through the existing reloadSkillsStore.
The CLI single-repo path tracked its output with two flags and a OnceFunc.
The caller hook now runs once for every outcome, so the spinner stop, the
discard warning and the pull summary live in one place and print in the same
order as before.
auditGateFailClosed rebuilt three of its messages by hand; they are
AuditGateError's own wording with another subject, so both now come from one
function.
Refs #443
The source view of a target's file showed the block markers as plain
comments, so which lines skillshare manages, and which block had been
edited by hand, took reading the markers. Each managed block is now
tinted, a block the target reports as modified in the warning tone, and
the dialog says what the block is or offers Collect and Reapply for the
edited one, as the row does.
Refs #436
Resolution.Run started a goroutine for every remote, even without
Parallel. The dashboard handlers run sequentially and rely on net/http
recovering a panic, which it only does on the request's goroutine, so a
panic while resolving a remote would have ended the server process
instead of failing one request, as it did before the resolution moved
into internal/check.
The sequential and the parallel path are now separate loops, so the
invariant is visible instead of being spread over three Parallel checks.
Refs #444
Review of the guidance move found no defect, but three things made the new
seam harder to read than it has to be:
- The plan and apply handlers nested the success path inside `if err == nil`
with one shared error write. They return early again, like the handlers
next to them.
- The handler derived the scope from IsProjectMode() while GuidanceInput
derived the same value from ProjectRoot. Scope() is exported so the status
response and the block inspection read one value.
- (*Server).memoryInstructions had become a one-line passthrough with a
single caller, so it is inlined.
GuidanceReader is now exported, so its doc states what the server always
guaranteed: at least one source, and Dest indexing one of them. The
ApplyGuidance and Config comments say what callers need to know, and the
architecture paragraph is rewrapped.
No behaviour change.
Refs #450
Review of the shared tracked-repo update found two regressions.
`install --track --update` lost "in tracked repository" from its message when
findings blocked and the rollback failed. The CLI builds its summary from
that phrase, so the old sentence is back, with the rollback part still coming
from AuditGateError.RollbackNote.
The dashboard dropped a failed metadata refresh without a trace, while the
CLI prints a warning. It is now logged.
trackedBlockMessage also gets a test: the dashboard offers Force Retry based
on its exact wording, and the server-level tests for the failed-rollback
branches went away with the old gate.
Refs #443
Four gaps in the managed-block modes, found by Codex review of #451:
- Switching a block target to symlink or copy recorded the restore point
from the file as it stood, block included, so restoring the target
later brought back instructions the user had removed. The restore
point now strips this extra's block, as it already stripped its
import line.
- Detaching a target whose block had been edited by hand dropped the
edit outright. The edited file is now kept as a drift backup first,
as an edited copy or link is.
- Fences were only tracked outside a block, so a source that quoted a
marker in a fenced example produced a target that read as damaged on
the next sync. Fences are tracked inside the block body too.
- Changing a synced target between prepend and append left the block
where the old mode had put it, since body and hash still matched. A
block in the other mode's place is moved.
Refs #436
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 i18n module guaranteed parity between locales and left the rest to
callers. `t` takes any string, so a mistyped key rendered as the key and
nothing caught it; internal/plugin sends translation keys that nothing
compared with en.json; and about 130 call sites chose between `.one` and
`.other` by hand.
- keys.test.ts reads the dashboard source and fails on a key that is not
in en.json. A key built at run time is checked by its fixed head, and a
string that only looks like a key is named in a short documented list.
- internal/plugin/i18n_keys_test.go fails when a "plugins." literal the
package emits is missing from en.json; the one key completed at run
time lists its values.
- plural(key, count) in the i18n module picks the form, with the same
"exactly 1" split the call sites used, so every rendered string is
unchanged. No locale file changed.
Refs #448
A target row showed only the path of the file the tool reads, so seeing
what a prepend or append block actually did to that file meant leaving
the tab for the target page. The path now opens a read-only dialog with
the same preview and source views, and a link to the target page for
editing. Riders keep a plain path: they have no file of their own.
Refs #436
Updating a tracked repo is a fail-closed sequence: check for uncommitted
changes, pull, audit what was pulled, reset to the pre-pull commit when the
audit blocks. The CLI had two copies of the pull flow, the dashboard a third,
and the audit gate existed four times (CLI, dashboard, and two in install).
The copies had drifted: the dashboard ignored a failed git status and never
refreshed root-skill metadata, and each copy worded a failed rollback on its
own.
update.TrackedRepo now owns the sequence and returns a structured result;
install.AuditGate is the only gate. internal/update is a new package because
internal/git already imports internal/install. The CLI keeps its spinner,
rows and the "Apply anyway?" prompt, passed in as one Confirm callback; the
dashboard turns the result into its JSON item.
Behaviour changes, all towards the stricter copy:
- the dashboard reports a failed git status as an error instead of pulling;
- the dashboard refreshes root-skill metadata after an update, like the CLI;
- a prompt that fails rolls the update back instead of leaving it applied;
- the rollback-failed and rollback-unavailable texts come from one place.
Accepted findings stay as they were (CLI honours and records them, the
dashboard does neither), now as the explicit AcceptedFindings input. The
"blocked and rolled back" texts are unchanged per caller because the
dashboard matches on them.
Refs #443
The dashboard's pull flow for tracked repos had no tests of its own, and the
CLI had none for uncommitted changes. Both flows are about to be replaced by
one shared operation, so their current results are pinned first: clean
update, blocked and rolled back, skip-audit, force not remembering findings,
dirty repos, and the pull error hint.
Refs #443
Each reader in internal/utils found the --- delimiters with its own
loop, under four different rules that were only visible by reading all
of them, and the list reader existed twice with a path copy and a bytes
copy that had drifted apart. A fix to one reader, like the mcp serve
fixes to the strict one, did not reach the others, and nobody could say
which rule an entry point followed without tracing it.
locateFrontmatter now does the locating for every reader, and the rule
is a frontmatterPolicy value: strictBlock, lenientBlock, bodyBlock and
rewriteBlock name the rules that exist and the entry points that use
them. The rules themselves are not unified; every entry point returns
what it returned before, including the bufio.Scanner quirks of the
readers that take a path (a line of 64 KiB or more ends the content,
one \r is dropped per line), which now live in scannable. The strict
reader still walks only to the closing delimiter and copies nothing.
Two more cases found by comparing old and new code on random input are
pinned: a block scalar on the last frontmatter line, and \r\r\n endings.
Refs #449
PluginsPage held the whole flow in one component: the busy, working,
failure, review, result and updates state, the rule that apply sends the
revision its preview returned, and the lists derived from the inventory.
Those rules could only be tested by rendering the page with five mocks,
so the test file changed whenever the page did.
components/plugins/pluginsFlow.ts now owns the state and the derived
lists (todo, active, idle, changed, Pi packages), and the page renders
what it returns. The rules are tested there with only pluginsApi faked;
the page test keeps rendering and wiring, and loses the four cases that
only checked a rule through the DOM.
The "use the backend key if present, else the text as sent" helper
existed three times; keyedText in outcomeText.ts is now the only one.
No text or markup changed.
Refs #446
The Pi and Oh My Pi extension tabs each carried a ReviewDialog with the
same flow, nearly line for line: preview once, apply only that plan's
revision, show busy and stale refusals, and offer "review again" when the
server reports the plan stale. A third target of this kind would have
added a third copy.
ExtensionsReviewDialog now owns that flow and the dialog frame. Each
target supplies its plan rows, texts and endpoints, so the two protocols
stay as they were: Pi previews without a revision, OMP previews against
the view's revision, and both apply the previewed plan's revision.
Hooks, MCP and Plugins use different protocols and are left alone.
Refs #447
The prepend and append modes are a feature, so Release Please would
propose 0.26.0 for this batch. The maintainer wants it to ship as
0.25.1, so ask for that version.
Release-As: 0.25.1