609 Commits
Author SHA1 Message Date
Willie 012a4ba97e fix(ui): resolve stuck update checks 2026-05-25 00:33:26 +08:00
Willie a2f958d288 feat(ui): background mode, in-place upgrade, and PWA support
Three user-visible additions to the web dashboard, plus the CLI surface
needed to drive them.

* `skillshare ui start` / `skillshare ui stop` — run the dashboard as a
  managed background process. Re-running start reuses the existing
  healthy process; stop uses the remembered host/port. Foreground
  `skillshare ui` keeps working unchanged. Process tracking lives in
  ui_process_{unix,windows,other}.go via a PID + current-state file.
* `--app` — opens the dashboard in a Chromium app-mode window (Chrome,
  Edge, Brave) on macOS, Windows, and Linux for a separate Dock/taskbar
  entry without browser chrome.
* In-place upgrade from the browser — the Update dialog and the Doctor
  page's Version card now expose an Update now button. Backed by two
  new endpoints (POST /api/upgrade, POST /api/restart in
  handler_restart_upgrade.go); the browser polls GET /api/health and
  reloads once the new server is ready. Dev builds short-circuit with
  `devMode: true` and a simulated restart so the flow can be exercised
  without rebuilding the binary.
* Progressive Web App — site.webmanifest, app icons (192/512), and a
  minimal service worker registered from main.tsx. Supporting browsers
  can install the dashboard as a standalone desktop app.
* Doctor Version card redesign — state-coloured icon (blue when an
  update is available, green when up to date), explicit
  `current → latest` delta, Update button only when there is something
  to upgrade.
* i18n — translate "DEV mode" in zh-TW / zh-CN / ko (previously left
  as raw English).

Adds CHANGELOG.md and website changelog entries for v0.19.20 and
refreshes website/docs/reference/commands/ui.md to document the new
modes, --app flag, new REST endpoints, and the in-place upgrade flow.
2026-05-24 01:21:06 +08:00
Willie c60bfd3c08 chore: release v0.19.19 2026-05-23 01:18:38 +08:00
Willie 1307873612 fix(install): normalize SSH subgroup repo names 2026-05-22 14:04:46 +08:00
WillieandClaude a61a0e3bea fix(install): include root SKILL.md in tracked repo discovery
After Phase A (210605ea) fixed metadata + status display for tracked
repos with a root-level SKILL.md, three output gaps remained:

- 'Found 0 skill(s)' on install (should be 1 — root SKILL.md counts)
- 'tracked_repos[].skill_count' was 0 (same root-case)
- 'Run sync' suggestion appeared even when no skill was discovered

Root cause: install/update used discoverSkills(destPath, false) which
walks the tracked repo's own root, treating the root SKILL.md at
relPath='.' as ignored. But 'skillshare sync' walks the source
directory; the same SKILL.md inside _<name>/ has relPath='_<name>'
(not '.') and is discovered as a normal skill. The two walkers used
the same helper with different includeRoot settings and produced
inconsistent counts.

Changes:

- installTrackedRepoImpl and updateTrackedRepo: switch to
  discoverSkills(repoPath, true) so SkillCount matches sync's view.

- buildTrackedRepoJSON: when counting skills per repo, accept both
  RelPath='<repo>/...' (nested) and RelPath='<repo>' (root-only).

- handleTrackedRepoInstall: suppress the 'Run sync' next-step when
  the repo had no skills/agents discovered.

Closes #163

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-22 11:29:01 +08:00
Willie 4d7011983c feat(sync): warn on skill path overlap with one-line hint
Detect overlapping target paths during sync — either two targets
sharing the same primary path, or cross-runtime discovery via the
also_scans table — and surface a brief one-liner pointing users at
`skillshare doctor` for the full breakdown.

Triggers in both CLI (sync.go, sync_project.go) and Web UI (sync API
warnings array, rendered by existing SyncPage warnings card). Detection
logic lives in internal/config/path_overlap.go and is shared between
both paths.

Quiet by design: no output when no overlap exists. JSON output mode
remains untouched.
2026-05-22 01:00:54 +08:00
Willie 88a1bd50a4 feat(doctor): warn on shared paths and cross-target discovery
Add two new doctor checks to detect duplicate-skill problems
surfaced in issue #135:

Layer 1 — checkSharedTargetPaths:
  Warns when two or more enabled targets resolve to the same
  filesystem path after tilde expansion. Pure metadata check; no
  runtime probing. Catches universal/warp/witsy all sharing
  ~/.agents/skills.

Layer A — checkCrossTargetDiscovery:
  Driven by a new also_scans field in targets.yaml that documents
  paths a target's runtime reads beyond its primary skills
  directory. Sourced from each tool's official docs. Populated
  for amp, antigravity, codex, cursor, firebender, kimi, roo.

  Warns when an enabled target's also_scans path is the primary
  path of another enabled target. Example: enabling codex +
  universal warns that Codex's runtime will see ~/.agents/skills
  content.

  Overlaps are grouped per scanner so a multi-overlap target
  (e.g. firebender reading 5 brand dirs for cross-compat) emits
  a single warning with indented detail lines.

config:
  - New targetAlsoScans struct + AlsoScansGlobal / AlsoScansProject
    accessors.
  - targets.yaml schema is backward-compatible (optional field).

Layer B (sync engine routing) and Layer C (user-declared
authoritative roots) are intentionally deferred — diagnosis comes
first, behaviour changes only if users actually ask.
2026-05-21 23:49:40 +08:00
Willie f01a679c56 fix(targets): revert cline paths to brand-specific dirs
Cline's official docs (docs.cline.bot/features/skills) list only
.cline/skills (project) and ~/.cline/skills (global) as supported skill
directories. The previous change to ~/.agents/skills was based on the
incorrect assumption that Cline scans the universal .agents/skills path,
which it does not.

Restore cline paths to:
  - global:  ~/.cline/skills
  - project: .cline/skills

Also remove cline from the universal-grouping sentence in the website
target reference, since cline no longer shares the .agents/skills root.

Existing users with cline enabled should manually remove stale cline
entries under ~/.agents/skills after upgrading.
2026-05-21 23:18:27 +08:00
Willie 8e0117a29d feat(init): emit sources map for new global configs (Phase 4)
Fresh `skillshare init` (global) now writes the v0.19.16 `sources:` map
instead of the legacy top-level fields:

  sources:
    skills: ~/.config/skillshare/skills
    agents: ~/.config/skillshare/agents

What changed:
- cmd/skillshare/init.go: construct Config with Sources{Skills, Agents}
  rather than Source/ExtrasSource. The --subdir update path writes to
  cfg.Sources.Skills accordingly. The --remote re-init path uses
  cfg.EffectiveSkillsSource() for git operations so it works whichever
  shape the existing config uses.
- internal/config/config.go: add `,omitempty` to Source field so configs
  that only set sources.skills don't get a noisy `source: ""` line.
- tests/integration/extras_test.go: rename TestInit_SetsExtrasSource to
  TestInit_WritesSourcesMap and assert the new shape (sources map
  present, legacy source/extras_source/agents_source absent).

Existing configs are untouched — legacy fields keep working through
Config.Effective*Source helpers. No auto-migration on Save.
2026-05-21 14:54:24 +08:00
Willie 996d00e342 feat(config): migrate consumers to Effective*Source helpers (Phase 3+5)
Make the v0.19.16 sources map actually do something: route all path
reads through Config.EffectiveSkillsSource() / EffectiveAgentsSource() /
EffectiveExtrasSource() so users who set sources.skills / sources.agents /
sources.extras get the configured paths everywhere.

Mechanical changes (~50 files):
- cmd/skillshare/**: replace cfg.Source / cfg.ExtrasSource reads with
  cfg.EffectiveSkillsSource() / cfg.EffectiveExtrasSource()
- internal/server/**: replace s.cfg.Source / s.cfg.ExtrasSource reads
  with the same helpers; server.skillsSource() / gitignoreDir() use the
  global-mode helper
- internal/config/config_validate.go: validate using EffectiveSkillsSource
  while still rejecting configs that set neither field explicitly
- internal/config/reconcile.go, registry.go: read via helpers

Behavioral fixes (paired with the migration):
- extras init / extras source / POST /api/extras no longer silently
  backfill the legacy extras_source field — the runtime fallback inside
  EffectiveExtrasSource() handles it. This stops surprise diffs in users'
  config.yaml after running extras commands.
- extras source command writes back to whichever field the user already
  configured (sources.extras if set, otherwise legacy extras_source) so
  the update is not shadowed.
- source_type in /api/extras and extras list correctly reports "default"
  vs "extras_source" by inspecting the raw (unresolved) configured value;
  sources.extras counts as configured for this purpose.

UI:
- ui/src/lib/fieldDocs.ts: neutralize sources / sources.* descriptions
  so they describe both project and global modes (Phase 5).

Preserved (intentional):
- Direct writes to cfg.Source / cfg.AgentsSource / cfg.ExtrasSource in
  init, migrate.go, cloneForSave, and server.reloadConfig — these are
  raw-field writes, not path reads.
- Updated test expectations for the removed backfills.
2026-05-21 14:49:11 +08:00
Willie 2b802012c4 feat(config): add sources map to global config (Phase 1)
Mirror project-mode `sources:` map (v0.19.15) on the global Config:

- GlobalSources struct with Skills/Agents/Extras fields (all omitempty)
- Sources field on Config (yaml: sources, omitempty)
- EffectiveSkillsSource(), EffectiveExtrasSource() helpers
- EffectiveAgentsSource() now prefers Sources.Agents over the legacy
  AgentsSource field before falling back to <BaseDir>/agents
- Load(): expand ~ in cfg.Sources.* (and AgentsSource, previously missed)
- cloneForSave(): fold $HOME → ~ in cfg.Sources.* for tilde-preserving saves
- RegistryDir cache uses EffectiveSkillsSource() so configs with only
  sources.skills (no top-level source:) still resolve a registry root

Schema:
- Add top-level sources property with skills/agents/extras sub-keys
- Mark source/agents_source as legacy in their descriptions
- Drop required:[source] (new configs can use sources.skills only)

Legacy source/agents_source/extras_source fields are retained
unchanged for backward compatibility. Caller migration to the new
helpers is deferred to a later commit.
2026-05-21 14:30:14 +08:00
Willie bb3745b8f5 fix: reject source/target path overlap and fail closed in check
ValidateProjectConfig now resolves each target's skills/agents path
and rejects configs where a source aliases or nests with any target
path. Without this guard, sources.skills: .claude/skills with a
claude target makes sync --force delete the source.

check -p now returns an error on LoadProject failure instead of
falling back to .skillshare/skills.
2026-05-20 18:24:41 +08:00
Willie 9a30a90366 fix: handle sources.skills: .skillshare producing invalid ./ gitignore pattern
Apply the same rel=="." guard to the skillshareDir branch of
ProjectGitignoreTarget, so sourcePath==.skillshare returns empty
prefix instead of dot.
2026-05-20 16:57:13 +08:00
Willie 14402dc6a5 fix: handle sources.skills: . producing invalid ./ gitignore pattern
When sourcePath equals projectRoot, filepath.Rel returns ".",
causing callers to write "./<name>/" patterns that git ignores.
Return empty entryPrefix so callers produce "/<name>" instead,
which is a valid root-anchored gitignore pattern.
2026-05-20 16:49:52 +08:00
Willie 5b7ca8ba3d fix: trash before gitignore cleanup and skip gitignore for external sources
Reorder handleUninstallRepo to move repo to trash before removing the
.gitignore entry, preventing accidental exposure of tracked content
when trashing fails.

ProjectGitignoreTarget now returns empty strings for source paths
outside projectRoot, since parent-relative patterns (../) are invalid
in .gitignore. All six callers guard on empty gitignoreDir and skip
gitignore management for external sources.
2026-05-20 16:34:02 +08:00
Willie 0c010c55f4 fix: wire custom sources into server reload and gitignore paths
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.
2026-05-20 16:12:02 +08:00
Willie 68d5eadc0b feat: support custom project source directories via sources map
Add ProjectSources struct to ProjectConfig with optional skills, agents,
and extras fields. When set, project-mode commands resolve source paths
from these values instead of hardcoded .skillshare/{skills,agents,extras}/.

Config example:
  sources:
    skills: ./docs/skills
    agents: ./docs/agents

Three EffectiveXxxSource(projectRoot) methods provide the central
resolution logic with fallback to defaults. The projectRuntime gateway
and server layer route through these methods, so most commands get
custom source support automatically.

Closes #153
2026-05-20 15:42:53 +08:00
Willie 9a57ca4308 fix(audit): handle uppercase URI schemes in dangling-link check
isExternalOrAnchor passed the raw scheme to isURLScheme which only
accepted lowercase letters, causing uppercase schemes like VSCode://
to be misidentified as dangling links.
2026-05-20 13:56:08 +08:00
Willie 3345fd677e refactor: unify gemini and antigravity targets under antigravity
- Update antigravity global path to shared ~/.gemini/skills
- Update antigravity project path from .agent to .agents
- Add aliases: gemini, gemini-cli, antigravity-cli
- Remove standalone gemini target (now an alias)
- Update testutil.CreateTarget to match new path
2026-05-20 13:44:40 +08:00
kostaandCodex ba7191fbf8 Reduce audit false positives
Tighten publisher claim extraction, skip custom URI schemes in dangling-link checks, avoid treating bracket placeholders as markdown links, and allow common documentation domains for external-link noise reduction.

Co-authored-by: Codex <noreply@openai.com>
2026-05-20 13:10:23 +08:00
kostaandCodex ddeb8e0355 Treat Swift files as audit-scannable
Co-authored-by: Codex <noreply@openai.com>
2026-05-19 09:55:22 +08:00
Jason Blackburn a656e30b7e 158: retain custom name and non-default branch for tracked skills 2026-05-17 14:03:22 +08:00
Willie 9307fc521c chore: release v0.19.12 2026-05-14 23:43:43 +08:00
Willie 3b2f062cf0 docs: add v0.19.11 changelog, preserve_tilde_on_save docs, fix CI test
- Add changelog entry for v0.19.11 (preserve_tilde_on_save, backups gitignore)
- Document preserve_tilde_on_save in configuration reference, cross-machine sync, FAQ
- Fix TestFoldHomePath/unrelated-abs: use /opt/unrelated/foo instead of /tmp/foo (CI sets HOME=/tmp)
- Add iFwu to README contributors
2026-05-14 13:22:23 +08:00
iFwu 5403595120 feat(config): preserve ~ in saved config paths (opt-in)
Add PreserveTildeOnSave config flag (default false). When enabled, the
Save path folds $HOME prefixes back to ~ when serializing the in-memory
Config to YAML so the on-disk config stays portable across machines
(e.g. when shared via dotfiles).

The in-memory Config is left untouched; cloneForSave() produces a
shallow copy with path fields rewritten. Mirrors the existing
expandPath() calls performed in Load():
  - cfg.Source, cfg.ExtrasSource
  - cfg.Targets[*].Path / Skills.Path / Agents.Path
  - cfg.Extras[*].Source and Extras[*].Targets[*].Path

Adds:
  - utils.FoldHomePath() helper with unit tests (exact-home, child,
    sibling-non-home, unrelated-abs, relative, Windows case-insensitive)
  - 3 Save-path tests covering default-off, fold-on, and Load→Save
    idempotency.

Default off keeps the change backward compatible: existing users see no
behavior difference. Users who share their config via dotfiles can opt
in with:

    preserve_tilde_on_save: true
2026-05-14 13:09:56 +08:00
Willie 56007efa5c chore: fix lint error 2026-05-11 23:46:43 +08:00
Willie 9a7271c1ae fix: address PR #151 review feedback
- Project mode JSON sync now includes context_cost (was nil)
- Server handler respects symlink mode (skips include/exclude filters)
- checkBudget reports all targets exceeding threshold (not just worst)
- Budget warnings include target name in CLI and UI output
- ConfigPage indentation restored to original 2-space style
2026-05-11 21:34:38 +08:00
Willie 9510476c45 feat(server): include context_cost in sync API response
Self-contained token estimation (chars/4) since buildAnalyzeEntries
is in main package. Returns grouped counts and budget violations.
2026-05-11 21:34:38 +08:00
Willie f173b1d456 test(sync): add integration tests for token summary and budget warnings
DiscoverSourceSkillsWithStats did not set collectContext=true, so
DescChars/BodyChars were always 0 when sync called buildAnalyzeEntries.
Add DiscoverSourceSkillsWithStatsAndContext that enables both ignore
stats and context collection in a single walk, and use it in sync.go
and sync_project.go.
2026-05-11 21:34:38 +08:00
Willie a945b3c0c5 feat(config): add ContextBudgetConfig for token budget warnings 2026-05-11 21:34:38 +08:00
eekryuos a54bd20abe Fix install command not works with http protocol 2026-05-11 04:19:58 +08:00
Willie 5975c1109a test: add regression tests for azure_hosts wiring in project install and agent update
- TestParseOptsFromConfig_IncludesAzureHosts: verify global config
  helper passes AzureHosts to ParseOptions
- TestParseOptsFromProjectConfig_IncludesAzureHosts: verify project
  config helper passes AzureHosts
- TestParseOptsFromProjectConfig_AzureHostsParseOnPrem: end-to-end
  verify project config azure_hosts produces correct on-prem CloneURL
- TestUpdateAgent_AzureOnPrem_UsesParseOpts: verify server agent
  update handler parses on-prem Azure source via ParseSourceWithOptions
2026-05-05 19:26:11 +08:00
Willie 204340c2e0 fix: wire azure_hosts through project install and agent update paths
- install_project.go: pass AzureHosts to temporary Config (was only
  passing GitLabHosts, so project-mode direct install ignored azure_hosts)
- update_agents.go: thread ParseOptions through batchUpdateAgents and
  reinstallAgent, replacing bare ParseSource with ParseSourceWithOptions
- handler_update.go: use ParseSourceWithOptions with s.parseOpts() for
  agent update in web UI

Without this fix, azure_hosts in .skillshare/config.yaml was silently
ignored during project install and agent update, causing on-prem Azure
DevOps URLs to be parsed incorrectly.
2026-05-05 18:54:45 +08:00
Willie e48a301623 feat: add azure_hosts config for Azure DevOps Server on-premises
Add azure_hosts config parameter (analogous to gitlab_hosts) that allows
users to register self-hosted Azure DevOps Server hostnames so they
receive proper URL parsing without appending .git to clone URLs.

- Add AzureHosts field to Config and ProjectConfig structs
- Add SKILLSHARE_AZURE_HOSTS env var support with merge semantics
- Generalize hostname validation into shared normalizeHostList/mergeHostsFromEnv
- Add azureOnPremPattern regex and parseAzureOnPrem for /_git/ URL routing
- Add isAzureHost for config-based host detection (no auto-detect)
- Update TrackName to handle on-prem Azure DevOps clone URLs
- Wire AzureHosts through InstallContext, ParseOptions, and Server
- Add JSON Schema, UI fieldDocs, and website documentation
- Add 19 new tests covering config, source parsing, and server

Closes #147
2026-05-05 18:33:07 +08:00
Willie d2946cb4d1 fix(tests): align integration tests with cursor project path change
The cursor target's project path was updated from .cursor/skills to
.agents/skills in 57b0649d but three integration tests still asserted
the old path:

- TestInitProject_Fresh_CreatesStructure
- TestInitProject_Discover_WithMode_AddsTargetMode
- TestSyncProject_MultipleTargets

Fix testutil knownPaths map and test assertions to match the new path.
Discover test now uses windsurf (unique path) instead of cursor
(grouped at .agents/skills with 10+ other targets).
2026-05-05 12:11:06 +08:00
Willie 57b0649d20 feat(targets): add 8 new agent targets and update cursor project path
Add AiderDesk, CodeArts Agent (Huawei), Code Studio (Syncfusion),
Devin for Terminal (Cognition), Dexto, ForgeCode, Rovo Dev (Atlassian),
and Tabnine CLI as built-in targets (56 → 64).

Update Cursor's project-level skill path from .cursor/skills to
.agents/skills to match Cursor's official documentation, which now
lists both paths as supported with .agents/skills as the ecosystem
standard convention. Global path (~/.cursor/skills) and agents paths
are unchanged.

All paths verified against official documentation or source code.
Codemaker excluded — no official docs confirm SKILL.md support.
2026-05-05 11:55:26 +08:00
Willie e2cb9f66fc fix(sync): expand grouped target members in host path inference
GroupedProjectTargets() merges targets sharing the same project path
into a single canonical entry, dropping member targets. For example,
.agents/skills is shared by universal, codex, amp, and others, but
only 'universal' was returned as the inferred target.

Expand Members in getProjectTargetPaths() so all targets sharing a
project path are included in inference results.
2026-05-05 04:07:16 +08:00
Willie a4da5fc7f6 fix: migrate legacy root orchestrator updates 2026-05-01 13:25:37 +08:00
hhh2210 0821cb7111 fix(sync): address host target inference review 2026-04-29 18:47:05 +08:00
hhh2210 851f06dc0a fix(sync): infer targets from host skill paths 2026-04-29 18:47:05 +08:00
Willie 0c2981d24d feat(search): add repo-scoped results and inline frontmatter parsing
- Add repositoryMatchScore so popular repos matching the query (e.g. 'superpowers')
  rank above lower-signal exact-name copies; rebalance weights to fit.
- Fetch additional skill candidates via GitHub repository search + git tree API,
  surfacing SKILL.md files from well-known repos that code search misses.
- Prioritize preferred skill repos when batching star enrichment so their star
  counts are always populated within the fetch cap.
- Parse one-line '--- name: ... description: ... ---' frontmatter so single-line
  SKILL.md files are discoverable and render correct metadata.
- Update CHANGELOG/website changelog for v0.19.5.
2026-04-23 18:11:37 +08:00
Willie 07c091529b refactor(search): harden preview error handling, cache, and a11y
- Add ErrSkillNotFound sentinel error in search/preview.go so callers
  can distinguish 404 from other errors with errors.Is instead of
  brittle string matching
- Cap previewCache at 200 entries with TTL purge + full reset on
  overflow to prevent unbounded memory growth
- Make Card and SearchResultsTable rows keyboard-accessible
  (role=button, tabIndex=0, Enter/Space handlers)
- Refactor SkillPreviewModal to accept a single SearchResult prop
  instead of 6 individual fields — reduces prop drilling and keeps
  the modal in sync with the result shape
- Fix search_online_test: add --list flag so output is not gated
  behind interactive TUI
2026-04-23 16:46:53 +08:00
Willie 4c5c56bb05 feat(search): improve result quality with rebalanced scoring and quality filters
Search results were dominated by low-quality repos because the scoring
formula gave name match 45% weight while stars (the strongest quality
proxy) only had 5%. Zero-star personal experiments ranked above
well-known skill repos.

Changes:
- Rebalance scoring weights: name 30%, desc 20%, stars 25%, source 25%
- Improve normalizeStars curve (log10/3.0) for better differentiation
  in the 5-50 star range where most useful skills live
- Lower sourceQualityScore base from 0.35 to 0.15 for unknown repos
- Add filterLowQuality(): remove 0-star non-preferred repos, short
  descriptions (<10 chars), and known spam orgs (inference-sh)
- Refactor search pipeline: extract buildGitHubCodeSearchQuery(),
  processSearchItems(), convertToSearchResult() for testability
- Add preferred repo boosting (anthropics/skills, vercel-labs/skills)
- Add SKILL.md frontmatter validation to filter non-skill results
- Add equivalent skill deduplication (same name+description → keep
  best source)
- Add repo-scoped query support (owner/repo[/subdir] patterns)

Closes #130 in .feature-radar/opportunities/
2026-04-23 16:26:14 +08:00
Willie a3235473eb feat: add skill preview modal to Search page (#141)
Add a preview modal so users can read a skill's SKILL.md content
before installing. Clicking a search result card or table row opens
the modal; the Install button is now inside the modal.

Backend:
- New GET /api/preview?source=owner/repo/path endpoint
- FetchSkillContent fetches SKILL.md from GitHub Contents API
- Git Tree API fallback for hub sources where the install shorthand
  doesn't match the repo's actual file path
- In-memory TTL cache (5 min) via sync.Map
- Proper 404/429/500 error handling with rate-limit support

Frontend:
- SkillPreviewModal component (DialogShell-based, lazy-fetch)
- Cards and table rows clickable to open preview
- Graceful fallback: if fetch fails but hub metadata exists, show
  description + tags instead of error
- Hide Stars column in table view for hub mode
- Fix Card component missing onClick prop passthrough
- Fix IntersectionObserver not reconnecting after loading more items
- Prevent background scroll when any modal is open (DialogShell)
- i18n keys added to all 11 locales

Closes #141
2026-04-23 14:20:42 +08:00
Willie d9ee14aa42 feat(search): add FetchSkillContent for remote skill preview
Fetches full SKILL.md from GitHub Contents API, parses frontmatter
metadata (name, description, license, tags), and returns star count.
Reuses existing ghclient auth and rate-limit patterns.

Ref: #141
2026-04-23 09:57:22 +08:00
Willie 63a4a57a0c feat(ui): allow editing source URL on skill detail page
Add PATCH /api/resources/{name}/source endpoint to update the source URL
for installed skills. For tracked repos, all sibling skills sharing the
same git remote are updated together with the new repo base URL, and the
git remote origin is also updated.

Frontend changes:
- Add Source URL input field in the skill editor (visible for all skills
  with metadata)
- Use shared Input/Textarea components in FrontmatterEditor for visual
  consistency, with new size='sm' variant
- Replace custom kind-badge/tracked-badge with shared KindBadge/SourceBadge
  components in the editor header
- Preserve original YAML frontmatter formatting when only the body or
  source URL is changed (avoids spurious quote style / line wrap diffs)
- Skip diff review dialog when only source URL is modified

Backend fixes:
- Two-pass skill lookup in handleGetSkill: prefer exact FlatName match
  over baseName fallback to prevent name collisions between standalone
  and tracked repo skills
- Add basename-only fallback in MetadataStore.GetByPath for tracked repo
  skills stored with short keys
- Use cfg.Source (global) consistently in save/patch handlers to match
  the source used by list/detail handlers in project mode

Closes #142
2026-04-22 23:06:53 +08:00
Timmy Lin d0cc43a646 refactor(install): gate CleanupDiscovery on git sources only
- Address review: only RemoveAll discovery temp dirs when Source is non-nil and IsGit(), avoiding deletion for local paths, nil Source, or unknown types.
- Add TestCleanupDiscovery_SkipsWhenSourceNil.
2026-04-22 17:24:12 +08:00
Timmy Lin ccb07c1ee6 fix(install): do not remove local source dirs in CleanupDiscovery
- Local discovery sets RepoPath to the user's directory.
- the UI discover handler defers CleanupDiscovery and was deleting that tree after the response.
- Skip RemoveAll for SourceTypeLocalPath so UI local installs match CLI behavior.
- Adds TestCleanupDiscovery_PreservesLocalSource regression coverage.
2026-04-22 17:24:12 +08:00
Willie 8f4890680a fix(server): restrict editor whitelist and harden withinDir path check
- pickEditor now rejects unknown editor aliases instead of executing
  arbitrary binaries from PATH (security)
- withinDir uses filepath.Rel instead of strings.HasPrefix for
  correctness on case-insensitive filesystems
2026-04-19 09:29:18 +08:00
Willie c663fe542c chore: release v0.19.3 2026-04-19 09:29:18 +08:00