Summary: Retrieve updated version in accordance to the currently selected release channel. Also changed message for "insiders" channel - removed mention of fbsource pinning.
Reviewed By: mweststrate
Differential Revision: D26011703
fbshipit-source-id: 7f3396e89db047cb24b4e00b224f79ca0fd64327
Summary: Enabled asar packaging for Flipper resources, and set PortForwardingMacApp as unpacked from it, because it is launched as external app.
Reviewed By: passy
Differential Revision: D26006771
fbshipit-source-id: 91c8401a469a390144bf9867996a66d754ea90e6
Summary:
As reported in https://fb.workplace.com/groups/flippersupport/permalink/1033379297142728/,
using keyboard shortcuts in one component, can change the state of another.
This was caused by two problems:
1. ManagedTable established a global keyboard listener, rather than a local one
2. The Layout Inspector did not stop its keyboard events from propagating up in the DOM
This diff fixes both issues
Reviewed By: timur-valiev
Differential Revision: D26018248
fbshipit-source-id: 23d9cc38ad56d47213cb553ffaf528b05fbe1929
Summary: Make settings dialog content scrollable, which is more natural than scrolling the entire window, as reported in https://fb.workplace.com/groups/flippersupport/permalink/1063196077494383/
Reviewed By: nikoant
Differential Revision: D26015864
fbshipit-source-id: 8c74e105c290e62313e332ed1b47040eff548a97
Summary:
Immer had security issues. Noobs.
Only the patches feature was affected, which at this moment isn't used by any known plugin, but just in case.
Reviewed By: passy
Differential Revision: D25993961
fbshipit-source-id: 9bfe7065c90865d912ebcfd14c1117697bf714f7
Summary: The default screen without any devices or magic GK's was a bit noisy, this diffs cleans it up
Reviewed By: jknoxville
Differential Revision: D25946004
fbshipit-source-id: 76b7eec16b433544e9872e726e8f57dd1ce02b0f
Summary: Based on discussion in D25805957 (ffeb47ed75), instead of showing a warning icon in the siderail, Flipper now shows a notification if there is a version / launcher issue or an update available
Reviewed By: nikoant
Differential Revision: D25924534
fbshipit-source-id: 625e46e41d9aa58f49e8bb77e5c513de0ddfbd6a
Summary: Replaced in-your-face warning with a but more subtle one. Means also less usage of component lib.
Reviewed By: nikoant
Differential Revision: D25944965
fbshipit-source-id: 02a66ff96df2ab8b648f8b8cbeb30d025adfd5a8
Summary: fb/App didn't really have a difference with fb-stubs/App, except that one checks for employee presence. However, since that is already controlled by config.checkFbEmployee, de-duped this to a single `<AppWrapper>` component, making the code a bit more easy to follow
Reviewed By: priteshrnandgaonkar
Differential Revision: D25824521
fbshipit-source-id: 8e16f0b29ec5d12475eaf14acd9dbc7df91191a2
Summary: The fb and non-fb sandy settings are now identical (see diff 1 of this stack), so inlined the component and dropped the files
Reviewed By: priteshrnandgaonkar
Differential Revision: D25824522
fbshipit-source-id: 5a388b3f7259cb96f0e45ceb3363c40e4f198d7b
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1816
Now that Sandy is the default in OSS builds as well, we can remove the temporarily title bar and switch to small topbar windows in Electron.
This diff removes any remaining elements in the titlebar
- version number went into the title bar
- the update check warning is shown on top of the bottom section of the left rail (orange triangle)
- the development only perf graphs are moved to the left bar as well and are now aligned vertically.
Reviewed By: jknoxville
Differential Revision: D25805957
fbshipit-source-id: fba4b60c246b8f5d99a93087af31af9ac55defe8
Summary: With Sandy we don't have a designed UI for the auto updater, and since this functionality has been disabled for almost a year, we can safely remove it for now until we have the underlying infra, and then rethink the UI if we ever re-introduce it
Reviewed By: passy
Differential Revision: D25804854
fbshipit-source-id: fd96624ffd44e373e8f2c454a67b3797b16779a6
Summary:
Removed all `GK.get('flipper_sandy') ` checks to make Sandy the default in public builds as well.
Changelog: Public OSS builds will now use Sandy by default
Reviewed By: passy
Differential Revision: D25803498
fbshipit-source-id: 17b0b431cd30ebcf1c308af0ce63a05b3798741e
Summary:
This fixes the issue raised [here](https://fb.workplace.com/groups/flippersupport/permalink/1059080941239230/) I added the `-l` tag which is for sending signal
{F360746398}
Reviewed By: jknoxville
Differential Revision: D25945336
fbshipit-source-id: a1d8eaf3888072a64ab682fbbc60c03c15ac023a
Summary:
Bumps [ws](https://github.com/websockets/ws) from 7.3.0 to 7.4.2.
<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.2</h2>
<h1>Bug fixes</h1>
<ul>
<li>Silenced a deprecation warning (d1a8af4d).</li>
</ul>
<h2>7.4.1</h2>
<h1>Bug fixes</h1>
<ul>
<li>Added a workaround for a double <code>'error'</code> event bug in Node.js < 13 which
caused an uncaught error during the WebSocket handshake (38d6ab3b).</li>
</ul>
<h2>7.4.0</h2>
<h1>Features</h1>
<ul>
<li>The callback of <code>WebSocketServer.prototype.handleUpgrade()</code> now takes the
client HTTP GET request as second argument (7d39f19e).</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li>Read-only properties are now read-only (eabed8fc).</li>
<li>The <code>CONNECTING</code>, <code>OPEN</code>, <code>CLOSING</code>, <code>CLOSED</code>, <code>binaryType</code>, <code>bufferedAmount</code>,
<code>extensions</code>, <code>onclose</code>, <code>onerror</code>, <code>onmessage</code>, <code>onopen</code>, <code>protocol</code>,
<code>readyState</code>, and <code>url</code> properties are now enumerable (2069e684).</li>
</ul>
<h2>7.3.1</h2>
<h1>Bug fixes</h1>
<ul>
<li>Improved <code>websocket.bufferedAmount</code> accuracy (e1349c04, a1629426).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d1a8af4ddb"><code>d1a8af4</code></a> [dist] 7.4.2</li>
<li><a href="48a2349d22"><code>48a2349</code></a> [pkg] Update eslint-config-prettier to version 7.1.0</li>
<li><a href="a2c0d447af"><code>a2c0d44</code></a> [minor] Silence deprecation warning</li>
<li><a href="c171962844"><code>c171962</code></a> [dist] 7.4.1</li>
<li><a href="38d6ab3b06"><code>38d6ab3</code></a> [fix] Handle cases where the <code>'error'</code> event is emitted multiple times</li>
<li><a href="3d5066a7ca"><code>3d5066a</code></a> [test] Check configurability and enumerability of WebSocket properties</li>
<li><a href="eb36a63183"><code>eb36a63</code></a> [dist] 7.4.0</li>
<li><a href="3f185bf34a"><code>3f185bf</code></a> [minor] Use the public <code>binaryType</code> property</li>
<li><a href="2069e68470"><code>2069e68</code></a> [fix] Fix the enumerability of some properties</li>
<li><a href="eabed8fcc3"><code>eabed8f</code></a> [fix] Make read-only properties read-only</li>
<li>Additional commits viewable in <a href="https://github.com/websockets/ws/compare/7.3.0...7.4.2">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/1827
Reviewed By: mweststrate
Differential Revision: D25870560
Pulled By: passy
fbshipit-source-id: e71365ab725d18bd89f93854087437703da477c4
Summary:
As reported in https://fb.workplace.com/groups/748354712423318/permalink/773382183253904/, special case no devices being present and suggest to launch an emulator.
Also extends `useStore()` hook to accept no arguments, in which case it works as Redux's own `useStore` hook, except that it is strongly typed.
Reviewed By: passy
Differential Revision: D25803497
fbshipit-source-id: d448ac41e0ba7b713ee883caeb27736a2901975c
Summary:
See previous diff, plugins that are not available during the initial client connection setup didn't show up in the UI, until selecting another device first. This diff fixes that by listening to the `plugins-change` event of the client.
Changelog: Fix issue where React Native plugins didn't show up in the Sandy layout
Reviewed By: passy
Differential Revision: D25755812
fbshipit-source-id: d865d912ecca85d868831c4da7c56b5f0be6c3bf
Summary: For Whitehat adjustment to work with flipper. I would like to enable running the su for emulators and rooted device to enable work with flipperr.
Reviewed By: jknoxville
Differential Revision: D25527298
fbshipit-source-id: 0d3f19891eec7c09d7136867a7aceea40aeac60d
Summary: [Reported in the support group](https://fb.workplace.com/groups/flippersupport/permalink/1040131853134139/), screen recording can't be stopped on Android Marshmallow (SDK version 23). This is because the shell commands used in screen recording are different in SDK 23 compared to higher SDK. First, `pgrep` in SDK 23 doesn't have `-L` option. Second, `ls -l` of SDK 23 returns different pattern; we've relied on the 5th number to indicate the file size of a video, while it is on 4th number for SDK 23.
Reviewed By: passy
Differential Revision: D25641605
fbshipit-source-id: 110cb779ef4b2dc63a862bf5e4e5f3a304a0d8ec
Summary:
Discovered while testing D25584424, Sandy can't be applied and unapplied by regularly changing the setting.
This diff forces restart Flipper to correctly apply or unapply Sandy. This diff adds forced restart updated setting to check if restart is needed or not. Then, it disables regular `Apply` when restart is needed
Reviewed By: nikoant
Differential Revision: D25632887
fbshipit-source-id: 88b31fd740d4a639e20fe45a82e2615b53cad5c3
Summary: Installed plugins loaded and make it impossible to debug plugin changes. We need to disable them by default for `yarn start`. To debug plugin installation and auto-update, need to use command `yarn start --plugin-auto-update` instead.
Reviewed By: passy
Differential Revision: D25639345
fbshipit-source-id: 99b59a90dc09ac33a3604487fe501774e5e6fc39
Summary: Flipper receives a lot of messages which cannot be handled when plugins unbundled. Showing them as warnings is un-actionable with such big amount, so I disabled them.
Reviewed By: mweststrate
Differential Revision: D25557790
fbshipit-source-id: 1a0bc3df2848b194b72ea6d775ffabe416672fee
Summary:
Allow "uninstallation" of bundled plugins which means we mark them as uninstalled and not auto-updating anymore. Uninstalled bundled plugins are shown in "Detected in App" section together with Marketplace plugins where user can install them back.
Changelog:
Plugins can be uninstalled from sidebar in new Sandy UI.
Reviewed By: passy
Differential Revision: D25557789
fbshipit-source-id: 751cad68456313c069af639584541086efc7102b
Summary: Electron/Node.js does not garbage collects unloaded modules by default. Need to cleanup require.cache to fully unload them.
Reviewed By: passy
Differential Revision: D25545962
fbshipit-source-id: 4dce32f39e22adcd2b4f5a55853551379e786e7b
Summary: After unbudling plugins users will need to manually install them. To simlify this transition we can auto-install favorite plugins on every app connection, so users won't need to install plugins which they marked as favorite before.
Reviewed By: passy
Differential Revision: D25538638
fbshipit-source-id: 4ac3ad0c8c026d149f7ce0c4af07da3e8b909772
Summary:
New UX/UI for plugin auto-updates based on Sandy:
- disabled plugins auto-updated silently without any notifications as there is no active state for them so there is nothing to loose.
- enabled plugins can have some state and user can actually work with them, so we cannot reload them automatically. Instead, we show notification in the top of the plugin container asking user to reload the plugin when she is ready.
- if the auto-updated plugin failed to reload - show error notification.
- for non-sandy we continue using notifications as before.
Reviewed By: mweststrate
Differential Revision: D25530384
fbshipit-source-id: de3d0565ef0b930c9343b9e0ed07a4acb51885be
Summary:
I've re-designed interfaces describing plugins as I found that mental overhead working with them became too expensive because of slightly flawed design. However this cascaded changes in many files so you can see how extensively these interfaces used in our codebase.
Before this change we had one interface PluginDetails which described three different entities: 1) plugins installed on the disk 2) plugins bundled into Flipper 3) plugins available on Marketplace. It's hard to use this "general" PluginDetails interface because of this as you always need to think about all three use cases everywhere.
After this change we have 3 separate interfaces: InstalledPluginDetails, BundledPluginDetails and DownloadablePluginDetails and things became much type-safer now.
Reviewed By: mweststrate
Differential Revision: D25530383
fbshipit-source-id: b93593916a980c04e36dc6ffa168797645a0ff9c
Summary: Show progress reporting in sidebar during plugin download. Also handle plugin download errors and show them to user as notifications.
Reviewed By: mweststrate
Differential Revision: D25530385
fbshipit-source-id: 42bf0e65b4434d00c1465705ce9ec5c723df6841
Summary: This diff changes uninstallation procedure for plugins. Instead of deleting plugin files immediately we are keeping them, but mark them as "uninstalled". This makes it possible to re-install plugins quickly in case when user clicked "delete" by mistake.
Reviewed By: mweststrate
Differential Revision: D25493479
fbshipit-source-id: 9ff29d717cdd5401c55388f24d479599579c8dd3
Summary: Added UI for uninstalling plugins from sidebar. To avoid confusion between "disable" and "uninstall" and to reduce possibility of errors when plugins uninstalled accidentally by misclicks, I made it only possible to uninstall plugins after they are disabled. So for enabled plugins two steps are required for uninstalling.
Reviewed By: mweststrate
Differential Revision: D25454117
fbshipit-source-id: 28e67dc1ff2d39ad67e6d2770302a996affd9723
Summary:
This diff adds "download" button to the plugins shown in "Detected in App" section, so they can be downloaded, installed and enabled just in one click.
For now UI is very simple - there is no progress indication and no error handling for failed downloads. I'll add them in next diffs.
Please note that we are explicitly "star" every installed plugin to enable it straight away without additional clicks in "disabled" section.
Reviewed By: mweststrate
Differential Revision: D25393472
fbshipit-source-id: 0a224ea6d03db0ee9a70b7fa35ede9616c03d824
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1761
Plugin installed logic is quite complex and heavily relies on file system. So I added integration tests which uses in-memory file system. Here I've covered complex functions added in the previous diff of this stack.
Reviewed By: mweststrate
Differential Revision: D25393473
fbshipit-source-id: a823eb7d6707152a1c3717a6da25b6beee85801d
Summary:
This diff changes directory structure for installed plugins to allow installation of multiple versions simultaneously, e.g. to to allow downloading new plugin version while user is still using the previous one, and to have possibility of fast rollback to the previous installed if necessary. The new folder for installed plugins is located in `~/.flipper/installed-plugins` and has the following structure:
flipper-plugin-reactotron
1.0.0
...
package.json
1.0.1
...
package.json
flipper-plugin-network
0.67.1
...
package.json
0.67.2
...
package.json
The tricky part here is that we also need to migrate already installed plugins from the old folder `~/.flipper/thirdparty` to the new folder and maintain the new structure for them.
Another tricky part is that we need to periodically cleanup old versions. For now we will just keep 2 versions of each plugin. Cleanup is performed in background right after Flipper startup.
Reviewed By: mweststrate
Differential Revision: D25393474
fbshipit-source-id: 26617ac26114148f797cc3d6765a42242edc205e
Summary:
New section "Detected in App" in the main sidebar showing plugins which are supported by the currently selected client app, but not installed in Flipper.
Note that in this diff we only show them, there is no "install" button yet. I will add it in a next diff.
Reviewed By: mweststrate
Differential Revision: D25361915
fbshipit-source-id: 8fff6887a8ec04b3b59c939a758c8f801f42490f
Summary:
Separate dispatcher for periodic refreshing available plugins data from the Marketplace backend and caching it locally.
The plugin auto update downloader subscribes to these state refreshes and automatically schedules plugin update downloads when required.
Reviewed By: passy
Differential Revision: D25360897
fbshipit-source-id: 5b6d95b63ff47b8ae9ad8b12e2480d1fed524ca5
Summary: Extracted plugin marketplace API to a separate file and updated it to load full plugin manifests.
Reviewed By: passy
Differential Revision: D25181759
fbshipit-source-id: a63f9ce16249ccc170df148cef5c209fdc6d4d6d
Summary:
Bumps [async-mutex](https://github.com/DirtyHairy/async-mutex) from 0.1.4 to 0.2.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/DirtyHairy/async-mutex/blob/master/CHANGELOG.md">async-mutex's changelog</a>.</em></p>
<blockquote>
<h2>0.2.6</h2>
<ul>
<li>Fix a nasty <a href="https://github-redirect.dependabot.com/DirtyHairy/async-mutex/issues/27">bug</a> related to
consecutive calls to <code>mutex::release</code>.</li>
</ul>
<h2>0.2.5</h2>
<ul>
<li>Nothing new thanks to NPM. Go away. Install 0.2.6.</li>
</ul>
<h2>0.2.4</h2>
<ul>
<li>Calling Semaphore::release on a semaphore with concurrency > 1 will not work
as expected; throw an exception in this case</li>
<li>Make the warning on using Semaphore::release and Mutex::release more prominent</li>
</ul>
<h2>0.2.3</h2>
<ul>
<li>Add alternate Semaphore::release and Mutex::release API</li>
<li>Work around build warnings with react native (and probably other bundlers)</li>
</ul>
<h2>0.2.2</h2>
<ul>
<li>Improve compatibility with older versions of node 13, thanks to <a href="https://github.com/josemiguelmelo">josemiguelmelo</a></li>
</ul>
<h2>0.2.1</h2>
<ul>
<li>Remove sourcemaps</li>
</ul>
<h2>0.2.0</h2>
<ul>
<li>Add a <code>Semaphore</code>, reimplement <code>Mutex</code> on top of it</li>
<li>Add a <code>withTimeout</code> decorator that limits the time the program waits
for the mutex or semaphore to become available</li>
<li>Support native ES6 imports on Node >= 12</li>
<li>Provide an ES6 module entrypoint for ES6 aware bundlers</li>
<li>Dependency bump</li>
<li>Switch from TSlint to ESlint</li>
<li>Enable code coverage in tests</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6cec83aa0b"><code>6cec83a</code></a> F*** NPM.</li>
<li><a href="2593cedbaa"><code>2593ced</code></a> Bump version.</li>
<li><a href="8331143c13"><code>8331143</code></a> Fix consecutive calls to mutex::release.</li>
<li><a href="e7bc6a43c9"><code>e7bc6a4</code></a> Dependency bump.</li>
<li><a href="2bfeb96e22"><code>2bfeb96</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/DirtyHairy/async-mutex/issues/24">https://github.com/facebook/flipper/issues/24</a> from nnoodle/master</li>
<li><a href="6191e6d22c"><code>6191e6d</code></a> Fixed a few spelling errors</li>
<li><a href="0ccb014c91"><code>0ccb014</code></a> Forbid Semaphore::release for concurrency > 1, documentation, bump version.</li>
<li><a href="391433bf0c"><code>391433b</code></a> Changelog, bump version.</li>
<li><a href="4b99572248"><code>4b99572</code></a> Add alternate release API.</li>
<li><a href="1dc676d2cf"><code>1dc676d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/DirtyHairy/async-mutex/issues/16">https://github.com/facebook/flipper/issues/16</a> from ranma42/patch-1</li>
<li>Additional commits viewable in <a href="https://github.com/DirtyHairy/async-mutex/compare/v0.1.4...v0.2.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/1748
Reviewed By: mweststrate
Differential Revision: D25373190
Pulled By: passy
fbshipit-source-id: 4e45c55391aa136c78abeeb25a0783a0d37ccbce
Summary:
A lot of the errors in our monitoring / logs are mere sign in errors. Many of them are unnecessary as they are features triggered automatically even when the user isn't logged in.
This diff improves error handling and prevents requires from being made / features from being used by introducing a `<RequireLogin>` component that will hide an underlying feature if the user isn't logged in.
This also prevents the support request form from failing after the user has filled in all details.
This also fixes an issue where mobilebuilds plugin didn't refresh after the user did log in.
From our monitoring error 1,9 and 10:
{F350458668}
Reviewed By: jknoxville
Differential Revision: D25494356
fbshipit-source-id: 95701381bb74c27b9ea9658dc4df678e5f0710e0