Repository navigation
sdk/ui: the page's navigator says the system raea's window runs on - #173
Merged
Merged
Conversation
…ot a Mac's everywhere A Windows PC's page said MacIntel and a Mac's user agent (0.1.7), so a library that picks ⌘ or Ctrl by navigator.platform (CodeMirror's and ProseMirror's Mod-) took Ctrl+Z, Ctrl+C and Ctrl+V as a Mac's. userAgent, platform and userAgentData now read globalThis.__raea_window.os (set by the window before the page's bundle) when asked: Win32 and a Windows NT user agent on Windows, Linux x86_64 on Linux, the Mac's as before with no window (a render). test/navigator.test.ts.
shinyobjectz
force-pushed
the
windows-navigator
branch
from
November 18, 2026 07:53
0b1ed0b to
eaac298
Compare
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.
sdk/ui: the page's navigator says the system raea's window runs on
On every system the page's navigator said
MacInteland gave a Mac's user agent, Windows PCs included (raea 0.1.7). Excalidraw, the whiteboard, chooses ⌘ or Ctrl with/Mac|iPod|iPhone|iPad/.test(navigator.platform). On a Windows PC it therefore treated Ctrl+Z, Ctrl+C and Ctrl+V as Mac shortcuts and they did nothing.userAgent,platformanduserAgentDataare now getters that readglobalThis.__raea_window.os, which the window's preamble sets before the page's bundle runs (engine/page/windowchrome.rs):Win32and a Windows NT user agent.Linux x86_64.Proof
test/navigator.test.tscovers each system and the regex Excalidraw uses. The sdk/ui suite passes: 69 tests, 0 failures.navigator.platforminside a run-on-first-use wrapper, because the feed loads Excalidraw withawait import(). It therefore runs after@raea/ui/dom-globals, the entry's first import, has installed the navigator.Part of the Windows work after raea-feed #93. The release gate and the spec status are in raea-platform.
🤖 Generated with Claude Code