Open
Conversation
Contributor
📊 Test Coverage Report
Coverage measured by |
Contributor
📦 PR Build Artifacts
|
167a0a0 to
e5d12bf
Compare
- Use gh CLI to get release body (avoids shell escaping issues) - Use jq for proper JSON construction - Skip .sig and latest.json files - Use HTTP/1.1 for large file upload stability
- Detect user timezone to determine if likely in China - CN users fetch release assets from GitLab (lay2dev/clawpal) - Other users fetch from GitHub as before - Falls back to secondary source if primary fails
- Add canonical, Open Graph, Twitter Card meta tags - Add SoftwareApplication JSON-LD schema - Add robots.txt with AI crawler permissions - Add llms.txt for AI search engines - Add sitemap.xml - Improve meta description for better CTR
- Redirect clawpal.zhixian.io to clawpal.xyz (301) - Redirect clawpal.pages.dev to clawpal.xyz (301) - Fixes GSC 'Google 选择的规范网页与用户指定的不同' issue
- 1200x630 hero section screenshot - Fixes broken social preview cards
Based on https://docs.openclaw.ai/concepts/agent-workspace#git-backup-recommended-private Core layer (clawpal-core/src/backup.rs): - WorkspaceGitStatus struct with repo/remote/branch/uncommitted/ahead/behind tracking - Shell command builders: git status probe, git add+commit+push, git init+.gitignore - WORKSPACE_GITIGNORE constant matching docs recommendation - 7 new tests (parse_workspace_git_status, build_* commands) Tauri commands (src-tauri/src/commands/backup.rs): - workspace_git_status / remote_workspace_git_status - workspace_git_backup / remote_workspace_git_backup (add+commit+push) - workspace_git_init / remote_workspace_git_init (init+.gitignore) - Workspace path resolution from config (agents.defaults.workspace) Frontend: - WorkspaceGitBackup component: status card with branch/remote/uncommitted indicators, sync button, and git init flow for uninitialized workspaces - Integrated into BackupsPanel above existing copy-based backups - API bindings + dispatch wrappers with cache invalidation - i18n (en + zh) for all git backup strings
read_openclaw_config signature changed to accept &OpenClawPaths instead of &PathBuf after the harness Phase 3 refactor. Update the backup module call site to match.
The existing remote backup (remote_backup_before_upgrade) only copied config + agents/, missing the workspace entirely. The local backup covered workspace only when it was at the default path inside ~/.openclaw/. Changes: - remote_backup_before_upgrade: resolve workspace path from remote config (agents.defaults.workspace), copy it to backup/workspace/ - remote_restore_from_backup: restore workspace from backup if present, resolving the target path from config - backup_before_upgrade (local): also copy workspace when it lives outside ~/.openclaw/ (custom workspace path), skip .git dir - restore_from_backup (local): restore workspace to custom path if backed up separately
read_openclaw_config signature changed to accept &OpenClawPaths instead of &PathBuf. Update both call sites (lines 266 and 358) to pass &paths directly, matching the existing call at line 423.
e5d12bf to
de632dd
Compare
Contributor
📏 Metrics Gate ReportStatus: ✅ All gates passed Commit Size ❌
Bundle Size ✅
Perf Metrics E2E ✅
Command Perf (local) ✅
Local command timings
Command Perf (remote SSH) ✅
Remote command timings (via Docker SSH)
Home Page Render Probes ✅
Code Readability (informational)
|
The function body after format!() was incorrectly indented inside a non-existent closure, with an extra }) closing delimiter at line 163. Fix indentation and remove the unmatched bracket.
… backup.rs - Remove duplicate list_backups and restore_from_backup definitions that were accidentally nested inside backup_before_upgrade - Add missing closing brace for if let Some(ws_str) block - Add missing }) for timed_sync! macro in restore_from_backup - Fix read_openclaw_config call to pass &paths instead of &paths.config_path
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
Based on OpenClaw docs: Git backup (recommended, private), optimizes ClawPal's backup of managed OpenClaw instances in two ways:
Context
ClawPal manages OpenClaw instances (local or remote via SSH). The backup feature protects instance data before upgrades. The workspace (
~/.openclaw/workspace) contains the agent's memory and personality files (AGENTS.md, SOUL.md, USER.md, memory/, skills/) — the most important data to back up.Before this PR:
openclaw.json+agents/+memory/(wrong path) — workspace not backed up~/.openclaw/recursively — workspace included only if at default pathChanges
1. Fix copy-based backup to include workspace
remote_backup_before_upgrade: reads workspace path from remoteopenclaw.json(agents.defaults.workspace), copies it tobackup/workspace/remote_restore_from_backup: restores workspace from backup, resolving target path from configbackup_before_upgrade(local): also copies workspace when configured outside~/.openclaw/(custom path), skips.gitdirrestore_from_backup(local): restores workspace to custom path if backed up separately2. Git-based workspace backup (new feature)
Core layer (
clawpal-core/src/backup.rs):WorkspaceGitStatusstruct — repo state tracking (branch, remote URL, uncommitted count, ahead/behind, last commit)WORKSPACE_GITIGNOREmatching docs recommendationTauri commands (
src-tauri/src/commands/backup.rs):workspace_git_status/remote_workspace_git_status— probe git state on managed instanceworkspace_git_backup/remote_workspace_git_backup— commit + pushworkspace_git_init/remote_workspace_git_init— init repo + .gitignoreBoth local and remote paths follow the same dispatch pattern as existing backup commands.
Frontend (
WorkspaceGitBackup.tsx):Testing
cargo test -p clawpal-core --lib backup— 18/18 pass (7 new + 11 existing)npx tsc --noEmit— zero TypeScript errors