Commit graph

10 commits

Author SHA1 Message Date
Johannes Millan
99b7dee74a fix(backup): move shared timestamp util into electron/ for snap packaging
electron/backup.ts imported getBackupTimestamp from src/app/util/, which
tsc compiled alongside the source. electron-builder only packages
electron/** and the Angular renderer bundle, so the compiled util was
missing from app.asar and the main process crashed on launch with
"Cannot find module '../src/app/util/get-backup-timestamp'".

Moved the util to electron/shared-with-frontend/ (existing convention
for code shared between main and renderer), updated all importers.

Fixes #7270
Refs #7315, #7323, #7265, #7320
2026-04-22 16:14:56 +02:00
novikov1337danil
1abb15b804
refactor(backup): unify backup filename format (#7141)
* refactor(backup): implement consistent timestamp for backup filenames

* refactor(i18n): rename PRIVACY_EXPORT key to PRIVACY_EXPORT_DESCRIPTION

* refactor(i18n): add PRIVACY_EXPORT key for data export in multiple languages

* refactor(backup): standardize backup filename prefix

* refactor(backup): update backup filename format to use underscore separator

* refactor(i18n): update translations

* refactor(backup): move getBackupTimestamp utility to a shared location for consistency

* test(backup): add unit tests for getBackupTimestamp utility

* fix(e2e): move MIGRATION_BACKUP_PREFIX to migration.const

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor(tests): move jasmine.clock().install() to beforeEach for consistency

* refactor(backup): consolidate backup filename constants and update imports

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-21 14:09:09 +02:00
Johannes Millan
2f8d871042 feat(shepherd): remove all tours except keyboard navigation
Remove the full welcome tour (Welcome, AddTask, DeleteTask, Projects,
Sync, IssueProviders, ProductivityHelper, FinalCongrats, StartTourAgain)
and keep only the KeyboardNav tour, triggered from the Help menu.

- Delete ShepherdComponent (auto-start on load)
- Strip shepherd-steps.const.ts to KeyboardNav steps only
- Simplify ShepherdService with _initPromise guard and fresh tour on re-open
- Remove 3 tour menu items from Help menu, keep keyboard tour
- Remove waitForEl/waitForElObs$ helpers (unused by KeyboardNav)
- Delete e2e/utils/tour-helpers.ts and all tour dismissal calls
- Clean up stale tour comments across e2e tests
- Fix pre-existing build error: add isFinishDayEnabled to AppFeaturesConfig
  type, defaults, form toggle, component signal, and translations
2026-03-22 17:00:42 +01:00
overcuriousity
dc7742d354
fix: profile system bugs (#6614)
* fixes to the profile system storage which worked unreliable across multiple storage backends

* fix tests

* fix issues with tests

* address copilot reviews
2026-02-23 17:43:04 +01:00
Johannes Millan
b834bbedb1 test(e2e): fix 12 flaky tests by removing networkidle waits and fixing plugin setup
Replace unreliable waitForLoadState('networkidle') with element-based waits
in planner page and tests. Fix plugin helper timeout math bugs and eliminate
duplicate settings navigation in plugin tests. Improve menu overlay cleanup
and increase tight timeouts in migration and work-view tests.
2026-02-09 17:55:12 +01:00
Johannes Millan
851055b4a3 test(e2e): fix flaky tests and improve timeout handling
Fixed 3 failing focus mode break tests and 1 data persistence test by
addressing timeout and wait logic issues under parallel test execution.

Changes:
- Focus mode break tests: Increased timeouts for countdown (10s→15s) and
  session start (10s→20s) to handle load during full test suite execution
- Pre-migration dialog: Unskipped data persistence test and adopted working
  pattern from work-view.spec.ts with proper stale element handling
- WebDAV archive sync: Updated investigation notes with additional timeout
  attempts (still requires deep profiling for main thread blocking issue)

Test results:
- Standard tests: 197 passed (was 193), 0 failed (was 3), 2 skipped
- WebDAV tests: 35 passed, 1 skipped (92% pass rate)
- SuperSync tests: 125 passed, 1 skipped, 1 flaky

All tests now pass with 99% overall pass rate across all suites.
2026-01-22 21:29:25 +01:00
Johannes Millan
eeb19a351f test(e2e): add legacy data migration E2E test
Add comprehensive E2E test that verifies legacy data (pre-operation-log
format) migrates correctly when the app starts. The test:

- Seeds legacy 'pf' IndexedDB database with test data before app loads
- Verifies backup file is downloaded during migration
- Validates all data migrates correctly including:
  - Tasks with subtasks (parent-child relationships)
  - Projects and tags
  - Sync provider settings (WebDAV/SuperSync configs)
  - Archive data (archiveYoung and archiveOld)
  - Time tracking data and notes

Includes comprehensive fixture file with realistic legacy state format.
2026-01-09 12:58:58 +01:00
Johannes Millan
6a26d914b5 test: skip tmp 2025-12-24 16:27:12 +01:00
Johannes Millan
72608a4aaa feat(migration): implement pre-migration dialog and backup functionality 2025-12-24 13:49:37 +01:00
Johannes Millan
1bd96a9182 fix(sync): refresh storage cache after cleanup and add serverTime to response
Address two issues identified in code review:

1. Storage cache not refreshed after cleanup:
   - Modified deleteOldSyncedOpsForAllUsers() to return { totalDeleted, affectedUserIds }
   - Cleanup job now calls updateStorageUsage() for each affected user
   - Prevents stale quota checks after nightly cleanup

2. serverTime missing from download response:
   - Added serverTime: Date.now() to DownloadOpsResponse
   - Enables client-side clock drift detection

Tests:
- Added serverTime response test in sync-fixes.spec.ts
- Added deleteOldSyncedOpsForAllUsers return structure tests
- Updated legacy SQLite tests for new return type (excluded from CI)
2025-12-23 18:31:57 +01:00