Commit Graph

27 Commits

Author SHA1 Message Date
yyh
9e10b73b54 refactor(skill): replace @remixicon/react imports with CSS icon classes
Migrate all Remixicon component imports in workflow/skill to Tailwind CSS
icon utility classes (i-ri-*), reducing JS bundle size. Update MenuItem
to accept string icon classes alongside React components. Adjust test
selectors that relied on SVG element queries.
2026-02-09 19:51:05 +08:00
yyh
db0c527ce8 Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-02-09 18:43:04 +08:00
yyh
363802aa66 chore(web): comprehensive unit tests 2026-02-09 16:47:23 +08:00
yyh
11d5efc13e refactor(skill): regroup skill body, file tree, and tree hooks 2026-02-07 14:20:01 +08:00
yyh
92c3656fe5 fix: vertically center empty search state to match Figma design 2026-02-06 14:21:33 +08:00
yyh
30981dfa7c feat: add empty state for skill template search with no results 2026-02-06 14:21:32 +08:00
yyh
3c214f762a chore: update skills 2026-02-05 16:05:36 +08:00
yyh
9d5db4993d fix: disable SSR for ImportSkillModal dynamic import 2026-01-30 22:02:45 +08:00
yyh
ea88bcfbd2 feat: add ZIP skill import with client-side extraction
Add import skill modal that accepts .zip files via drag-and-drop or
file picker, extracts them client-side using fflate, validates structure
and security constraints, then batch uploads via presigned URLs.

- Add fflate dependency for browser-side ZIP decompression
- Create zip-extract.ts with fflate filter API for validation
- Create zip-to-upload-tree.ts for BatchUploadNodeInput tree building
- Create import-skill-modal.tsx with drag-and-drop support
- Lazy-load ImportSkillModal via next/dynamic for bundle optimization
- Add en-US and zh-Hans i18n keys for import modal
2026-01-30 21:54:00 +08:00
yyh
25ee3f7bc4 fix(skill): restore flex spacer to keep search input right-aligned
Add placeholder div for future CategoryTabs from marketplace API.
2026-01-30 17:18:18 +08:00
yyh
0f6f46b1f0 fix: use kebab-case in skills 2026-01-30 16:18:33 +08:00
yyh
03c8387830 fix(skill): make template header and search sticky on scroll 2026-01-30 16:12:47 +08:00
yyh
142b72f435 refactor(skill): remove tags/icons/categories, use kebab-case folder names
Drop CategoryTabs component, SkillTemplateTag type, icon/tags fields,
and UI_CONFIG from the fetch script. Upload folders now use the
kebab-case skill id (e.g. "skill-creator") instead of the display name.
Card shows the human-readable name from SKILL.md frontmatter while the
created folder uses the id for consistent naming.
2026-01-30 16:10:19 +08:00
yyh
4338632a78 fix(skill): use Dialog initialFocus to focus input on modal open
Expose initialFocus prop on Modal component (passthrough to Headless
UI Dialog) so the create blank skill modal reliably focuses the name
input when opened, replacing the ineffective autoFocus attribute.
2026-01-30 16:10:19 +08:00
yyh
5c0023b788 feat(skill): add create blank skill modal with name validation
Wire up the "Create Blank Skill" action card to open a modal where
users enter a skill name. The modal validates against existing skill
names in real-time and creates a folder with a SKILL.md file via
batchUpload, then opens the file as a pinned tab.
2026-01-30 16:10:19 +08:00
yyh
e9608532bd feat(skill): guard template cards against duplicate skill addition
Add useExistingSkillNames hook that derives root folder names from the
cached asset tree via TanStack Query select, then use it to show an
"Added" state on hover for already-present skills and block re-upload.
2026-01-30 16:10:19 +08:00
yyh
60b4b10622 fix(skill): disable template buttons during upload to prevent duplicates
Pass disabled/loading props to TemplateCard declaratively from
loadingId state. All cards are disabled while any upload is in
progress, and the active card shows a loading spinner. Remove the
imperative pointer-events overlay in favor of native button disabled.
2026-01-30 16:10:19 +08:00
yyh
abe2b37e3a fix(skill): use SearchInput with debounce and align card to Figma
Replace custom search input with SearchInput component (built-in clear
button) and add 300ms debounce. Fix template card: use Tailwind token
for icon background, fix Badge to use children with badge-s class and
uppercase, match empty-tag fallback height to badge size.
2026-01-30 16:10:18 +08:00
yyh
c33d27938d fix(skill): align category tabs with actual skill tags
Remove unused categories (Search, Security, Analysis) and add
real ones (Document, Design, Creative). Consolidate xlsx tags to
Document/Productivity and webapp-testing to Development only,
eliminating orphan tags with single-skill coverage.
2026-01-30 16:10:18 +08:00
yyh
32329cf27b perf(skill): stabilize useCallback refs and memoize filtered list
Use useRef for batchUpload and emitTreeUpdate to remove unstable
dependencies from useCallback, preventing unnecessary memo invalidation
on all 16 TemplateCard components. Wrap filtered list in useMemo and
replace && conditional with ternary for rendering safety.
2026-01-30 16:10:18 +08:00
yyh
038b03fa8e feat(skill): add script-driven full skill template generation
Add fetch-skill-templates.ts script that clones anthropics/skills repo
and generates complete directory trees (scripts, references, assets)
for all 16 skills with base64 encoding for binary files, replacing
the previous single-SKILL.md-only approach. Generated files are
lazy-loaded per skill on user click.
2026-01-30 16:10:18 +08:00
yyh
66b4fa102b feat(skill): add skill template types, card component and upload utility
Introduce type definitions separating raw skill data (SkillTemplate)
from UI metadata (SkillTemplateWithMetadata) to match the actual
skill format from upstream repos. Add template card component with
hover state and file count display, template-to-upload conversion
utility, and i18n keys for en-US/zh-Hans.
2026-01-30 16:10:17 +08:00
yyh
561f383cbc Revert "refactor(skill): replace React icon components with CSS Icons"
This reverts commit 919d7ef5cd.
2026-01-30 12:42:20 +08:00
yyh
919d7ef5cd refactor(skill): replace React icon components with CSS Icons
Migrate all icon usage in the skill directory from @remixicon/react
and custom SVG components to Tailwind CSS icon classes (i-ri-*, i-custom-*).
Update MenuItem API to accept string class names instead of React.ElementType.
2026-01-29 21:57:17 +08:00
yyh
8326b9e3e5 refactor(skill): remove React.FC type annotations from all components
Replace FC<Props> pattern with direct props typing in function parameters
for better TypeScript inference and modern React best practices.
2026-01-28 23:34:08 +08:00
yyh
a91d709aa5 feat(skill-editor): add CategoryTabs and TemplateSearch to skill templates section
Add filter controls for skill templates:
- CategoryTabs: tab navigation with mock categories (All, Productivity, etc.)
- TemplateSearch: search input with accessibility attributes
- Grid layout fix to prevent tab width changes on font-weight switch

Update SectionHeader to accept className prop for flexible styling.
Add search placeholder i18n translations.
2026-01-23 14:39:53 +08:00
yyh
4d465d6cf9 feat(skill-editor): implement StartTabContent with modular component structure
Refactor StartTabContent into separate components following Figma design specs:
- ActionCard: reusable card with icon, title, description
- SectionHeader: title/xl-semi-bold header with description
- CreateImportSection: 3-column grid layout for Create/Import cards
- SkillTemplatesSection: templates area with placeholder

Align styles with Figma: 3-col grid, 16px title, proper spacing and padding.
Add i18n translations for all user-facing text (en-US, zh-Hans).
2026-01-23 14:39:53 +08:00