feat(web): add SkillHub CLI install tab to skill detail page#457
Open
CheneyH wants to merge 9 commits into
Open
feat(web): add SkillHub CLI install tab to skill detail page#457CheneyH wants to merge 9 commits into
CheneyH wants to merge 9 commits into
Conversation
- 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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 install <namespace>/<slug> --registry <url>npx clawhub install <target> --registry <url>Validation
Closes #425