Repository navigation
feat(desktop): dual storage mode (local vs cloud), OS keyring session persistence, and dev isolation - #17
Merged
Conversation
A failed snapshot_load used to enable saving, so the first later mutation overwrote a still-valid snapshot with the default structure. Persistence now stays disabled for the session unless a load succeeds or the core reports no snapshot.
Add rename/delete for workspaces and sessions, terminal update and atomic reorder, explicit idempotent create ids, and terminal agent/minimized metadata. Persist the new fields with a Prisma migration and cover the contract with integration tests.
Implement the SnapshotStore cloud adapter with a blocking ureq/rustls client, deterministic UUID v5 mapping for local ids, and create/update/delete/reorder reconciliation that fails closed. Extract access-token refresh from auth_status behind an application port and cover both adapters with mock-server and unit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Desktop Dual Storage feature (
localappdata vscloudREST API) end-to-end along with OS keyring session persistence and isolated desktop development handoff:appdata):WorkspaceSnapshotport inapplicationand atomic JSON backendFsSnapshotStore(workspaces.json) with corrupt-file quarantine (.corrupt).snapshot_load/snapshot_saveand frontend hydration/persistence queue withPane.seqcounter recovery (adoptPaneSeq).PATCH/DELETE/workspaces/:idand/sessions/:id,PATCH /sessions/:id/terminals/:terminalId,PUT /sessions/:id/terminals/order, explicit idempotent UUIDs, and terminalagent/minimizedmetadata).AccessTokenProviderport with single-flight token refresh inAuthStoreandCloudSnapshotStore(ureq3 +rustls) reconciling create/update/delete/reorder with deterministic UUID v5 mapping for local IDs.OnboardingandSettingsDialog(storage.json),CloudGatewhen cloud mode has no active session, visible-but-inactive collaboration UI in local mode (data-collab-inactive="true"), and additive local?cloud workspace migration on mode switch while preserving local files.refresh_token+UserViewin the native OS credential store (keyringv3: Windows Credential Manager / macOS Keychain / Linux Secret Service) isolated betweenopencollab(prod) andopencollab-dev(dev), keepingaccess_tokenstrictly in RAM and preserving sessions across transient network/5xxerrors.com.opencollab.desktop/com.opencollab.desktop.dev), isolates dev PKCE handoff (client=desktop-dev?opencollab-dev://auth/callback), and standardizes monorepo dev scripts (pnpm dev,pnpm desktop:dev,pnpm api:dev,pnpm web:dev).Verification
cargo fmt --all --check: 0 diffscargo clippy --workspace --all-targets -- -D warnings: 0 warningscargo test --workspace: 259 passed, 0 failedpnpm typecheck: 7/7 passedpnpm -r test: 408 passed across all packages (domain,contracts,ui,web,desktop,api)pnpm --filter @opencollab/desktop test:e2e: 14/14 scenarios passed