Repository navigation
feat: local-first Sketchflow, GitHub sign-in optional - #6
Merged
Merged
Conversation
The excalidrawAPI callback runs before Excalidraw's own component has mounted, so calling updateScene there logged a setState-on-unmounted warning. The theme effect already applies the same colours after mount. Also adds the guest-workspace contract for local-first mode: src/lib/local-workspace.ts, useAppIdentity, and the LocalSyncPanel props.
The whole app now works without signing in. Projects made signed out live in the browser under a "This device" workspace; nothing redirects to sign-in on its own. - App pages (projects, recent, notes, templates, workspaces) show the guest workspace when signed out and add repository workspaces after sign-in. /try redirects to /app and an existing try sketch becomes a guest project once. - The editor opens guest projects from local drafts only, never calls the server for them, and replaces the commit controls with "Saved on this device" and "Back up to GitHub". - After sign-in, a sync panel offers to copy guest projects into a repository: one commit per project, renamed on id collisions, removed from the device only after the commit succeeds. - Sharing and forking need a repository and prompt for sign-in instead of redirecting. - Guest data always uses the "local" storage scope, so signing in or out never hides or purges it.
- The offline fallback to the last signed-in user now applies only when the browser reports no connection, so a server error or an expired session cannot show a previous user's cached repositories. - Sync refuses to run when the repository's latest commit is unknown, because every commit relies on that head to avoid overwriting changes. - Sketch links encode each id as one path segment. - New end-to-end tests: the app opens signed out, a guest project survives a reload, sharing prompts instead of redirecting, /try opens the app, and device projects sync into a repository after sign-in.
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 changes for users
Sketchflow now works fully without an account.
/trynow opens the app. An existing try sketch becomes a device project once.How it works
localstorage scope, including after sign-in, so signing in or out never hides or purges it.Also in this branch
Known limits
Test plan
bun run test), including 16 for sync: file building, id collisions, a failed commit keeping the device copy, expired session, conflict, missing branch headbun run test:e2e): app opens signed out with no authenticated API calls, a guest project survives a reload, sharing prompts,/tryopens the app, device projects sync after sign-in, existing signed-in editor flows