Repository navigation
Keep the desktop app offline, with no Rotur - #111
Merged
Merged
Conversation
The desktop app (window.EditorPreload, or no web origin) now has no Rotur at all. hasRotur() in lib/rotur/availability.js is the one check: - The Rotur client never restores a session or old token there, never hands out a token, and refuses to sign in or ask for permissions, so nothing reaches api.rotur.dev. - The Rotur bridge answers projects with a clear 'not available' error. - The sign-in button and modal, Products, Game Items, Project history and Live Collaboration are hidden. Signed-out community features already hide themselves. The web editor is unchanged.
Saves stay local and the game shop is the test-purchase preview, so a project opened in the desktop app never pays or reaches mistwarp-api.
Deploying scratch-gui with
|
| Latest commit: |
6fe4e82
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4f958b64.scratch-gui.pages.dev |
| Branch Preview URL: | https://desktop-offline.scratch-gui.pages.dev |
mc20000-01
pushed a commit
to mc20000-01/scratch-gui
that referenced
this pull request
Nov 7, 2026
Keep the desktop app offline, with no Rotur
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.
Sophie wants the desktop app offline first, with no Rotur. This takes Rotur out of desktop builds of the editor and leaves the web editor as it is.
One check
hasRotur()insrc/lib/rotur/availability.jsis false in the desktop app (window.EditorPreloadexists, or the page isn't on http or https). The entry points ask it:The Rotur client (
client.js):getAccessTokenandrestoreSessionreturn null, even with a session or old token stored from before;loginthrowsrotur_offline;ensureScopesreturns false.Everything else in the client already does nothing while signed out, so nothing reaches api.rotur.dev or opens Rotur's socket. Without a Rotur token there's no mistwarp-api session either.
The Rotur bridge for projects (
RoturExtensionHost.callandensureConsent) rejects with "Rotur isn't available in the MistWarp desktop app, which works offline." The host stays installed, so the Rotur extension never falls back to its own SDK client.The game host treats every project as unsaved. Saves stay in the editor, and the game shop is the existing test-purchase preview, which charges nothing.
The UI hides:
The chat, notifications and My Stuff buttons, sharing to MistWarp, and the reconnect offer already hide themselves when nobody is signed in.
Screenshots
The editor dev server with a stub
window.EditorPreloadand an old Rotur token in storage.Desktop: no Sign in:

Desktop Project menu, without Project history or Live Collaboration:

Web, unchanged:

Desktop Edit menu, without Products or Game Items:

Web, unchanged:

Requests to rotur.dev while loading the desktop editor with that old token:
develop: 6, including/v2/meand/v2/auth/check;Testing
rotur-desktop-offline.test.jsis new. WithEditorPreloadset and an old session and token stored, it checks that:EditorPreload, Firefox throws a React "Should not already be working" error, anddevelopdoes the same.Not here
me.transferfor projects is removed in a separate PR.credits:transferare removed by Pay through Rotur payment requests #108.