Summary: Adding a Flipper plugin that is isolated to design systems engineering / FDS. This is essentially our dumping grounds of useful utilities for FDS. The first thing I've added is the ability to dump / view the ui tracker hierarchy, which will be useful for development / debugging.
Differential Revision: D31076277
fbshipit-source-id: 5aff639368945796dc3ebab603dadb8d43d7b699
Summary:
Follow up on D29436059 (014e571f74), another place where the old format was leaked.
Fixes https://github.com/facebook/flipper/issues/2842 + some mentions on WP
Changelog: Fixed JavaScript exception on main thread occurring after loading Flipper
Reviewed By: nikoant
Differential Revision: D30928768
fbshipit-source-id: 083731e18230825738466b34368c2b5f730e386c
Summary:
Changelog: Fixed startup error when loading default theme
The theme defaulted to `auto`, instead of `system`, causing an startup exception. Fixed by adding types and having a more defensive startup check.
Fixes https://github.com/facebook/flipper/issues/2835
Reviewed By: jknoxville
Differential Revision: D30866648
fbshipit-source-id: 83b6d9fc235eaa0a7e959df4276d3f378eed7d1f
Summary: During testing, observed that Flipper always starts with an exception if `darkMode` is `true` or `false` (the old format) during startup, and this exception keeps on happening until the setting is changed. The root cause is that the setting is treated verbatim since D30666966 (9a4d94c971), trigger a very confusing Electron error. This diff addresses that.
Reviewed By: timur-valiev
Differential Revision: D30806453
fbshipit-source-id: fc7bbdda4e8bdf2dc4e3ca7ab1b05984c9406c68
Summary:
Add an setting option to allow automatic dark theme
A feature requested by swrobel https://github.com/facebook/flipper/issues/2708
## Changelog
### UI change
Replace the `Enable Dark Theme` Toggle button with a Radio group containing three Radio buttons.
The available options are `Dark`, `Light` and `Use System Default`, of which `Use System Default` is the default value
<img width="548" alt="Screenshot 2021-08-31 at 3 32 44 PM" src="https://user-images.githubusercontent.com/410850/131462798-4e74f757-41fc-4a3f-ba28-53d00fc1cf03.png">
### Data structure change
The `darkMode` property of [Settings](c0cd32564a/desktop/app/src/reducers/settings.tsx (L20)) is changed from `boolean` to `string`, the available values are `dark`, `light` and `auto`
Pull Request resolved: https://github.com/facebook/flipper/pull/2759
Test Plan:
### Test 1
- Step: Choose `Dark` in the Settings page and click on `Apply and Restart` button
- Expect: The application is displayed in Dark mode
### Test 2
- Step: Choose `Light` in the Settings page and click on `Apply and Restart` button
- Expect: The application is displayed in Light mode
### Test 3
- Step: Choose `Use System Default` in the Settings page and click on `Apply and Restart` button
- Expect: The application is displayed in System Default mode
Reviewed By: mweststrate
Differential Revision: D30666966
Pulled By: passy
fbshipit-source-id: a63e91f2d0dbff96890e267062cb75bffd0007f4
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.5.3 to 8.2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>8.2.1</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed an issue where the socket was not resumed, preventing the connection
from being closed cleanly (869c9892).</li>
</ul>
<h2>8.2.0</h2>
<h1>Features</h1>
<ul>
<li>Added <code>WebSocket.WebSocket</code> as an alias for <code>WebSocket</code> and
<code>WebSocket.WebSocketServer</code> as an alias for <code>WebSocket.Server</code> to fix name
consistency and improve interoperability with the ES module wrapper (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1935">https://github.com/facebook/flipper/issues/1935</a>).</li>
</ul>
<h2>8.1.0</h2>
<h1>Features</h1>
<ul>
<li>Added ability to skip UTF-8 validation (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1928">https://github.com/facebook/flipper/issues/1928</a>).</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li>Fixed an issue with a breaking change in Node.js master (6a72da3e).</li>
<li>Fixed a misleading error message (c95e695d).</li>
</ul>
<h2>8.0.0</h2>
<h1>Breaking changes</h1>
<ul>
<li>
<p>The <code>WebSocket</code> constructor now throws a <code>SyntaxError</code> if any of the
subprotocol names are invalid or duplicated (0aecf0c9).</p>
</li>
<li>
<p>The server now aborts the opening handshake if an invalid
<code>Sec-WebSocket-Protocol</code> header field value is received (1877ddeb).</p>
</li>
<li>
<p>The <code>protocols</code> argument of <code>handleProtocols</code> hook is no longer an <code>Array</code> but
a <code>Set</code> (1877ddeb).</p>
</li>
<li>
<p>The opening handshake is now aborted if the <code>Sec-WebSocket-Extensions</code> header
field value is empty or it begins or ends with a white space (e814110e).</p>
</li>
<li>
<p>Dropped support for Node.js < 10.0.0 (552b5067).</p>
</li>
<li>
<p>The <code>WebSocket</code> constructor now throws a <code>SyntaxError</code> if the connection URL
contains a fragment identifier or if the URL's protocol is not one of <code>'ws:'</code>,
<code>'wss:'</code>, or <code>'ws+unix:'</code> (ebea038f).</p>
</li>
<li>
<p>Text messages and close reasons are no longer decoded to strings. They are
passed as <code>Buffer</code>s to the listeners of their respective events. The listeners
of the <code>'message'</code> event now take a boolean argument specifying whether or not
the message is binary (e173423c).</p>
<p>Existing code can be migrated by decoding the buffer explicitly.</p>
<pre lang="js"><code>websocket.on('message', function message(data, isBinary) {
const message = isBinary ? data : data.toString();
// Continue as before.
});
</code></pre>
</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="cc7a7798b7"><code>cc7a779</code></a> [dist] 8.2.1</li>
<li><a href="869c9892cd"><code>869c989</code></a> [fix] Resume the socket in the next tick</li>
<li><a href="ea6c054e97"><code>ea6c054</code></a> [test] Reorganize some tests</li>
<li><a href="7647a8920b"><code>7647a89</code></a> [dist] 8.2.0</li>
<li><a href="d5e3549a03"><code>d5e3549</code></a> [minor] Add <code>WebSocket.WebSocket{,Server}</code> aliases (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1935">https://github.com/facebook/flipper/issues/1935</a>)</li>
<li><a href="c677aab978"><code>c677aab</code></a> [doc] Fix <code>createWebSocketStream()</code> documentation</li>
<li><a href="f38247e5e0"><code>f38247e</code></a> [doc] Sort options alphabetically</li>
<li><a href="142f0911b5"><code>142f091</code></a> [dist] 8.1.0</li>
<li><a href="d21c81034f"><code>d21c810</code></a> [feature] Add ability to skip UTF-8 validation (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1928">https://github.com/facebook/flipper/issues/1928</a>)</li>
<li><a href="9bd3bd1251"><code>9bd3bd1</code></a> [minor] Fix typo (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1929">https://github.com/facebook/flipper/issues/1929</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.5.3...8.2.1">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/2756
Reviewed By: lblasa
Differential Revision: D30727123
Pulled By: passy
fbshipit-source-id: b06ab55427b7798d004d2f3371f76bda6af69947
Summary:
ESM module snuck in and wasn't caught in tests or builds.
Fixes Q244903.
Should fix https://github.com/facebook/flipper/issues/2768
Reviewed By: mweststrate
Differential Revision: D30760296
fbshipit-source-id: 36c632260e069830da1121e3d5de4ab21cef90f2
Summary:
Remove IPC rendering / connection implementation. This has been behind GK for a couple of weeks, and no one complained / white listed. See also D30367413.
flipper_js_client_emulator
Reviewed By: passy
Differential Revision: D30452442
fbshipit-source-id: fbe7b4914fecc023f3ec78a027106ea32c5a99bd
Summary:
This stack adds a SNAPL Video Logs Flipper Plugin.
In this commit I created the skeleton for the desktop and the client sides of the plugin.
Differential Revision: D29065783
fbshipit-source-id: e204a465e64ede9479665fcbbb6be34643de5218
Summary:
Going through all the patch updates and other small updates to pre-empt dependabot.
allow-large-files
Reviewed By: jknoxville
Differential Revision: D29547777
fbshipit-source-id: 86ef2408da0564049916cd96d66665074cdc23f2
Summary: Intercept click to links in the embedded documentation and redirect them to the default browser.
Reviewed By: passy
Differential Revision: D29426270
fbshipit-source-id: 1d3d9613ff827f80287883768452b93701e95d96
Summary:
Changelog: Improved dark mode support!
This diff makes sure that the dark mode preference is written to the Flipper config, and applied during startup, so that the ugly light/dark flash when starting Flipper in dark mode disappears
Reviewed By: passy
Differential Revision: D29436059
fbshipit-source-id: 0f762149848298512026fbd216d9a9e0bf4276db
Summary:
This diff adds OS support for dark mode (at least on Mac), by making sure system elements are styled according to system dark theme.
For some unknown reason, this does apply to all system dialogs, titlebars etc, but not for scrollbars, so they got custom themed.
Differential Revision: D29436058
fbshipit-source-id: bac649b6cd81f0142c607ed567eeb00f41625041
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.4.6 to 7.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>7.5.0</h2>
<h1>Features</h1>
<ul>
<li>Some errors now have a <code>code</code> property describing the specific type of error
that has occurred (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1901">https://github.com/facebook/flipper/issues/1901</a>).</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li>A close frame is now sent to the remote peer if an error (such as a data
framing error) occurs (8806aa9a).</li>
<li>The close code is now always 1006 if no close frame is received, even if the
connection is closed due to an error (8806aa9a).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e3f0c1720a"><code>e3f0c17</code></a> [dist] 7.5.0</li>
<li><a href="1d3f4cbb0e"><code>1d3f4cb</code></a> [doc] Fix anchor tags for error codes</li>
<li><a href="6eea0d466b"><code>6eea0d4</code></a> [doc] Fix typo</li>
<li><a href="bb5d44b118"><code>bb5d44b</code></a> [doc] Sort error codes alphabetically</li>
<li><a href="c6e3080670"><code>c6e3080</code></a> [minor] Attach error codes to all receiver errors (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1901">https://github.com/facebook/flipper/issues/1901</a>)</li>
<li><a href="074e6a8be7"><code>074e6a8</code></a> [fix] Don't call <code>ws.terminate()</code> unconditionally in <code>duplex._destroy()</code></li>
<li><a href="8806aa9a83"><code>8806aa9</code></a> [fix] Close the connection cleanly when an error occurs</li>
<li><a href="05b8ccd639"><code>05b8ccd</code></a> [doc] Fix broken link (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1897">https://github.com/facebook/flipper/issues/1897</a>)</li>
<li><a href="03a707884c"><code>03a7078</code></a> [doc] Remove unsafe regex from code snippet</li>
<li><a href="7ee31157d7"><code>7ee3115</code></a> [doc] Add logo to coverage badge</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.4.6...7.5.0">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/2487
Reviewed By: nikoant
Differential Revision: D29264222
Pulled By: mweststrate
fbshipit-source-id: 2c7eebd793c6ea9f28543a2808f387399043e59f
Summary: Changed some imports, and again the Flipper initialisation broke. Refactored the store initialization to create nowhere module local constants, which prevents generally against module loading issues, making it possible to load all code first, and then intialise things through the `init()` method, which should make Flipper initialisation a lot more robust to changes
Reviewed By: passy
Differential Revision: D29233603
fbshipit-source-id: 322cb87cba23228b1d7a88634b7b3995e27cc277
Summary:
Releasing version 0.94.1
This is OSS-only.
Reviewed By: passy
Differential Revision: D29166261
fbshipit-source-id: d27bd79c14296519e7c90f138131458b2a5e77e2
Summary: This diff fixed the issue when deep link handled multiple times in case Flipper window reloaded. See test plan for videos.
Reviewed By: fabiomassimo
Differential Revision: D29100221
fbshipit-source-id: 0ff6f1a645d5488d205b4fba44942f4d39f59088
Summary:
Concatenating strings is not a great idea for paths. This isn't actually Windows-specific (I think) but maybe more common there. If you have a space as part of your ADB path, you're in for a world of pain.
This addressed a couple of issues but I'm sure there are more when you use it for more detailed use cases.
Closes https://github.com/facebook/flipper/issues/2438
Reviewed By: mweststrate
Differential Revision: D29061367
fbshipit-source-id: 001e498ac42bd8df6e6852be9b42fb5f38379c2e
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.4.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>7.4.6</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a ReDoS vulnerability (00c425ec).</li>
</ul>
<p>A specially crafted value of the <code>Sec-Websocket-Protocol</code> header could be used
to significantly slow down a ws server.</p>
<pre lang="js"><code>for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
const value = 'b' + ' '.repeat(length) + 'x';
const start = process.hrtime.bigint();
<p>value.trim().split(/ *, */);</p>
<p>const end = process.hrtime.bigint();</p>
<p>console.log('length = %d, time = %f ns', length, end - start);
}
</code></pre></p>
<p>The vulnerability was responsibly disclosed along with a fix in private by
Robert McLaughlin from University of California, Santa Barbara.</p>
<p>In vulnerable versions of ws, the issue can be mitigated by reducing the maximum
allowed length of the request headers using the <a href="https://nodejs.org/api/cli.html#cli_max_http_header_size_size"><code>--max-http-header-size=size</code></a>
and/or the <a href="https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener"><code>maxHeaderSize</code></a> options.</p>
<h2>7.4.5</h2>
<h1>Bug fixes</h1>
<ul>
<li>UTF-8 validation is now done even if <code>utf-8-validate</code> is not installed
(23ba6b29).</li>
<li>Fixed an edge case where <code>websocket.close()</code> and <code>websocket.terminate()</code> did
not close the connection (67e25ff5).</li>
</ul>
<h2>7.4.4</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a bug that could cause the process to crash when using the
permessage-deflate extension (92774377).</li>
</ul>
<h2>7.4.3</h2>
<h1>Bug fixes</h1>
<ul>
<li>The deflate/inflate stream is now reset instead of reinitialized when context
takeover is disabled (<a href="https://github-redirect.dependabot.com/websockets/ws/issues/1840">https://github.com/facebook/flipper/issues/1840</a>).</li>
</ul>
<h2>7.4.2</h2>
<h1>Bug fixes</h1>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f5297f7090"><code>f5297f7</code></a> [dist] 7.4.6</li>
<li><a href="00c425ec77"><code>00c425e</code></a> [security] Fix ReDoS vulnerability</li>
<li><a href="990306d144"><code>990306d</code></a> [lint] Fix prettier error</li>
<li><a href="32e3a8439b"><code>32e3a84</code></a> [security] Remove reference to Node Security Project</li>
<li><a href="8c914d18b8"><code>8c914d1</code></a> [minor] Fix nits</li>
<li><a href="fc7e27d12a"><code>fc7e27d</code></a> [ci] Test on node 16</li>
<li><a href="587c201bfc"><code>587c201</code></a> [ci] Do not test on node 15</li>
<li><a href="f672710797"><code>f672710</code></a> [dist] 7.4.5</li>
<li><a href="67e25ff502"><code>67e25ff</code></a> [fix] Fix case where <code>abortHandshake()</code> does not close the connection</li>
<li><a href="23ba6b2922"><code>23ba6b2</code></a> [fix] Make UTF-8 validation work even if utf-8-validate is not installed</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.3.0...7.4.6">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/2371
Reviewed By: passy
Differential Revision: D28714468
Pulled By: nikoant
fbshipit-source-id: c2a3a7091599f29d453a35bf89bab4a03817509c
Summary:
Added rules to ensure we properly propagate errors from promises.
Also found and fixed a place where promise function parameter was mismatched.
Reviewed By: mweststrate
Differential Revision: D28537820
fbshipit-source-id: b93f44274fc76544049813f645508cb78e432880
Summary: Allow the user to manually select a diff from a list of diffs they have authored to send a screen to. This is particularly useful for NT users.
Reviewed By: nscoding
Differential Revision: D27804191
fbshipit-source-id: 805923399f2ced8d9c3b3ca0c80d5cdfd63af4f8
Summary:
When trying to run some React component performance profiles, the updates registered made absolutely no sense (components rerendering without any parent or other cause causing them to render etc). That turned out to be caused by having an outdated version of the React devTools in Flipper.
Sadly the newer version of the React DevTools didn't work with our current Electron version anymore. Some horrible hacking is needed to work around that.
To help with updating the tools in the future (they are by default cached forever on the local machine), I've introduced the `FLIPPER_UPDATE_DEV_TOOLS` variable.
The plugin loading work around is inspired by https://github.com/electron/electron/issues/23662#issuecomment-787420799
Reviewed By: passy
Differential Revision: D27685981
fbshipit-source-id: c35e49aff9b2457b63122eeee0d5c042ddd3b08b
Summary:
Changelog: Added an explicit autoscroll indicator in logs and fixed snapping
We got several reports that auto scrolling was to aggressive, so revisited the implementation and the new one is a lot more reliable. Also added an explicit indicator / button to toggle tailing.
Exposed ant's active color as well in our theme, as it gives better contrast on the buttons than Flipper purple.
Reviewed By: passy
Differential Revision: D27397506
fbshipit-source-id: 5e82939de4b2f8b89380bd55009e3fa2a7c10ec9