Conversation
…g (v0.18.9) - sync engine tracks lastKnownRemoteSalt per journal to distinguish local vs remote password changes. When salt mismatches, aborts if local matches previous remote (remote changed externally) rather than clobbering remote with stale data - reencryptJournal now flips att.encrypted flags to match !!newKey, fixing images/attachments that failed to load after password change + cloud import because the flag went stale - cloud import records the imported salt so the next sync doesn't false-positive - engine uploads metadata/registry AFTER pages, making interrupted syncs recoverable instead of corrupting - NewJournalModal: full width/height with safe-area insets on native, floating card on web - 14 new tests covering engine + manager + E2E scenarios; key-aware crypto mock extracted as shared helper; InMemoryLocalStore now models two-layer attachment encryption
Carranca AI ReviewLet me read the relevant source files to complete my security and correctness review: Code Review: PR #9 "fix: Cross-device password sync (v0.18.9)"SummaryThis PR fixes a critical data corruption bug where changing a password on one device would cause another device to overwrite the remote with stale data during sync. The solution introduces per-device FindingsCritical
High
Medium
Low
Info
VerdictAPPROVE This PR addresses a critical data corruption bug with a well-thought-out solution that adds minimal complexity while significantly improving cross-device password sync reliability. The test coverage is comprehensive, and the implementation follows secure coding practices. The identified issues are relatively minor and don't block the PR. carranca bound glm-4.6 Automated review by carranca sandbox |
…failure - SyncManager.forgetJournal(id) clears both lastSync and lastRemoteSalt AsyncStorage entries; called from JournalSettings after local delete so a later recreate/re-import with the same ID doesn't inherit stale sync state - surface the silent failure when re-fetching remote salt post-sync (was empty catch block) with a console.warn so anomalies show up in logs - new test: forgetJournal clears state for target journal only
Carranca AI ReviewI'll review PR #9 "fix: Cross-device password sync (v0.18.9)" focusing on the key areas specified. Code Review: PR #9 - Cross-device password sync fix (v0.18.9)SummaryThis PR fixes a critical cross-device sync corruption bug where changing a password on one device and syncing on another device with stale data would corrupt the remote by overwriting it with stale data. The solution introduces FindingsSecurity
Encryption Correctness
TypeScript & Code Quality
Performance
Test Coverage
State Management
React Native / Expo Patterns
Cross-Device Test Simulation
VerdictCOMMENT This PR addresses a critical data corruption bug with a well-thought-out solution and excellent test coverage. The implementation is solid, but I have identified a few medium-priority concerns:
None of these issues are blockers, but addressing them would improve the robustness of the solution. The core logic is sound, the security model is maintained, and the test coverage is exceptional. carranca bound zai-coding-plan/glm-4.6 Automated review by carranca sandbox |
No description provided.