Repository navigation
feat: open a drive from the sign-in screen without signing in - #2333
Open
vilenarios wants to merge 1 commit into
Open
vilenarios wants to merge 1 commit into
vilenarios wants to merge 1 commit into
Conversation
A visitor with a drive link or a Drive ID opens that drive from the landing card. No wallet, no account, no second step. Public drives need nothing else; a private drive opens with the drive key it was shared with. Signing in later keeps the drive. - landing card: one link, "Open it without signing in", opening a dialog that takes a Drive ID or any ArDrive link (including file links) through the route parser, looks the drive up, asks for a key when it is private, writes the drive row with no profile key and hands off to the router - router: openDriveAsVisitor starts the drive's sync as the explorer builds (from the cubit factory and the route-link follower), signInKeepingDrive keeps the drive across login, and a private drive whose key is not in memory is prompted for once; cancelling lands on sign in - carry-over: ProfileCubit awaits DriveDao.persistInMemoryDriveKeys before announcing the login, so a private drive opened as a visitor survives - visitor strip above the explorer with Sign in; the top bar's Log in keeps the drive instead of logging out; the New button offers Open another drive - visitor leaks closed: Create snapshot (desktop menu, Snapshots tab), License add/update, Your drives in the sync menu, the create-drive cards, private thumbnails, mobile share-to-app, new-window preview on private drives - two pre-existing causes of a "Drive not synced" flash on a freshly opened drive: DriveDetailCubit's folder-not-found path emitted the unsynced state without the running-sync gate, and SyncCubit.syncMetadataOnly emitted idle over a running single-drive sync for a visitor - ActivityCubit.performUninterruptableActivity is typed Future<void> and releases the flag in a finally Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
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 |
This branch has not been deployed
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.
What
A visitor with a drive link or a Drive ID can open that drive from the sign-in screen. No wallet, no account, no second step. Public drives need nothing else; a private drive opens with the drive key it was shared with (a password cannot open one without the owner's wallet, so the dialog never asks for one). Signing in later keeps the drive.
openDriveAsVisitorstarts the drive's sync as the explorer builds (from the cubit factory for a fresh explorer, from the route-link follower for one already open).signInKeepingDrivekeeps the drive across login, so a visitor who signs in lands back on it. A private drive whose key is not in memory (a reload with the key stripped from the URL) gets the key prompt once; cancelling uses Land on Your drives or sign in when the attach dialog is cancelled #2325's landing.ProfileCubit.unlockDefaultProfileawaitsDriveDao.persistInMemoryDriveKeysbefore emittingProfileLoggedIn, so a private drive opened as a visitor gets its key encrypted onto the row and keeps working after login. No memory fallback ingetDriveKey: the drive-state sync relies on "private row with no key" meaning nothing to open an artifact with.Two pre-existing bugs fixed on the way
A freshly opened drive flashed "Drive not synced" for about a second before its files:
DriveDetailCubit._handleFolderNotFoundemitted the unsynced state without the running-sync gate the normal folder read applies.SyncCubit.syncMetadataOnlyemittedSyncIdleunconditionally for a visitor, over the single-drive sync the explorer had just started. The signed-in branch already guarded this with_finishMetadataSync.Also
ActivityCubit.performUninterruptableActivityis now typedFuture<void>(it always returned one) and releasesActivityInProgressin afinally.Verification
flutter analyzeclean forlib/andtest/; fullflutter test: 3732 passed, 0 failed before the rebase, and the affected suites (1222 tests) after it.drive_link_input_test,open_drive_cubit_test,open_drive_modal_test,visitor_banner_test,profile_card_login_test,drive_dao_visitor_keys_test,visitor_metadata_sync_test, plus router tests for the new methods.tool/web_e2e/and the test wallet's drives: public open by ID from the landing (three drives), open another drive from the New button, private open by keyed share link, reload with and without the key, cancel on the key prompt, sign in from the strip landing back on the drive, a second tab, the visitor's drive menu, phone width. All passed. The staging share-link path was probed first to confirm the attach dialog already waited for close.Follow-ups, not in this PR
app_en.arbonly, as the other ARB files already lack the newer attach strings.🤖 Generated with Claude Code