mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
chore: clean up leftover pfapi references after refactor
- Remove dead test:shard:pfapi script from package.json - Update AGENTS.md persistence layer path to op-log and sync - Update documentation file paths in secure-storage.md, vector-clocks.md, and quick-reference.md
This commit is contained in:
parent
d50dc73674
commit
4e49628eca
5 changed files with 25 additions and 27 deletions
|
|
@ -71,7 +71,7 @@ The app uses NgRx (Redux pattern) for state management. Key state slices:
|
|||
|
||||
### Data Flow
|
||||
|
||||
1. **Persistence Layer** (`/src/app/pfapi/`): Handles data storage with multiple adapters (IndexedDB)
|
||||
1. **Persistence Layer** (`/src/app/op-log/` and `/src/app/sync/`): Handles data storage (IndexedDB) and sync providers
|
||||
2. **Services** (`*.service.ts`): Business logic and state mutations via NgRx
|
||||
3. **Components**: (`*.component.ts`) Subscribe to state via selectors, dispatch actions for changes
|
||||
4. **Effects**: Handle side effects (persistence, sync, notifications)
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ async getOrCreateKey(): Promise<CryptoKey> {
|
|||
**Modified files:**
|
||||
|
||||
- `src/app/core/startup/startup.service.ts` - Call migration in `init()`
|
||||
- `src/app/pfapi/api/sync/sync-provider-private-cfg-store.ts` - Add `clear()` method
|
||||
- `src/app/sync/providers/private-cfg-store.ts` - Add `clear()` method
|
||||
|
||||
**Migration flow:**
|
||||
|
||||
|
|
@ -240,17 +240,17 @@ async get(key: string): Promise<string | null> {
|
|||
|
||||
### Modified Files (9)
|
||||
|
||||
| Path | Changes |
|
||||
| ----------------------------------------------------------- | ------------------- |
|
||||
| `electron/shared-with-frontend/ipc-events.const.ts` | Add 4 IPC events |
|
||||
| `electron/preload.ts` | Add 4 methods |
|
||||
| `electron/electronAPI.d.ts` | Type definitions |
|
||||
| `electron/ipc-handler.ts` | Register handlers |
|
||||
| `src/app/core/window-ea.d.ts` | Frontend types |
|
||||
| `src/app/core/startup/startup.service.ts` | Trigger migration |
|
||||
| `src/app/pfapi/api/sync/sync-provider-private-cfg-store.ts` | Add clear() |
|
||||
| `android/app/build.gradle` | Add security-crypto |
|
||||
| `android/.../CapacitorMainActivity.kt` | Register plugin |
|
||||
| Path | Changes |
|
||||
| --------------------------------------------------- | ------------------- |
|
||||
| `electron/shared-with-frontend/ipc-events.const.ts` | Add 4 IPC events |
|
||||
| `electron/preload.ts` | Add 4 methods |
|
||||
| `electron/electronAPI.d.ts` | Type definitions |
|
||||
| `electron/ipc-handler.ts` | Register handlers |
|
||||
| `src/app/core/window-ea.d.ts` | Frontend types |
|
||||
| `src/app/core/startup/startup.service.ts` | Trigger migration |
|
||||
| `src/app/sync/providers/private-cfg-store.ts` | Add clear() |
|
||||
| `android/app/build.gradle` | Add security-crypto |
|
||||
| `android/.../CapacitorMainActivity.kt` | Register plugin |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ Conflict detection uses vector clocks to determine causal relationships.
|
|||
|
||||
- `vector-clock.service.ts` - Vector clock management
|
||||
- `conflict-resolution.service.ts` - Conflict detection logic
|
||||
- `src/app/pfapi/api/util/vector-clock.ts` - Clock comparison
|
||||
- `src/app/sync/util/vector-clock.ts` - Clock comparison
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -643,7 +643,7 @@ End-to-end encryption ensures the server never sees plaintext data.
|
|||
**Key Files:**
|
||||
|
||||
- `operation-encryption.service.ts` - High-level API
|
||||
- `pfapi/api/encryption/encryption.ts` - AES-GCM + Argon2id
|
||||
- `sync/encryption/encryption.ts` - AES-GCM + Argon2id
|
||||
- `operation-log-upload.service.ts` - Encryption during upload
|
||||
- `operation-log-download.service.ts` - Decryption during download
|
||||
|
||||
|
|
|
|||
|
|
@ -71,15 +71,14 @@ This leads to false conflicts where user intervention is required even though on
|
|||
### File Structure
|
||||
|
||||
```
|
||||
src/app/pfapi/api/
|
||||
├── util/
|
||||
│ ├── vector-clock.ts # Core vector clock operations
|
||||
│ ├── backwards-compat.ts # Migration helpers
|
||||
│ └── get-sync-status-from-meta-files.ts # Sync status detection
|
||||
├── model-ctrl/
|
||||
│ └── meta-model-ctrl.ts # Updates vector clocks on changes
|
||||
└── sync/
|
||||
└── sync.service.ts # Integrates vector clocks in sync flow
|
||||
src/app/
|
||||
├── sync/ # Sync providers and utilities
|
||||
│ ├── util/
|
||||
│ │ └── vector-clock.ts # Core vector clock operations
|
||||
│ └── providers/ # WebDAV, Dropbox, SuperSync, etc.
|
||||
└── op-log/ # Operation log system
|
||||
└── sync/
|
||||
└── vector-clock.service.ts # Vector clock management for op-log
|
||||
```
|
||||
|
||||
### Core Operations
|
||||
|
|
@ -255,8 +254,8 @@ See the operation log architecture docs for detailed diagrams of this late-joine
|
|||
### Enable Verbose Logging
|
||||
|
||||
```typescript
|
||||
// In pfapi/api/util/log.ts, set log level to 2 or higher
|
||||
pfLog(2, 'Vector clock comparison', {
|
||||
// In op-log/util/log.ts, set log level to 2 or higher
|
||||
opLog(2, 'Vector clock comparison', {
|
||||
localVector: vectorClockToString(localVector),
|
||||
remoteVector: vectorClockToString(remoteVector),
|
||||
result: comparison,
|
||||
|
|
|
|||
|
|
@ -117,7 +117,6 @@
|
|||
"test:fast": "cross-env TZ='Europe/Berlin' NODE_OPTIONS='--max-old-space-size=4096' ng test --watch=false --no-code-coverage --source-map=false",
|
||||
"test:fast:watch": "cross-env TZ='Europe/Berlin' NODE_OPTIONS='--max-old-space-size=4096' ng test --browsers ChromeHeadless --no-code-coverage --source-map=false",
|
||||
"test:shard:features": "cross-env TZ='Europe/Berlin' ng test --watch=false --include='src/app/features/**/*.spec.ts'",
|
||||
"test:shard:pfapi": "cross-env TZ='Europe/Berlin' ng test --watch=false --include='src/app/pfapi/**/*.spec.ts'",
|
||||
"test:shard:ui": "cross-env TZ='Europe/Berlin' ng test --watch=false --include='src/app/ui/**/*.spec.ts'",
|
||||
"test:shard:core": "cross-env TZ='Europe/Berlin' ng test --watch=false --include='src/app/core/**/*.spec.ts'",
|
||||
"test:shard:util": "cross-env TZ='Europe/Berlin' ng test --watch=false --include='src/app/util/**/*.spec.ts'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue