From e804a6a05f2c26503de7467cf7a44de8c7a22156 Mon Sep 17 00:00:00 2001 From: MK Date: Sun, 28 Jun 2026 21:16:28 +0800 Subject: [PATCH] wip --- .../actions/install-dependencies/action.yml | 2 +- .github/copilot-instructions.md | 17 + .github/workflows/docs-deploy.yml | 6 - .github/workflows/scorecard.yml | 2 +- .npmrc | 2 + .zed/settings.json | 246 + AGENTS.md | 17 + CONTRIBUTING.md | 11 +- .../components/__test__/file-tree.test.tsx | 7 +- .../components/__test__/restore-form.test.tsx | 2 +- app/client/components/backup-summary-card.tsx | 4 +- app/client/components/cron-input.tsx | 4 +- .../components/data-table-sort-header.tsx | 4 +- .../__tests__/snapshot-tree-browser.test.tsx | 2 +- app/client/components/file-tree.tsx | 10 +- .../components/organization-switcher.tsx | 18 +- .../components/release-notes-dialog.tsx | 4 +- app/client/components/ui/alert.tsx | 4 +- app/client/components/ui/breadcrumb.tsx | 6 +- app/client/components/ui/chart.tsx | 36 +- app/client/components/ui/hover-card.tsx | 58 +- app/client/components/ui/select.tsx | 5 +- app/client/components/ui/tabs.tsx | 4 +- .../components/webhook-request-preview.tsx | 4 +- .../__tests__/is-secure-context.test.ts | 2 +- .../__tests__/use-server-events.test.tsx | 2 +- app/client/lib/__tests__/datetime.test.ts | 2 +- app/client/lib/volume-path.test.ts | 2 +- .../auth/components/reset-password-dialog.tsx | 7 +- .../auth/routes/__tests__/login.test.tsx | 2 +- app/client/modules/auth/routes/onboarding.tsx | 21 +- .../__tests__/snapshot-file-browser.test.tsx | 2 +- .../backups/components/backup-card.tsx | 5 +- .../create-schedule-form/exclude-section.tsx | 10 +- .../frequency-section.tsx | 10 +- .../create-schedule-form/paths-section.tsx | 10 +- .../create-schedule-form/summary-section.tsx | 4 +- .../components/schedule-mirrors-config.tsx | 72 +- .../schedule-notifications-config.tsx | 23 +- .../backups/components/schedule-summary.tsx | 25 +- .../backups/components/snapshot-timeline.tsx | 9 +- .../routes/__tests__/backup-details.test.tsx | 2 +- .../routes/__tests__/edit-backup.test.tsx | 2 +- .../notification-forms/custom-form.tsx | 4 +- .../notification-forms/pushover-form.tsx | 4 +- .../notification-forms/telegram-form.tsx | 4 +- .../routes/edit-notification.tsx | 6 +- .../routes/notification-details.tsx | 130 +- .../notifications/routes/notifications.tsx | 17 +- .../components/compression-stats-chart.tsx | 13 +- .../repositories/components/doctor-report.tsx | 13 +- .../repository-forms/r2-repository-form.tsx | 8 +- .../repository-forms/rest-repository-form.tsx | 4 +- .../repositories/routes/edit-repository.tsx | 4 +- .../repositories/routes/repositories.tsx | 16 +- .../routes/repository-details.tsx | 36 +- .../repositories/routes/snapshot-details.tsx | 15 +- app/client/modules/repositories/tabs/info.tsx | 19 +- .../components/backup-codes-dialog.tsx | 4 +- .../components/create-user-dialog.tsx | 23 +- .../components/org-members-section.tsx | 12 +- .../components/two-factor-disable-dialog.tsx | 3 +- .../components/two-factor-section.tsx | 10 +- .../settings/components/user-management.tsx | 50 +- .../sso/components/sso-settings-section.tsx | 29 +- .../sso/routes/create-sso-provider.tsx | 28 +- .../modules/volumes/routes/create-volume.tsx | 7 +- .../modules/volumes/routes/edit-volume.tsx | 10 +- .../modules/volumes/routes/volume-details.tsx | 24 +- app/client/modules/volumes/routes/volumes.tsx | 12 +- .../snapshot.json | 130 +- .../snapshot.json | 210 +- .../snapshot.json | 270 +- .../snapshot.json | 290 +- .../snapshot.json | 290 +- .../20251002145138_simple_alice/snapshot.json | 572 ++- .../snapshot.json | 804 ++- .../20251023130831_watery_sersi/snapshot.json | 806 ++- .../snapshot.json | 1188 +++-- .../snapshot.json | 1160 +++-- .../snapshot.json | 1180 +++-- .../snapshot.json | 1569 +++--- .../snapshot.json | 1665 ++++--- .../20251126183559_elite_sprite/snapshot.json | 1769 ++++--- .../20251126184005_wild_echo/snapshot.json | 1769 ++++--- .../20251126184105_jazzy_sersi/snapshot.json | 1769 ++++--- .../snapshot.json | 1769 ++++--- .../snapshot.json | 1769 ++++--- .../snapshot.json | 2041 ++++---- .../20251204091837_secret_nomad/snapshot.json | 2089 ++++---- .../snapshot.json | 2109 ++++---- .../20251209191801_steady_viper/snapshot.json | 2129 ++++---- .../20251215102912_woozy_shen/snapshot.json | 2149 ++++---- .../20251221123610_special_thor/snapshot.json | 2169 ++++----- .../snapshot.json | 2169 ++++----- .../snapshot.json | 2141 ++++---- .../snapshot.json | 2141 ++++---- .../snapshot.json | 2189 ++++----- .../snapshot.json | 2189 ++++----- .../snapshot.json | 2935 ++++++----- .../snapshot.json | 2935 ++++++----- .../snapshot.json | 3169 ++++++------ .../snapshot.json | 3169 ++++++------ .../snapshot.json | 3289 ++++++------- .../snapshot.json | 4133 ++++++++-------- .../snapshot.json | 4133 ++++++++-------- .../snapshot.json | 4133 ++++++++-------- .../snapshot.json | 4133 ++++++++-------- .../snapshot.json | 4289 ++++++++-------- .../snapshot.json | 4289 ++++++++-------- .../snapshot.json | 4289 ++++++++-------- .../snapshot.json | 4269 ++++++++-------- .../snapshot.json | 4305 ++++++++-------- .../snapshot.json | 4325 ++++++++--------- .../snapshot.json | 4187 ++++++++-------- app/lib/__tests__/permission-policy.test.ts | 2 +- app/middleware/api-client.ts | 5 +- .../(dashboard)/backups/$backupId/index.tsx | 21 +- .../$repositoryId/$snapshotId/index.tsx | 4 +- .../$repositoryId/$snapshotId/restore.tsx | 14 +- app/server/__tests__/isolation.test.ts | 2 +- app/server/cli/commands/change-email.test.ts | 2 +- app/server/cli/commands/change-email.ts | 4 +- app/server/core/__tests__/config.test.ts | 2 +- .../core/__tests__/repository-mutex.test.ts | 2 +- app/server/core/__tests__/scheduler.test.ts | 2 +- .../jobs/__tests__/cleanup-dangling.test.ts | 2 +- app/server/jobs/cleanup-dangling.ts | 4 +- .../lib/__tests__/accept-language.test.ts | 2 +- app/server/lib/__tests__/username.test.ts | 2 +- .../__tests__/create-default-org.test.ts | 2 +- .../__tests__/convert-legacy-user.test.ts | 2 +- .../__tests__/password-login-policy.test.ts | 2 +- .../lib/auth/middlewares/only-one-user.ts | 4 +- .../__tests__/agents-manager.backups.test.ts | 2 +- .../__tests__/agents-manager.events.test.ts | 2 +- .../agents/__tests__/agents-manager.test.ts | 2 +- .../agents/__tests__/agents.service.test.ts | 2 +- .../__tests__/controller-runtime.test.ts | 2 +- .../modules/agents/__tests__/session.test.ts | 2 +- .../auth.account-and-membership.test.ts | 2 +- .../auth/__tests__/auth.api-keys.test.ts | 2 +- .../auth.cleanup-user-organizations.test.ts | 6 +- .../auth.controller.security.test.ts | 2 +- .../auth/__tests__/auth.helpers.test.ts | 2 +- .../modules/auth/__tests__/helpers.test.ts | 2 +- .../__tests__/backups.controller.test.ts | 2 +- .../__tests__/backups.mirror-sync.test.ts | 2 +- .../__tests__/backups.patterns.test.ts | 2 +- .../backups/__tests__/backups.queries.test.ts | 2 +- .../backups.service.execution.test.ts | 2 +- .../backups/__tests__/backups.service.test.ts | 2 +- app/server/modules/backups/backups.dto.ts | 3 +- app/server/modules/backups/backups.queries.ts | 4 +- .../__tests__/desktop.controller.test.ts | 2 +- .../__tests__/events.controller.test.ts | 2 +- .../lifecycle/__tests__/shutdown.test.ts | 2 +- .../lifecycle/__tests__/startup.test.ts | 2 +- ...0006-map-smb-files-to-container-uid-gid.ts | 6 +- .../__tests__/notification-builders.test.ts | 2 +- .../notification-config-secrets.test.ts | 2 +- .../notification-target-policy.test.ts | 2 +- .../notifications.controller.test.ts | 2 +- .../__tests__/notifications.service.test.ts | 6 +- .../notifications/notifications.service.ts | 14 +- .../modules/provisioning/provisioning.test.ts | 2 +- .../__tests__/repositories.controller.test.ts | 2 +- .../__tests__/repositories.service.test.ts | 2 +- .../modules/sso/__tests__/sso.errors.test.ts | 2 +- .../sso/__tests__/sso.integration.test.ts | 2 +- .../sso/__tests__/sso.registration.test.ts | 2 +- .../sso/__tests__/sso.security.test.ts | 2 +- .../modules/sso/__tests__/sso.service.test.ts | 6 +- .../__tests__/require-invitation.test.ts | 2 +- .../trust-provider-for-linking.test.ts | 2 +- .../__tests__/validate-callback-urls.test.ts | 2 +- .../__tests__/validate-provider-id.test.ts | 2 +- .../__tests__/system.controller.test.ts | 2 +- .../tasks/__tests__/progress-buffer.test.ts | 2 +- .../tasks/__tests__/tasks.store.test.ts | 2 +- .../__tests__/volumes.controller.test.ts | 2 +- .../volumes/__tests__/volumes.service.test.ts | 2 +- app/server/utils/__tests__/crypto.test.ts | 2 +- app/server/utils/__tests__/rclone.test.ts | 2 +- app/server/utils/common-ancestor.test.ts | 2 +- app/test/helpers/agent-mock.ts | 2 +- app/test/helpers/backup-mirror.ts | 2 +- app/test/helpers/db.ts | 2 +- .../integration/src/helpers/assertions.ts | 2 +- app/test/integration/src/repositories.test.ts | 2 +- .../integration/src/volume-backends.test.ts | 2 +- app/test/integration/vitest.config.ts | 2 +- app/test/setup-client.ts | 2 +- app/test/setup-shared.ts | 2 +- apps/agent/package.json | 5 +- .../src/__tests__/controller-session.test.ts | 2 +- .../src/commands/__tests__/backup-run.test.ts | 2 +- .../src/commands/__tests__/restore.test.ts | 2 +- .../src/commands/__tests__/volume.test.ts | 2 +- .../helpers/__tests__/backup.helpers.test.ts | 2 +- .../src/restic/__tests__/hostname.test.ts | 2 +- .../src/volume-host/__tests__/cleanup.test.ts | 2 +- .../volume-host/__tests__/operations.test.ts | 2 +- .../src/volume-host/backends/utils.test.ts | 2 +- apps/agent/src/volume-host/backends/webdav.ts | 5 +- apps/agent/vitest.config.ts | 2 +- apps/desktop/package.json | 4 +- apps/desktop/vite.main.config.ts | 2 +- apps/docs/content/docs/cli.mdx | 16 +- apps/docs/content/docs/concepts/backups.mdx | 66 +- .../content/docs/concepts/organizations.mdx | 16 +- .../content/docs/concepts/repositories.mdx | 53 +- apps/docs/content/docs/concepts/volumes.mdx | 27 +- apps/docs/content/docs/configuration.mdx | 103 +- .../docs/guides/3-2-1-backup-strategy.mdx | 36 +- .../content/docs/guides/backup-webhooks.mdx | 106 +- .../docs/guides/mounted-shares-and-acls.mdx | 22 +- .../content/docs/guides/notifications.mdx | 64 +- apps/docs/content/docs/guides/oidc-sso.mdx | 55 +- .../docs/guides/performance-tuning.mdx | 23 +- apps/docs/content/docs/guides/rclone.mdx | 13 +- .../recovery-key-and-repository-passwords.mdx | 23 +- .../docs/guides/repository-maintenance.mdx | 30 +- apps/docs/content/docs/guides/restoring.mdx | 7 +- .../content/docs/guides/reverse-proxy.mdx | 16 +- apps/docs/content/docs/guides/tailscale.mdx | 9 +- apps/docs/content/docs/index.mdx | 45 +- apps/docs/content/docs/installation.mdx | 89 +- apps/docs/content/docs/introduction.mdx | 30 +- apps/docs/content/docs/quickstart.mdx | 145 +- apps/docs/content/docs/troubleshooting.mdx | 15 +- apps/docs/package.json | 6 +- .../public/images/favicon/site.webmanifest | 40 +- apps/docs/src/components/Footer.tsx | 4 +- apps/docs/src/components/LandingPage.tsx | 77 +- apps/docs/src/components/ui/accordion.tsx | 4 +- apps/docs/src/components/ui/button.tsx | 7 +- apps/docs/src/styles.css | 267 +- apps/docs/tsconfig.json | 2 +- bun.lock | 3018 ++++++------ e2e/helpers/browser-errors.ts | 4 +- examples/tailscale-sidecar/README.md | 5 +- package.json | 30 +- packages/contracts/package.json | 3 +- packages/core/package.json | 5 +- .../src/backup-hooks/__tests__/hooks.test.ts | 2 +- packages/core/src/node/__tests__/fs.test.ts | 2 +- .../spawn-background-priority.test.ts | 2 +- .../core/src/node/__tests__/spawn.test.ts | 2 +- packages/core/src/node/logger.ts | 7 +- .../__tests__/server-lock-recovery.test.ts | 2 +- .../restic/commands/__tests__/backup.test.ts | 2 +- .../restic/commands/__tests__/copy.test.ts | 2 +- .../__tests__/delete-snapshots.test.ts | 2 +- .../restic/commands/__tests__/dump.test.ts | 2 +- .../src/restic/commands/__tests__/ls.test.ts | 2 +- .../restic/commands/__tests__/restore.test.ts | 2 +- .../commands/__tests__/snapshots.test.ts | 2 +- .../restic/commands/__tests__/stats.test.ts | 2 +- .../commands/__tests__/tag-snapshots.test.ts | 2 +- .../restic/commands/__tests__/unlock.test.ts | 2 +- .../helpers/__tests__/build-env.test.ts | 2 +- .../helpers/__tests__/build-repo-url.test.ts | 2 +- .../__tests__/validate-custom-params.test.ts | 2 +- .../core/src/utils/__tests__/datetime.test.ts | 2 +- .../core/src/utils/__tests__/path.test.ts | 2 +- .../core/src/utils/__tests__/sanitize.test.ts | 2 +- packages/core/test/setup.ts | 2 +- packages/core/vitest.config.ts | 2 +- public/images/favicon/site.webmanifest | 40 +- scripts/README.md | 16 +- tsconfig.json | 2 +- vitest.config.ts | 2 +- 273 files changed, 54524 insertions(+), 56005 deletions(-) create mode 100644 .npmrc create mode 100644 .zed/settings.json diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 562e41208..fa02dd7c4 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -21,7 +21,7 @@ runs: - uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1 with: - node-version: '24' + node-version: "24" cache: true - name: Install dependencies diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 11d4b9cf3..6e9acce76 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1 +1,18 @@ - This project uses the AGENTS.md file to give detailed information about the repository structure and development commands. Make sure to read this file before starting development. + + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp --help` for information about a specific command. + +Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/. + +## Review Checklist + +- [ ] Run `vp install` after pulling remote changes and before getting started. +- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes. +- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run