Commit graph

37 commits

Author SHA1 Message Date
Johannes Millan
702f768784 docs: clarify test commit message convention 2026-01-21 14:34:45 +01:00
Johannes Millan
038a722ed8 style: apply prettier formatting 2026-01-10 17:09:14 +01:00
Johannes Millan
74fe0c01a0 Merge branch 'master' into feat/operation-logs
* master:
  16.9.4
  docs: add Angular commit message guidelines to CLAUDE.md
  fix(ci): update references for repo migration to super-productivity org
  build(ci): improve android build release upload reliability
  16.9.3
  fix(calendar): display proper error messages instead of [object Object]
  fix(e2e): fix keyboard shortcut delete test and reduce sync test flakiness
  fix(tasks): add subscription cleanup to delete confirmation dialog
  fix(schedule): maintain visibility during task overlap on schedule (#5887)
  16.9.2

# Conflicts:
#	e2e/pages/sync.page.ts
2026-01-10 13:06:20 +01:00
Johannes Millan
7179e3d6f8 docs: add Angular commit message guidelines to CLAUDE.md 2026-01-10 12:57:32 +01:00
Johannes Millan
cdf52cc4e5 fix(e2e): split docker-compose files for standalone webdav tests
docker-compose.e2e.yaml was failing when used standalone because the
supersync service only had a port override without a base definition.
Split into separate files so e2e:docker:webdav works without errors.
2026-01-09 17:27:30 +01:00
Johannes Millan
dd79f54c23 fix: address code review findings from pfapi-to-oplog refactor
- Update CLAUDE.md to reference /src/app/op-log/persistence/ instead
  of deleted /src/app/pfapi/ directory
- Fix boolean coercion in archive-migration.service.ts (same pattern
  as bug fixed in 183bf2c18 for LegacyPfDbService)
- Replace deprecated .toPromise() with firstValueFrom() in
  archive.service.ts for RxJS 8 compatibility
2026-01-07 16:21:18 +01:00
Johannes Millan
3f3f0685eb Merge branch 'master' into feat/operation-logs
* master: (21 commits)
  test: increase timeout for encryption
  16.8.3
  fix(e2e): use pressSequentially for time input in task-detail tests
  fix(sync): resolve 25-second initial sync timeout race condition
  feat(e2e): add Docker-based E2E test isolation
  fix(schedule): start tracking selected task when pressing Y in schedule view
  fix(tasks): clear reminder when clicking "today" button on already-today tasks
  fix(e2e): use format-agnostic time change in task-detail tests
  16.8.2
  fix(test): reset selector overrides to prevent test pollution
  build: update CLAUDE.md
  fix(calendar): add periodic refresh for planner and scheduler views
  feat(effects): consolidate task update actions in PluginHooksEffects
  fix(sync): show skip button immediately when offline
  fix(db): add missing _afterReady guard to loadAll method
  feat(android): add alarm sound and vibration to task reminders
  feat(sync): add skip button to loading screen when waiting for sync
  fix(pomodoro): allow manual session end to start break early
  fix(i18n): add missing translate pipe to play button tooltip
  fix(tasks): handle undefined tasks in reminder effect
  ...

# Conflicts:
#	CLAUDE.md
#	docker-compose.e2e.yaml
#	e2e/tests/task-detail/task-detail.spec.ts
#	package.json
#	src/app/features/tasks/store/task-reminder.effects.spec.ts
#	src/app/features/tasks/store/task-reminder.effects.ts
#	src/app/plugins/plugin-hooks.effects.ts
2026-01-04 18:20:10 +01:00
Johannes Millan
d8a6a7dc62 build: update CLAUDE.md 2026-01-04 14:52:35 +01:00
Johannes Millan
016e680c5f fix(sync): fix simple counter sync and quota exceeded handling
- Add null checks in simple-counter.reducer.ts to prevent crashes when
  entity doesn't exist (fixes "Cannot read properties of undefined")
- Add missing entityIds to updateAllSimpleCounters action - was causing
  operation log to skip persistence
- Add try-catch in operation-log-upload.service.ts to show alert when
  storage quota exceeded (413 error)
- Fix supersync-network-failure.spec.ts test timing - route interception
  must happen before task creation
- Add documentation to CLAUDE.md for running supersync tests with
  real-time output using --reporter=line
2025-12-29 17:09:46 +01:00
Johannes Millan
8fff1325b4 docs: fix SYNC_IMPORT filtering section to match implementation
- Fix CLAUDE.md path reference from docs/op-log/ to docs/sync-and-op-log/
- Rewrite section 2c in architecture diagrams to reflect actual implementation:
  - Was: UUIDv7 timestamp replay (removed feature)
  - Now: Vector clock filtering with clean slate semantics
- Update service reference from removed _replayLocalSyncedOpsAfterImport()
  to SyncImportFilterService.filterOpsInvalidatedBySyncImport()
- Clarify that CONCURRENT ops are dropped, not replayed
2025-12-27 13:15:47 +01:00
Johannes Millan
b4ce9d5da6 docs: reorganize sync and operation-log documentation
Move scattered architecture docs into centralized locations:

- Move operation-log docs from src/app/core/persistence/operation-log/docs/
  to docs/op-log/
- Flatten docs/sync/sync/ nested structure to docs/sync/
- Move supersync-encryption-architecture.md from docs/ai/ to docs/sync/
- Copy pfapi sync README to docs/sync/pfapi-sync-overview.md
- Update all cross-references to use new paths

This improves discoverability and keeps architecture documentation
separate from source code.
2025-12-27 10:54:13 +01:00
Johannes Millan
3a390f5e59 docs(claude): update E2E testing instructions for improved efficiency 2025-12-26 18:45:33 +01:00
Johannes Millan
9f6bb4e7ac fix(sync): implement clean slate semantics for SYNC_IMPORT/BACKUP_IMPORT
SYNC_IMPORT and BACKUP_IMPORT now represent a complete fresh start:
- All operations without knowledge of the import are dropped
- CONCURRENT ops from "unknown clients" are no longer preserved
- Local synced ops are NOT replayed after import

This ensures a true "restore to point in time" semantic where all
clients start fresh from the imported state, with no concurrent
work preserved.

Changes:
- Simplify SyncImportFilterService to filter ALL CONCURRENT/LESS_THAN ops
- Remove _replayLocalSyncedOpsAfterImport() method and related code
- Remove _checkOperationEntitiesExist() helper method
- Update tests to expect new behavior
- Document semantics in CLAUDE.md
2025-12-26 11:20:05 +01:00
Johannes Millan
d48694d0ce feat(docs): add command for running SuperSync E2E tests 2025-12-24 14:15:29 +01:00
Johannes Millan
7f24d13bd6 docs: add event loop yield pattern to development notes
Document the pattern of yielding to the event loop after bulk NgRx
dispatches to prevent state updates from being lost during rapid
dispatch sequences (50+ operations).
2025-12-22 12:07:44 +01:00
Johannes Millan
ee6a766a46 fix(sync): add vector-clock dominance check to late-joiner replay
- Add missing vector-clock comparison in _replayLocalSyncedOpsAfterImport
  that filters ops dominated (LESS_THAN) by SYNC_IMPORT's clock
- Replace local MAX_REJECTED_OPS_BEFORE_WARNING with imported constant
- Fix CLAUDE.md doc path reference to operation-log-architecture-diagrams.md
- Add 6 comprehensive tests for vector-clock dominance behavior
2025-12-12 20:48:40 +01:00
Johannes Millan
149947b8ae fix(sync): suppress selector-based effects during hydration/replay
Selector-based effects (like preventParentAndSubTaskInTodayList$) were
firing during operation replay because they subscribe directly to store
selectors rather than actions. LOCAL_ACTIONS filtering only works for
action-based effects.

This caused duplicate operations to be captured during hydration, growing
the operation queue unnecessarily and impacting performance.

- Add HydrationStateService to track when remote ops are being applied
- Wrap OperationApplierService.applyOperations() with hydration state
- Filter preventParentAndSubTaskInTodayList$ during hydration
- Document selector-based effects anti-pattern in CLAUDE.md
2025-12-12 20:48:13 +01:00
Johannes Millan
d3061fc15b docs: add effects anti-pattern to CLAUDE.md
Highlight the rule that effects should NEVER run for remote operations
in the anti-patterns section for better visibility.
2025-12-12 20:47:48 +01:00
Johannes Millan
3e8242bc55 refactor(sync): add ArchiveOperationHandler for remote archive ops
Establish general rule: effects should NEVER run for remote operations.
Side effects happen exactly once on the originating client.

- Create ArchiveOperationHandler service for remote archive side effects
- Integrate handler into OperationApplierService (called after dispatch)
- Change archive.effects.ts to use LOCAL_ACTIONS only
- Update CLAUDE.md with the general rule about effects
- Add Section 8 to architecture diagrams documenting the pattern

For archive operations:
- moveToArchive: local writes BEFORE dispatch, remote via handler AFTER
- restoreTask: local via effect, remote via handler
- flushYoungToOld: local via effect, remote via handler
2025-12-12 20:47:48 +01:00
Johannes Millan
78c65acf4d test(e2e): add sd:today to tasks for TODAY view visibility
Tasks created without explicit dueDay don't appear in TODAY view
due to recent selector changes. Add sd:today short syntax to ensure
tasks have dueDay set and appear correctly in tests.
2025-12-12 20:47:48 +01:00
Johannes Millan
02323dd33d docs: add atomic multi-entity changes guideline to CLAUDE.md
Add note #8 explaining when to use meta-reducers instead of effects
for multi-entity state changes to ensure sync consistency.
2025-12-12 20:47:48 +01:00
Johannes Millan
04a9ef1e34 refactor(sync): migrate move operations to anchor-based positioning
Replace newOrderedIds (full list) with afterTaskId (anchor) for sync-friendly
drag-drop operations. Concurrent moves now merge correctly instead of
conflicting.

Actions migrated:
- moveProjectTaskInBacklogList
- moveProjectTaskToBacklogList
- moveProjectTaskToRegularList
- moveTaskInTodayList (PROJECT and TAG contexts)

Also includes:
- deleteProject payload slim-down (projectId + noteIds instead of full Project)
- Helper functions: moveItemAfterAnchor(), getAnchorFromDragDrop()
- Comprehensive tests for all anchor-based moves
- Documentation updates in todo.md
2025-12-12 20:46:41 +01:00
Johannes Millan
ac8ada84f0 fix(op-log): add error handling for critical failure paths
- Add clientId validation before persisting operations
- Track compaction failures and notify user after 3 consecutive failures
- Add hydration recovery notification when both hydration and recovery fail
- Wrap conflict resolution in try-catch for atomicity
- Add HYDRATION_FAILED, COMPACTION_FAILED, CONFLICT_RESOLUTION_FAILED translations
- Update CLAUDE.md: only edit en.json for translations
2025-12-12 20:46:21 +01:00
Johannes Millan
f8e0160801 docs: plan operation logs again 1 2025-12-12 20:46:05 +01:00
Johannes Millan
9f2c786e41 refactor: move tests 2025-08-02 11:37:25 +02:00
Johannes Millan
41b287fd9d refactor(e2e): simplify Playwright commands to essentials
- Keep only the most useful commands:
  - e2e:playwright - run all tests with minimal output
  - e2e:playwright:file - run single file with detailed output
  - e2e:playwright:ui/debug/headed/report - existing useful commands
- Remove complexity: test-summary.js, minimal config, redundant commands
- Use line reporter by default for cleaner output
- Update CLAUDE.md documentation

BREAKING CHANGE: Removed e2e:playwright:quick, e2e:playwright:failures, and e2e:playwright:summary commands
2025-08-01 18:44:33 +02:00
Johannes Millan
fadff3bc19 test(e2e): add command to run single test file
- Add npm run e2e:playwright:file command for running individual test files
- Update CLAUDE.md documentation with all Playwright commands
- Example usage: npm run e2e:playwright:file tests/work-view/work-view.spec.ts
2025-08-01 18:44:33 +02:00
Johannes Millan
69cb6d7e5a docs: add Playwright E2E test commands to CLAUDE.md 2025-08-01 18:44:33 +02:00
Johannes Millan
4ea38843d0 feat: add npm commands for single file operations with minified output
- Add 'npm run checkFile <file>' to run prettier and lint on a single file
- Add 'npm run prettier:file <file>' for formatting individual files
- Add 'npm run lint:file <file>' for linting individual files
- Add 'npm run test:file <file>' for running tests on individual spec files
- Create wrapper scripts that show minimal output on success, full output on errors
- Update CLAUDE.md to emphasize using checkFile command frequently
- Add 25-second timeout for test execution to prevent hanging
2025-07-12 10:48:51 +02:00
Johannes Millan
4caf7b4fa5 build: update CLAUDE.md 2025-07-03 20:16:53 +02:00
Johannes Millan
d676c4086a build: update claude instructions 2025-06-12 12:06:48 +02:00
Johannes Millan
db4f2c213b Merge branch 'feat/merge-issue-provider-logic'
* feat/merge-issue-provider-logic: (42 commits)
  docs: add comment explaining GitLab issue ID format and remove debug logs
  fix: extract numeric issue ID from malformed GitLab issue IDs
  debug: add logging to GitLab issueLink to debug URL construction
  fix: update all references from searchIssues$ to searchIssues Promise method
  fix: update all references from issueLink$ to issueLink Promise method
  fix: correct GitLab issue URL format
  fix: change ISSUE_REFRESH_MAP to use issueProviderId as key
  outline
  refactor: convert pollTimer$ to simple pollInterval number
  refactor: convert searchIssues$ to return Promise instead of Observable
  refactor: convert getById$ to return Promise instead of Observable
  refactor: convert issueLink$ to return Promise instead of Observable
  refactor: convert testConnection$ to return Promise instead of Observable
  feat(issue): further improve
  refactor: improve typing for comment parameters in issue-content component
  feat(issue): further simplify and make some conditions work as they should
  refactor(issue): merge IssueFieldConfig field and getValue into unified value property
  refactor(issue): use proper issue interface types instead of any casts
  feat(issue): more adjustments
  feat(issue): more adjustments
  ...
2025-06-11 09:51:31 +02:00
Johannes Millan
c916bd558d build: update claude.md 2025-06-11 09:49:48 +02:00
Johannes Millan
8fbd7bab0a feat: add prettier stuff 2025-06-10 10:17:50 +02:00
Johannes Millan
de18bf6c1a add general guidelines for claude 2 2025-06-09 14:45:09 +02:00
Johannes Millan
0aef393ee1 add general guidelines for claude 2025-06-09 13:46:30 +02:00
Johannes Millan
203fd6c4f0 add claude.md 2025-06-08 13:06:53 +02:00