Stabilize desktop identity and quiet passive keychain reads - #97
Conversation
Zync needs a stable cross-platform bundle identity before future releases, but existing users already have data under legacy default identities. This change standardizes the identifier to in.thesudoer.zync, removes the macOS-only CI patch, and adds a copy-only migration path for legacy default data/config directories while preserving custom dataPath setups. The vault and sync status paths now avoid reading OS credential-store secrets for passive UI refreshes. Secret reads remain on real unlock/sync/token-use paths, which reduces repeated macOS Keychain prompts without pretending unsigned builds can avoid all system trust prompts. Constraint: macOS builds are unsigned/not notarized, so Keychain trust prompts cannot be fully eliminated without Apple signing. Constraint: Existing users may have default data under zync or com.zync.desktop identifiers. Rejected: Keep macOS-only com.zync.desktop override | would leave future Windows/Linux identity migration work and inconsistent product identity. Rejected: Directly copy legacy data into the final target | partial failures could leave mixed migrated state. Confidence: high Scope-risk: moderate Directive: Keep OS Keychain service/account names stable unless a dedicated secret migration is shipped. Tested: cargo check --manifest-path src-tauri\\Cargo.toml Tested: cargo test --manifest-path src-tauri\\Cargo.toml identity_migration Tested: cargo test --manifest-path src-tauri\\Cargo.toml sync::collection Tested: cargo test --manifest-path src-tauri\\Cargo.toml google Tested: cargo test --manifest-path src-tauri\\Cargo.toml session_cache Tested: npm run test:sync-passphrase Not-tested: Manual macOS Keychain prompt behavior on an unsigned packaged build
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change standardizes the Tauri application identity, adds safe migration from legacy default directories, reduces passive secret reads, and updates sync collection cache and key-recovery handling. ChangesApplication identity and migration
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR standardizes desktop identity and reduces passive keychain reads; no actionable merge-blocking risk remains based on the supplied evidence. Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Application
participant get_data_dir
participant migrate_default_dirs
participant Filesystem
Application->>get_data_dir: resolve application data directory
get_data_dir->>migrate_default_dirs: migrate default directories
migrate_default_dirs->>Filesystem: validate and stage legacy directory contents
Filesystem-->>migrate_default_dirs: install copied directory and marker
migrate_default_dirs-->>get_data_dir: return migration result
get_data_dir-->>Application: return effective data directory
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Clippy (1.97.1)Clippy execution timed out Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Zync needs a stable cross-platform bundle identity before future releases, but existing users already have data under legacy default identities. This change standardizes the identifier to in.thesudoer.zync, removes the macOS-only CI patch, and adds a copy-only migration path for legacy default data/config directories while preserving custom dataPath setups.
The vault and sync status paths now avoid reading OS credential-store secrets for passive UI refreshes. Secret reads remain on real unlock/sync/token-use paths, which reduces repeated macOS Keychain prompts without pretending unsigned builds can avoid all system trust prompts.
Constraint: macOS builds are unsigned/not notarized, so Keychain trust prompts cannot be fully eliminated without Apple signing.
Constraint: Existing users may have default data under zync or com.zync.desktop identifiers.
Rejected: Keep macOS-only com.zync.desktop override | would leave future Windows/Linux identity migration work and inconsistent product identity.
Rejected: Directly copy legacy data into the final target | partial failures could leave mixed migrated state.
Confidence: high
Scope-risk: moderate
Directive: Keep OS Keychain service/account names stable unless a dedicated secret migration is shipped.
Tested: cargo check --manifest-path src-tauri\Cargo.toml
Tested: cargo test --manifest-path src-tauri\Cargo.toml identity_migration
Tested: cargo test --manifest-path src-tauri\Cargo.toml sync::collection
Tested: cargo test --manifest-path src-tauri\Cargo.toml google
Tested: cargo test --manifest-path src-tauri\Cargo.toml session_cache
Tested: npm run test:sync-passphrase
Not-tested: Manual macOS Keychain prompt behavior on an unsigned packaged build
Summary by CodeRabbit
Changed
Bug Fixes