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
Summary:
Bumping everything that's just a patch version behind or safe-looking minor change.
Just hoping to get ahead of dependabot's next run.
Reviewed By: fabiomassimo
Differential Revision: D27367567
fbshipit-source-id: 1bf8bad02e5a9f07f5982466254f9906581230cf
Summary:
Flipper used to always subscribe to the adb logs. This change makes the log subscription lazy, which means if there are no plugins listening to the logs, we don't subscribe to the adb logs at all. As you can see in the recording (prod build) this lowers CPU usage significantly: without logs plugin disabled it is now ~5-8 %, with the plugin enabled ~12-18%. Before this change we would never stop listening to the log output, even when the plugins were disabled, causing a constant background noise which people complain regularly about.
The pause / resume button in the new log plugin will now cleanup the connection as well, so that a simple 'pause' click will already boost performance, without needing to disable the logs plugin (if crash reporter is not enabled)
In this diff we also will clear the logs when reconnected. Previously we didn't reset the logs after connecting, we means Flipper would try to gets up with all past logs first, which could be a few 100 K entries.
Further future optimizations could involve using logcat smarter; by actually passing filters on app or loglevel to the command (not sure if that is actually faster, or just a convenience api that does the same filtering as we do)
Changelog: Flipper will now use less CPU if logs & crash reporter plugins are disabled by no longer tailing adb logcat.
Reviewed By: nikoant
Differential Revision: D27047041
fbshipit-source-id: 251a04dcc6f488f220cb56fe50a26788d795e38c
Summary: Gave every device an icon, and use it as fallback in case we don't have a client icon. Added an icon for the Flipper client. This gets (largely) rid of the 'blank' icons
Reviewed By: fabiomassimo
Differential Revision: D26691054
fbshipit-source-id: d83012e755ae5edb230747e88f9b2eac45450b19
Summary:
- populate the state
- will render some UI that you can reload
- next up showing the diff number and title
Differential Revision: D26477472
fbshipit-source-id: d5c5175771c324c9f893a6b6c6a14a40a2f0f0fe