Commit graph

462 commits

Author SHA1 Message Date
Johannes Millan
cdd29f7789 fix(ci): grant tool permissions for code-review plugin
The code-review plugin couldn't post reviews because Claude Code's
internal permission system blocked all Bash commands. Add claude_args
with --allowedTools to explicitly permit the gh and git commands the
plugin needs at runtime.
2026-01-30 16:59:40 +01:00
Johannes Millan
1094cb0807 build: fix e2e test runs 2026-01-28 22:41:50 +01:00
Johannes Millan
08cfa556bd fix(ci): remove redundant grep-invert args from e2e command
The npm script chain already includes --grep-invert in the e2e script.
Passing it again from CI caused argument duplication, making playwright
interpret the extra args as a file pattern and find no tests.
2026-01-28 22:15:19 +01:00
Corey Newton
943d564aca
docs(ci): prevent sync job from running on PR (#6240)
The workflow fails during the "sync" job on a pull request because of
repo-specific settings that are not set. These can be a security problem
to enable and are not needed for this workflow. Since accepting a PR
will cause a merge (and therefore a push by the author) this push will
then trigger the sync job with the correct authorization and will
therefore succeed as observed during my initial testing.

The only actions needed for the PR itself is linting.
2026-01-28 16:39:54 +01:00
Johannes Millan
2e8450812f build: sign path setup 7 2026-01-28 13:20:24 +01:00
Johannes Millan
0a0f8162c5 build: sign path setup 6 2026-01-28 13:13:10 +01:00
Johannes Millan
640fab22e4 build: sign path setup 5 2026-01-28 13:06:51 +01:00
Johannes Millan
9adf3a63d0 build: sign path setup 4 2026-01-28 12:51:50 +01:00
Johannes Millan
515dd9becc build: sign path setup 3 2026-01-28 12:21:41 +01:00
Johannes Millan
8eaf17f971 build: sign path setup 2 2026-01-28 11:59:44 +01:00
Johannes Millan
d0371971b3 build: sign path setup 2026-01-28 11:55:35 +01:00
Johannes Millan
c0387f12d2 perf(ci): optimize E2E workflow with shared build and Playwright caching
- Create composite action for shared E2E setup (Node, npm, Playwright)
- Add build job that builds frontend once and uploads artifact
- Test jobs now download artifact instead of rebuilding
- Cache Playwright browsers to avoid fresh install each run
- Reduces frontend builds from 3x to 1x per workflow run
2026-01-26 16:00:19 +01:00
Johannes Millan
e9b1b9c34c perf(e2e): split scheduled CI into parallel jobs and reduce wait times
Split e2e-scheduled.yml into 3 parallel jobs (regular, webdav, supersync)
for ~3x faster nightly runs. Each job only starts the Docker services it
needs. Also reduced fixed wait times in sync-helpers.ts and waits.ts to
improve test execution speed while maintaining reliability.
2026-01-26 15:40:22 +01:00
Johannes Millan
0383476927 fix(ci): disable no-inline-html rule in wiki markdown linter
Store badges in the wiki use intentional inline HTML for proper
sizing and linking. This fixes the failing Wiki Update workflow.
2026-01-26 13:48:10 +01:00
dependabot[bot]
ce6af3a2db
chore(deps)(deps): bump the github-actions-minor group with 5 updates (#6188)
Bumps the github-actions-minor group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [step-security/harden-runner](https://github.com/step-security/harden-runner) | `2.14.0` | `2.14.1` |
| [actions/setup-java](https://github.com/actions/setup-java) | `5.1.0` | `5.2.0` |
| [anthropics/claude-code-action](https://github.com/anthropics/claude-code-action) | `1.0.30` | `1.0.34` |
| [github/codeql-action](https://github.com/github/codeql-action) | `4.31.10` | `4.31.11` |
| [cloudflare/wrangler-action](https://github.com/cloudflare/wrangler-action) | `3.12.0` | `3.14.1` |


Updates `step-security/harden-runner` from 2.14.0 to 2.14.1
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](20cf305ff2...e3f713f2d8)

Updates `actions/setup-java` from 5.1.0 to 5.2.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](f2beeb24e1...be666c2fcd)

Updates `anthropics/claude-code-action` from 1.0.30 to 1.0.34
- [Release notes](https://github.com/anthropics/claude-code-action/releases)
- [Commits](a017b830c0...f64219702d)

Updates `github/codeql-action` from 4.31.10 to 4.31.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](cdefb33c0f...19b2f06db2)

Updates `cloudflare/wrangler-action` from 3.12.0 to 3.14.1
- [Release notes](https://github.com/cloudflare/wrangler-action/releases)
- [Changelog](https://github.com/cloudflare/wrangler-action/blob/main/CHANGELOG.md)
- [Commits](e998fe3d9a...da0e0dfe58)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-minor
- dependency-name: actions/setup-java
  dependency-version: 5.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-minor
- dependency-name: anthropics/claude-code-action
  dependency-version: 1.0.34
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-minor
- dependency-name: github/codeql-action
  dependency-version: 4.31.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions-minor
- dependency-name: cloudflare/wrangler-action
  dependency-version: 3.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 11:05:14 +01:00
dependabot[bot]
165cf9f60a
chore(deps)(deps): bump actions/setup-node from 4.0.3 to 6.2.0 (#6189)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.3 to 6.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4.0.3...6044e13b5dc448c55e2357c09f80417699197238)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 11:05:06 +01:00
dependabot[bot]
3d928e6ed9
chore(deps)(deps): bump actions/checkout from 4.1.7 to 6.0.2 (#6190)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v4.1.7...v6.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-26 11:04:50 +01:00
Johannes Millan
1b32a81f76
fix(ci): only run dependency vulnerability review on pull requests (#6153)
The dependency-review-action requires base_ref and head_ref which are
only available in pull_request/pull_request_target/merge_group events.
When triggered by release events, this action fails.

Also update test job to run when vulnerability job is skipped (not just
when it succeeds) using !cancelled() && !failure() condition.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-25 10:07:31 +01:00
Corey Newton
d252984d0f
docs(ci): expand permissions for CI (#6150)
This should minimize false warnings and allow for merges without
concern. Slight renaming of jobs should also help with review. Exclusion
of new GH Action for docs/wiki/** added too.
2026-01-24 21:13:58 +01:00
Johannes Millan
5635c6a047 fix(ci): exclude @webdav and @supersync tests from CI workflow
Aligns PR checks with release build configuration by excluding
tests that require external services (WebDAV server on port 2345
and SuperSync server on port 1901). These tests still run in the
nightly e2e-scheduled.yml workflow with Docker services.

This prevents connection refused errors in CI and reduces test
runtime by ~45 tests while maintaining full coverage via scheduled
runs.
2026-01-24 12:56:10 +01:00
Johannes Millan
76defad732
feat(sync): add confirmation dialog when disabling SuperSync encryption (#6129)
* feat(sync): add confirmation dialog when disabling SuperSync encryption

When users toggle off encryption for SuperSync, show a confirmation dialog
that explains the consequences:
- All encrypted sync data on the server will be deleted
- Current data will be re-uploaded without encryption
- Other devices will sync the unencrypted data

This ensures users understand that turning off encryption requires a fresh
snapshot to prevent mixing encrypted and unencrypted operations.

Changes:
- Add EncryptionDisableService to handle the disable encryption flow
- Add DialogDisableEncryptionComponent for user confirmation
- Add hook to encryption toggle in sync form to intercept disable action
- Add openDisableEncryptionDialog to dialog opener service
- Add translation keys for the new dialog

* fix(sync): initialize dialog opener and fix memory leak in encryption toggle

- Add EncryptionPasswordDialogOpenerInitService to initialize the module-level
  dialog opener instance during app bootstrap
- Register the init service in main.ts using APP_INITIALIZER
- Fix memory leak by properly cleaning up subscription in onDestroy hook
- Add guard to prevent multiple dialogs opening simultaneously
- Fix race condition with async dialog handling

* feat(sync): handle encryption state change during backup import

When importing a backup file that has different encryption settings than
the current SuperSync configuration, the system now properly handles the
transition:

1. Detects encryption state change (enabled -> disabled or vice versa)
2. Deletes all server data (encrypted ops can't mix with unencrypted)
3. Uploads a fresh snapshot with the correct encryption settings
4. Updates the sync provider config to match the imported settings

This ensures a "tabula rasa" for the sync state when encryption changes,
preventing corrupt state where encrypted and unencrypted operations coexist.

Changes:
- Add ImportEncryptionHandlerService to detect and handle encryption changes
- Integrate the handler into FileImexComponent import flow
- Add E2E test for import with encryption state change scenario

* feat(sync): add confirmation dialog for import with encryption state change

Show a warning dialog to users when importing a backup that has different
encryption settings than their current SuperSync configuration. The dialog
explains the consequences:
- All server data will be deleted
- Sync history will be lost
- All devices will need to resync

This ensures users are informed before any encryption state change action.

* refactor(sync): improve UX of encryption state change dialogs

- Add context-specific messaging (enabling vs disabling encryption)
- Use visual state comparison with arrow indicator for import dialog
- Improve button label: "Import and Change Encryption" (clearer action)
- Add disableClose: true to prevent accidental dialog dismissal
- Improve terminology: "Your current configuration" → "After import"
- Clarify "resync" instructions for other devices
- Add aria-labels for screen reader accessibility
- Remove redundant warning icon from dialog title

* fix(sync): correct translation key path in import encryption warning dialog

Fix path from T.F.SYNC.IMPORT_ENCRYPTION_WARNING to
T.F.SYNC.FORM.IMPORT_ENCRYPTION_WARNING to match t.const.ts structure.

* fix(sync): use DI for OperationEncryptionService and fix tests

- Inject OperationEncryptionService properly instead of using `new`
  which fails because the service uses Angular's inject() internally
- Add mock for ImportEncryptionHandlerService in FileImexComponent tests

* fix(ci): handle existing swap file in Lighthouse job

The Lighthouse job was failing with "fallocate: Text file busy" because
GitHub Actions runners may already have /swapfile in use. This fix:

- Disables existing swap file if present (swapoff)
- Removes the file before creating a new one
- Gracefully handles errors using || true

This resolves workflow failures while ensuring Lighthouse/Chrome still
get the required memory allocation.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-24 12:54:58 +01:00
Claude
b9cefeb14b
fix(ci): correct cloudflare/wrangler-action SHA to match v3.12.0 tag
The previous SHA (122ee5c...) was a pre-release commit. Updated to the
correct SHA (e998fe3...) that corresponds to the v3.12.0 release tag.
2026-01-24 00:04:32 +00:00
Claude
9cefb19629
fix: address code review issues from yesterday's changes
- ci: complete SHA pinning for GitHub Actions in pr-preview-deploy.yml
  - actions/checkout@v4.1.7
  - actions/setup-node@v4.0.3
  - cloudflare/wrangler-action@v3.12.0
- style: add High Contrast Mode fallback for sync state icon
- style: fix comment inaccuracy (18px -> 15px)
- refactor(schedule): complete magic number extraction to constants
  - Add MONTH_VIEW config to SCHEDULE_CONSTANTS
  - Use $schedule-time-column-width SCSS variable
- fix(issue-templates): add error message field to internal error report
- a11y: add aria-label to panels menu button in mobile bottom nav
2026-01-23 23:55:33 +00:00
Johannes Millan
68ad2ab952 fix(supersync): simplify workflow to manual trigger only 2026-01-23 22:01:52 +01:00
Johannes Millan
f6f05bbdfc fix(e2e): add frontend build step to build.yml workflow
The previous fix only updated ci.yml and e2e-scheduled.yml, but
missed the build.yml workflow which also runs E2E tests.

Without the build step, http-server times out trying to serve
non-existent files, causing the 90s timeout error.

This adds the same build and verification steps to build.yml.
2026-01-23 21:48:11 +01:00
Johannes Millan
c9f41d090c build(supersync): add GitHub Actions workflow and update Docker config
- Add automated Docker build/push workflow for SuperSync server
- Update docker-compose.yml to use super-productivity org GHCR image
- Add --no-cache flag support to build-and-push.sh script
- Workflow triggers on SuperSync changes or manual dispatch
- Uses GitHub's built-in token (no personal token needed)
2026-01-23 21:42:44 +01:00
Johannes Millan
e5708236de fix(e2e): eliminate plugin 404 errors in CI
Root cause: ng serve doesn't reliably detect plugin assets copied to
src/assets/bundled-plugins/ during E2E setup, causing 404s in CI.

Solution: Implement dual-mode E2E testing:
- CI: Build Angular app first (includes plugins), serve with http-server
- Local: Continue using ng serve for fast iteration

Changes:
- Add buildFrontend:e2e script (builds plugins THEN Angular)
- Add serveFrontend:e2e:prod script (http-server with SPA proxy)
- CI workflows now build frontend before running E2E tests
- Global setup skips duplicate plugin builds (saves ~30s)
- Playwright config uses environment-specific server commands
- Added build output verification step

Benefits:
- 100% reliable plugin asset availability in CI
- Faster CI startup (90s vs 180s timeout)
- Better debugging (removed --silent flag)
- Local development unchanged
2026-01-23 21:28:41 +01:00
Johannes Millan
9c83be9261 fix(ci): enable preview deployments for fork PRs with manual approval
- Change trigger from pull_request to pull_request_target
- Add environment protection requirement (preview-deployments)
- Explicitly checkout PR head SHA to build fork PR code
- Requires manual approval before deployment to prevent secret exposure

This fixes the issue where fork PRs couldn't deploy previews because
secrets aren't available to pull_request triggers from forks.
2026-01-23 14:31:25 +01:00
Johannes Millan
cb2e2e65a2 feat(supersync): implement Phase 1 encryption-at-rest tooling
Complete Phase 1 (Preparation & Tooling) deliverables:

Core Scripts (5):
- setup-encrypted-volume.sh: Create LUKS2 encrypted volumes with dual-key setup
- unlock-encrypted-volume.sh: Unlock volumes with audit logging
- backup-encrypted.sh: Streaming encrypted backups (no temp files)
- verify-prerequisites.sh: Environment validation (cryptsetup, AES-NI, kernel modules)
- discover-docker-names.sh: Helper to identify actual container/volume names

Configuration:
- docker-compose.encrypted.yaml: Overlay config for encrypted PostgreSQL
- encryption-at-rest.md: Architecture documentation (362 lines)

Technical Details:
- LUKS2 with AES-256-XTS (512-bit key for XTS mode)
- Argon2id key derivation (1GB memory, 4 threads)
- Dual-key setup: operational (daily use) + recovery (emergency)
- LUKS header backup with encryption
- OpenSSL AES-256-CBC for backup encryption (PBKDF2, 1M iterations)
- Audit logging for GDPR compliance

Also includes: Build workflow changes to temporarily disable SignPath
code signing while waiting for certificate issuance.

Total: 990 lines of encryption tooling and documentation.
2026-01-23 14:31:24 +01:00
Johannes Millan
f6a7c28f43 feat(build): add SignPath code signing integration for Windows
- Add SignPath signing step to windows-bin job in build workflow
- Configure signing for all Windows executables (NSIS installers and portable .exe)
- Disable auto-release in electron-builder to allow signing before release
- Add manual GitHub Release upload after signing completes
- Add comprehensive documentation for SignPath setup and configuration
- Document required GitHub secrets and workflow configuration
- Include verification steps and troubleshooting guide

The integration is ready but signing steps will be commented out initially
until the SignPath certificate is fully issued (currently CSR PENDING).
2026-01-23 14:31:24 +01:00
Johannes Millan
dcda9ac2b1
Merge pull request #6117 from zenoprax/enabled-markdown-linting
enabled markdown linting
2026-01-23 13:24:31 +01:00
Ivan Kalashnikov
4e0fb4a911 fix(ci): remove dependency on test-on-linux for lighthouse job 2026-01-23 17:23:08 +07:00
Ivan Kalashnikov
6d94f7daa3 fix(ci): add dependency for lighthouse job to ensure proper execution order 2026-01-23 15:56:27 +07:00
Ivan Kalashnikov
60cc73b4c0 chore(workflow): add continue-on-error option to deploy-preview and review jobs 2026-01-23 15:56:15 +07:00
Ivan Kalashnikov
389e20fdc6 chore(review): made common code review stage 2026-01-23 15:47:43 +07:00
Ivan Kalashnikov
b91f16a35f refactor(ci): standardize job names for clarity and consistency 2026-01-23 15:29:32 +07:00
Ivan Kalashnikov
9a22232e59 chore(ci): consolidate CI workflows into a single pipeline and remove obsolete files 2026-01-23 14:04:40 +07:00
Ivan Kalashnikov
f583ae1f98 fix(workflow): restructure lint and test jobs for improved clarity and execution order 2026-01-23 13:35:05 +07:00
Corey Newton
c53ce71c0c
docs(ci): align md linting with wiki instructions 2026-01-22 20:27:20 -08:00
Corey Newton
1dcca44e60
docs(ci): enable markdown linting
Requires linting success to proceed with sync.
2026-01-22 18:46:16 -08:00
Johannes Millan
70aae24449 fix(sync): defer ImmediateUploadService initialization until data loads
Prevents race condition where upload attempts happen before sync config
is loaded from IndexedDB, eliminating 404 errors to default baseUrl
during app startup and E2E tests.
2026-01-22 17:33:17 +01:00
Johannes Millan
a0fdc2efee fix(ci): pin pr-preview-deploy workflow actions to commit SHAs
- Update peter-evans/find-comment to v4.0.0 (pinned SHA)
- Update peter-evans/create-or-update-comment to v5.0.0 (pinned SHA)

Fixes GitHub Actions failure where v4 tag pointed to unavailable commit.
Uses commit SHAs instead of version tags for supply chain security.
2026-01-22 16:57:19 +01:00
Johannes Millan
c07ee10d47 fix(ci): use stable version tags for GitHub Actions 2026-01-22 15:38:55 +01:00
Johannes Millan
a81f5601c4
Merge pull request #6102 from super-productivity/claude/pr-deployment-previews-p5QsV
feat(ci): add Cloudflare Pages PR preview deployments
2026-01-22 15:01:52 +01:00
Corey Newton
ababd99b57
docs(ci): Exclude docs/wiki/** from some actions
There is no reason to run certain checks on simple documentation
updates. These Actions showed up during the initial v0.1 PR and added
noise to the PR process.
2026-01-21 20:04:16 -08:00
Claude
519e12beb1
feat(ci): add Cloudflare Pages PR preview deployments
Add automated preview deployments for pull requests using Cloudflare Pages.
Each PR gets a unique preview URL that updates on every push.

Requires configuring these repository secrets:
- CLOUDFLARE_API_TOKEN
- CLOUDFLARE_ACCOUNT_ID
2026-01-21 23:43:52 +00:00
Johannes Millan
cd5151f4f7 fix(ci): exclude WebDAV and SuperSync tests from build workflow
WebDAV and SuperSync E2E tests require dedicated server infrastructure
and should only run in the scheduled E2E workflow or manually. This
prevents build failures when the required servers are not available.

- Added @webdav tag to all WebDAV test files for consistent filtering
- Updated build.yml to exclude @webdav and @supersync tagged tests
2026-01-21 20:42:50 +01:00
Johannes Millan
623971eacd fix(ci): allow external contributors to trigger Claude Code review workflow
Add allowed_non_write_users parameter to bypass actor permission check for PRs from external contributors. This enables automated code reviews for all PRs, including those from forks, while maintaining security through pull_request_target context.
2026-01-21 19:23:27 +01:00
Johannes Millan
01f8c6cd5f fix(ci): allow Dependabot PRs to trigger code review workflow 2026-01-21 15:30:18 +01:00
Johannes Millan
d73ba67489
Merge pull request #6090 from super-productivity/dependabot/github_actions/github-actions-minor-05604d7d6b
chore(deps)(deps): bump easingthemes/ssh-deploy from 5.0.3 to 5.1.1 in the github-actions-minor group
2026-01-21 15:26:13 +01:00