Skip to content

Comments

feat: add cloud skill sync, version history, and diff viewer#10

Merged
keyuyuan merged 3 commits intomainfrom
feat/add_sync
Jan 30, 2026
Merged

feat: add cloud skill sync, version history, and diff viewer#10
keyuyuan merged 3 commits intomainfrom
feat/add_sync

Conversation

@keyuyuan
Copy link
Contributor

@keyuyuan keyuyuan commented Jan 30, 2026

Summary

  • My Skills page (/my-skills): Cloud skill management with pull/push/compare/export actions, sync status detection, and version rollback
  • Rust sync module (sync.rs): Local file I/O commands — collect files with SHA-256 hashes, write pulled files, manage .skillhub.json metadata, save Git ZIP exports
  • TypeScript sync API (api/sync.ts): Authenticated HTTP calls for pull/push/status/versions/history/diff/export-git via authenticatedFetch
  • DiffViewer component: Version-to-version file diff with unified format, LCS-based line diff, status badges (added/modified/deleted)
  • VersionHistory component: Timeline of all versions with source badges, compare/view/rollback actions
  • SyncStatusBadge component: In Sync / Local Changes / Remote Changes / Conflict / Not Synced indicators
  • i18n: Full EN + ZH translations for all new UI strings

Files created (6)

File Purpose
src-tauri/src/sync.rs Rust sync commands (5 Tauri commands)
src/api/sync.ts TypeScript sync API layer
src/components/SyncStatusBadge.tsx Sync status badge
src/components/DiffViewer.tsx Version diff viewer
src/components/VersionHistory.tsx Version history panel
src/pages/MySkills.tsx My Skills page

Files modified (5)

File Change
src-tauri/Cargo.toml Added sha2, hex deps
src-tauri/src/lib.rs Registered mod sync + 5 commands
src/types/index.ts Added 12 sync interfaces
src/App.tsx Added route + nav item
src/i18n/{en,zh}.json Added translation keys

Test plan

  • cargo check passes
  • tsc --noEmit passes
  • bun run build succeeds
  • Unauthenticated user: My Skills hidden in sidebar
  • Authenticated user: My Skills shows cloud skill list
  • Pull skill to local tool directory
  • Push local changes back to server
  • View version history timeline
  • Compare two versions with diff viewer
  • Export skill as Git ZIP
  • Rollback to previous version
  • i18n: EN/ZH both render correctly

keyuyuan and others added 3 commits January 29, 2026 23:09
- Add debug logging for API response diagnosis
- Handle both array and object response formats from listUserSkills
- Show toast on load failure instead of silently catching
- Fix "Create on SkillHub" link to use /app/skills (not /dashboard/skills)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@keyuyuan keyuyuan merged commit f8d3288 into main Jan 30, 2026
2 checks passed
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.

1 participant