If we ever want to do anything OS-specific on the web side (for example, prompt Linux users to download the latest client), it's necessary to know which platform we're on. While we can potentially infer that from the user agent, I'd rather this be an explicit part of the API for ease of use and consistency (on the off-chance the heuristic we use differs from what Node uses).
What changed
Pass process.platform down to renderer process as a new platform field on the global replitDesktop object
Test plan
Start the app
Open dev tools console
Log that replitDesktop.platform exists and matches expected value
Why
If we ever want to do anything OS-specific on the web side (for example, prompt Linux users to download the latest client), it's necessary to know which platform we're on. While we can potentially infer that from the user agent, I'd rather this be an explicit part of the API for ease of use and consistency (on the off-chance the heuristic we use differs from what Node uses).
What changed
Pass process.platform down to renderer process as a new
platform
field on the globalreplitDesktop
objectTest plan
replitDesktop.platform
exists and matches expected value