Skip to content

feat(web): add SkillHub CLI install tab to skill detail page#457

Open
CheneyH wants to merge 9 commits into
mainfrom
feat/install-command-tabs
Open

feat(web): add SkillHub CLI install tab to skill detail page#457
CheneyH wants to merge 9 commits into
mainfrom
feat/install-command-tabs

Conversation

@CheneyH
Copy link
Copy Markdown
Collaborator

@CheneyH CheneyH commented May 19, 2026

Summary

在技能详情页的安装面板中增加 tab 切换,展示 SkillHub CLI 和 ClawHub 两种安装方式,默认选中 SkillHub CLI。

Changes

  • web/src/features/skill/install-command.tsx:引入 Tabs 组件,新增 buildSkillhubCliCommand 函数,将单命令展示改为双 tab 面板
  • web/src/features/skill/install-command.test.ts:新增 SkillHub CLI 命令格式的测试用例

Install command formats

  • SkillHub CLI(默认):skillhub install <namespace>/<slug> --registry <url>
  • ClawHub(保留):npx clawhub install <target> --registry <url>

Validation

  • Vitest 9/9 passed
  • TypeScript typecheck passed

Closes #425

CheneyH added 5 commits May 15, 2026 13:36
- Move version computation and pre-flight checks before build-and-test
  to fail fast on conflicts (existing branch/tag) instead of wasting
  minutes on lint/test/build
- Add INT/TERM signal handlers to cleanup trap so Ctrl+C during build
  properly restores working tree state
- Update Makefile help text to reflect PR-based workflow
Address code review feedback from gemini-code-assist bot:

- Use `git checkout -f` in on-release and committed cleanup stages
  to ensure reliable branch switching even when files are staged
  but not committed (e.g., interrupted after `git add` but before
  `git commit`)
- Remove redundant `git checkout -- <file>` in on-release stage
  since `-f` already discards all local changes

This prevents cleanup failures when the script is interrupted
between staging and committing.
- Fix ERR trap bypass: remove `if !` wrapper around `gh pr create` so
  set -e triggers the trap and prints pushed-stage recovery instructions
- Fix command injection: all node -e/-p calls now use process.env
  instead of interpolating shell variables into JS string literals
- Rewrite cli/RELEASE.md to document the new PR-based release flow
- Rewrite scripts/tests/publish-cli-test.sh with 10 tests covering
  the new flow (stubs for bun/gh, pre-flight checks, happy path,
  cleanup state machine stages)
- Bind release tag to origin/main: PR body, end-of-run hint, and
  cli/RELEASE.md now use `git tag $TAG origin/main` so the tag is
  always placed on the merged commit, regardless of local branch state
- Reject prerelease tags in version computation: if the latest cli-v*
  tag contains non-X.Y.Z characters (e.g., -rc.1), exit with a clear
  message instead of crashing in node parsing
- Add pr-scripts.yml workflow: runs publish-cli-test.sh on scripts/**
  changes so the release script regression suite gates PRs
- Add Test 11 covering prerelease tag rejection
Add a tabbed install panel showing both SkillHub CLI and ClawHub
commands. Default tab is SkillHub CLI with the format:
  skillhub install <namespace>/<slug> --registry <url>

Closes #425
gemini-code-assist[bot]

This comment was marked as outdated.

CheneyH added 4 commits May 19, 2026 16:28
The install command UI now defaults to the SkillHub CLI tab with the
ClawHub command hidden under a second tab, so the previous assertion
for `npx clawhub install <slug>` no longer found visible text.
Previously, both clawhub and skillhub install commands stripped the
'global' namespace prefix, producing inconsistent output across
namespaces. Standardize on always emitting <namespace>/<slug> (skillhub)
or <namespace>--<slug> (clawhub) so the install command is unambiguous
and matches the E2E test expectations.
Add role=tablist, role=tab, and role=tabpanel so getByRole('tab', ...)
queries (used by E2E tests and assistive tech) can locate the controls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add more skill installation methods to the skill details page

1 participant