Revert the vite.config.ts changes from e93adaa that changed the dev
server port from 3000 to 8181 and added local dev features (env loading,
serve-skill-md plugin, proxy headers). These were local development
configs that broke CI by changing the port away from 3000 which the
Makefile health check expects.
- Replace all `npx clawhub` references with `npx motovis-skillhub` / `skillhub`
- Update namespace separator from `--` to `/` in install commands
- Change env var CLAWHUB_REGISTRY to SKILLHUB_REGISTRY
- Add vite dev server plugin to serve /registry/skill.md
- Update i18n strings (zh/en): ClawHub CLI → SkillHub CLI
- Update skill.md/skill.md.template with new CLI commands
- Update quick-start.tsx syntax highlighting and env config
- Update e2e test assertions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(web): add Playwright e2e testing framework
Add Playwright for end-to-end testing with initial test suites for search flow and network error handling. Also enhance unit tests for network error scenarios.
- Add @playwright/test dependency and npm scripts
- Configure Playwright with chromium browser and HTML reporter
- Add e2e tests for search flow and network error handling
- Update .gitignore to exclude Playwright generated files
- Add network error test cases to api-error unit tests
* feat(web): add skill share button to detail page
Add share button to skill detail page that copies skill info to clipboard. Share text includes skill name, short description (max 30 chars), and detail page URL.
Closes#168
* test(web): add e2e tests for skill share button
Add Playwright e2e tests to verify share button functionality including clipboard copy, text formatting, and state transitions.
* fix(web): fix share button e2e tests and document Playwright workflow
Fix 3 issues in share-button e2e tests:
- Use authenticated mock (skill detail page requires login)
- Add publishedVersion to skill factory (ShareButton render condition)
- Mock versions/files sub-resource APIs to prevent server errors
- Adjust description assertion for 30-char truncation logic
Add Playwright E2E section to CLAUDE.md documenting commands,
screenshot behavior, and test-results directory conventions.
E2E test results: 10/10 passed (Chromium, Playwright 1.58.2)
- network-error.spec.ts: 3/3 passed
- search-flow.spec.ts: 3/3 passed
- share-button.spec.ts: 4/4 passed
* refactor(web): improve share button layout and text format
- Remove description truncation, display full text
- Change share text format from 2 lines to 3 lines (name, description, URL)
- Replace Button component with custom styled native button
- Move ShareButton from card to below download button
- Update tests to match new 3-line format
* fix(web): handle clipboard copy failure in fallback path
- Check document.execCommand('copy') return value
- Throw error when copy fails in fallback path
- Ensure error is properly caught and displayed to user
Fixes issue where "复制 Token 失败,请重试" was shown but the
underlying failure was not properly detected in the fallback code path.
* refactor(web): modernize clipboard with useCopyToClipboard hook
- Add useCopyToClipboard React hook for cleaner state management
- Migrate all copy buttons to use the new hook
- Remove repetitive useState + setTimeout patterns across 7 files
- Simplify clipboard.ts by removing excessive diagnostic logging
- Keep copyToClipboard utility for special cases (file-preview-dialog)
Benefits:
- More idiomatic React code with custom hook
- Consistent 2-second auto-reset behavior
- Reduced code duplication
- Better separation of concerns
* test(web): fix api-error tests and exclude e2e from vitest
- Set i18n language to 'zh' in api-error.test.ts beforeEach
- Add vitest config to exclude e2e directory from unit tests
- All 506 tests now pass
---------
Co-authored-by: xiose <huyanlin@nuaa.edu.cn>