mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.03k stars 829 forks source link

[MM-60308] Add a set of "Developer Mode" settings that allow the user to turn off systems or force the app to behave a certain way #3144

Closed devinbinnie closed 2 months ago

devinbinnie commented 2 months ago

Summary

This PR creates a Developer Mode, hidden behind an environment variable that when set, will unlock certain options allowing users to fiddle with the behaviour of the Desktop App. This mode is designed to aid developers in debugging performance issues with the Desktop App, where we believe certain systems with the Desktop App may be the culprit.

The settings added here are:

This mode should not be turned on by anyone who isn't a developer, or was instructed by a Mattermost developer to turn this on. When the feature is on, an indicator will show up on the top bar showing that you are in Developer Mode:

Screen Recording 2024-09-11 at 11 26 00 AM

Ticket Link

https://mattermost.atlassian.net/browse/MM-60308

Add `Developer Mode` settings to help debug performance issues
devinbinnie commented 2 months ago

@abhijit-singh

Not sure how to test this, which env variable do I change and how?

The variable is MM_DESKTOP_DEVELOPER_MODE and it should be set to true. On Mac, you can run export MM_DESKTOP_DEVELOPER_MODE=true and then run the build from the command line.

But I'm also not sure if this needs any UX testing. We should just make sure it works as expected on Windows too if we haven't already checked that. Other than that, feel free to remove me as a reviewer and go ahead with this.

The reason I asked for UX was to confirm that the indicator (screenshotted above) looked alright, and that the descriptions of the menu items made sense. If that's all okay, you can approve (or remove yourself) and we'll go from there