Summary:
Users passing the GK `flipper_layout_inspector_new` will see then new layout inspector instead of the old one.
Hopefully users won't realize that they are on the new Layout Inspector. To make them aware of it, I added a bar on the bottom linking to the support group that is used for the GK.
Reviewed By: jknoxville
Differential Revision: D14100392
fbshipit-source-id: 78d561a3ab8ac035e5b439799c395901be086b1b
Summary: Adding the searchbar to layout inspector. Most of it's functionality is taken from the existing implementation.
Reviewed By: jknoxville
Differential Revision: D14100533
fbshipit-source-id: 6c3a49658d53c676489886b2599bef425f8f20d3
Summary:
This is mostly only moving the Sidebar from the old LayoutInspctor to a separate file. The old file was part of the UI component, however, it was super specific to the layout inspector, so I felt it makes sense moving it there.
Here is a diff between the new `src/plugins/layout/layout2/InspectorSidebar.js` and `src/ui/components/elements-inspector/sidebar.js`: P60951781
The old file is still kept around, as long as the old and new layout inspector are run side by side.
Reviewed By: passy
Differential Revision: D14100537
fbshipit-source-id: b5a6fbae9866732800bb9b2b8fb1b996b9861db6
Summary:
This is refactoring the layout inspector. The old layout inspector was a single file with more than 1200 LOC which was really hard to debug and extend. This aims for splitting it up into smaller, easier to maintain components.
This version of the layout inspector only shows the view hierarchy for the regular view tree and the a11y tree. Additional features are added in stacked diffs.
Reviewed By: jknoxville
Differential Revision: D14100536
fbshipit-source-id: ca5e22dbb6ed9e34ce208a2a699ebfeb083904ad
Summary: Adding a ToolbarIcon component that displays an icon in the toolbar that can be toggled on and off. This is used in subsequent diffs.
Reviewed By: passy
Differential Revision: D14100393
fbshipit-source-id: d814b52cf77585c4e8d090e11399e005713efb5e
Summary: Adds requestTimestamp, and responseTimestamp which is hidden by default.
Reviewed By: passy
Differential Revision: D14088403
fbshipit-source-id: c451a428d8068c5bfce199cda5502361c12d1667
Summary: Looks like a left over debug log
Reviewed By: danielbuechele
Differential Revision: D14086508
fbshipit-source-id: 6bf3ef40746d8d248ed38071107cae00ba3040f9
Summary:
Adds a warning when not in production and client.send() is used.
We could just delete it but there may be open source users of the API.
Reviewed By: passy
Differential Revision: D14085002
fbshipit-source-id: 39f965b59540bd5b7059ec8d6b1c274146699d2d
Summary: client.send will be deprecated because it doesn't allow handling or detection of errors.
Reviewed By: passy
Differential Revision: D14084786
fbshipit-source-id: 7ebe4a7f3f8536c705e1c9302f38db0a34d99dc4
Summary:
Unified all imports of Logger. Some were called LogManager before.
Now the fb-stub and the fb variants use the same interface.
Constructor of Logger is no longer exposed so it can't be initialized twice, unless in the case you're explicitly using the fb variant, which has extra functionality.
Reviewed By: danielbuechele
Differential Revision: D14083929
fbshipit-source-id: 9b61a06e1264d5f142b5a9188465c99deaf18193
Summary:
init() was being misused. This returns a Logger instance, so there's no need to create one as well.
This was a problem because different arguments were being passed to each (isHeadless in this case).
Reviewed By: passy
Differential Revision: D14083320
fbshipit-source-id: b0001a2b3cdd914609d54382575e3b0fa4b5f077
Summary:
This diff adds archived device type. This diff solves the following two problems.
- The Plugin which are device plugins and are device plugins will not show up. Look at the video, where the CPU plugin was showed, even though the imported file didn't have any information.
- An icon of 📦 will make much clearer which one is archived device and which isn't
Reviewed By: passy
Differential Revision: D14066399
fbshipit-source-id: 59b740d7fe9532e665d6b1ec6ad0124fb63ac45d
Summary:
Allows the launcher to provide messages to the user. Currently, in the form
of the red notification bar at the bottom. This is just meant as a temporary measure
during the alpha to have some clearly noticeable way of getting the user's attention.
I consider removing this a blocker for the release as this mechanism is not well
suited for this in many ways.
The current use case for this is providing a warning if a cached version is used
instead of the requested one, e.g. "Could not fetch requested Flipper version 'deadbeef', using cached version instead."
Reviewed By: jknoxville, priteshrnandgaonkar
Differential Revision: D14073687
fbshipit-source-id: 85630347027063103315eeb1286731fe2478e261
Summary: Going to deprecate send, so changing these to call so the plugins can respond to errors.
Reviewed By: passy
Differential Revision: D14066981
fbshipit-source-id: 440563f1bf1a1a145fcfd0e6f36af63bf27836ed
Summary:
- handles the case when log is not present
- solved the cpu plugin error
- now `fileversion` is the flipper version
Reviewed By: jknoxville, danielbuechele
Differential Revision: D14065882
fbshipit-source-id: f88414bbb3d766f8ab6e0ec00943b59738918a0e
Summary: Before this diff, if one imported same file twice, it duplicated app data.This diff fixes that. When one tries to import the already imported file then this diff will select that flipper files device in the UI.
Reviewed By: jknoxville
Differential Revision: D14045145
fbshipit-source-id: f17c83486ffcdb0e2a57c70b1589e34567811d01
Summary:
So we can distinguish between humans and the machines.
We can redirect the traffic to different tables based on this attribute if necessary.
Reviewed By: danielbuechele
Differential Revision: D14025004
fbshipit-source-id: c3a24b5f8a30f24445eaee67843b78ddabfc9d51
Summary: This diff imports and exports data in a `.flipper` file extension. This diff also adds the support to open flipper app by double clicking on the `.flipper` file.
Reviewed By: danielbuechele
Differential Revision: D14042846
fbshipit-source-id: 17e6b55bf2796d9abdf985411fce799600f7792b
Summary: This diff adds import and export support for the logs plugin
Reviewed By: danielbuechele
Differential Revision: D13958713
fbshipit-source-id: a072de025f0b959302175ef0ccaf763ca41377e9
Summary:
This diff solves the following bug.
When the user imports the exported flipper data for the device which is currently running, there was a bug. A duplicate device with the same serial got created after importing the file. Due to the same `device_id`, the plugins of the exported device got imported in the already running device(which has the same device id).
To solve this problem, I have prefixed the exported `device_id` with a random string, so that the exported device is unique across the device list in the Flipper app.
Look at the vide to understand the bug
Also updated the test case accordingly
Reviewed By: danielbuechele
Differential Revision: D13973180
fbshipit-source-id: df6ee00987e81923914855cea4d76e2bd7167358
Summary:
Now that flipper is using rsocket requestResponse, the SDK is responding with an error when the connection for this plugin has been torn down.
To avoid flipper interpreting these as bad, keep track of which plugins are inited, and only worry about responses from these.
Reviewed By: danielbuechele
Differential Revision: D13973745
fbshipit-source-id: d4e6916f89b3b562e5dcf23c4fe5b5cb384a6ec4
Summary: So we can see usage of old sdks.
Reviewed By: passy
Differential Revision: D14022623
fbshipit-source-id: 22f0681cbf4374e2cf3256e1049d154789e1959e
Summary:
Changes the desktop app to use requestResponse for communicating with the sdk, when the sdk is on a version that can handle it.
If it's an old sdk version, just use fire and forget. We can delete this code after a while, but keeping it for now to smooth things over during migration.
This should be fully backwards compatible both ways.
Reviewed By: passy
Differential Revision: D13971354
fbshipit-source-id: 60e18dda5c253c81ab7e62ca1aae4f4bc423f7e2
Summary:
Manually add `serial.srl` as the `CAserial` param to `openssl`. This
fixes a permissions issue when generating certificates, which fixes some
of the issues explained in #101.
Pull Request resolved: https://github.com/facebook/flipper/pull/227
Reviewed By: passy
Differential Revision: D9316089
Pulled By: jknoxville
fbshipit-source-id: dd15e2f2f318d3a1217c6b4ffd0bb7e25b56d560
Summary: support for DEVICE_SET_PATH as used by 1W
Reviewed By: passy
Differential Revision: D14007285
fbshipit-source-id: 79f40355020c67efcb439f470af2fc35ec7fea7e
Summary:
This whitelist exists to prevent unauthorized code execution. But there's no need to exclude _, which is a valid character in android app names.
Pull Request resolved: https://github.com/facebook/flipper/pull/368
Reviewed By: passy
Differential Revision: D13987022
Pulled By: jknoxville
fbshipit-source-id: 920c5906513af9ba00ae6626b4790dfd021fe4a0
Summary: While running in dev mode, there are no bundled plugins. This was causing an error messages being logged. Now we early return an empty array to prevent the error.
Reviewed By: passy
Differential Revision: D13971930
fbshipit-source-id: 4110a3ea5d6d2e60b3de17a43d497a3727b8e441
Summary:
Moves the JSON config access to one module instead of
ad-hoc de-serialising the object all over the place.
This also adds a type for it so we hopefully won't typo things that easily.
Reviewed By: danielbuechele
Differential Revision: D13956612
fbshipit-source-id: 48098deafedf18cc86c8802a3c40fba9394b8262
Summary:
Instead of using IOSDevice, used ArchivedDevice, as it doesn't instantiate the loglistener which printed erros in the console when one ran the tests.
Look at the attached task.
Reviewed By: passy
Differential Revision: D13941803
fbshipit-source-id: 3e504a02522719985afaad25caf4d2a576bfc338
Summary: This diff adds support to specify custom location to save the flipper data to be exported
Reviewed By: passy
Differential Revision: D13916944
fbshipit-source-id: cfe816d07eb505d99c00f7798f3a97a2093ab265
Summary:
This diff adds the feature to import the exported flipper data. It has the following features
- Dialog to select the file
- Merges the data with an existing store.
Reviewed By: danielbuechele
Differential Revision: D13901944
fbshipit-source-id: 1b9755735419732a34254bdc39d911bcb51ad8fe
Summary:
This seems like a better approach than ad-hoc lookup in
`electron.remove.argv`. Left a note to a task to provide
a better interface to this.
I also need this in order to ensure we're starting
Flipper through the launcher which needs to happen
before we start the Electron runtime.
Reviewed By: jknoxville
Differential Revision: D13881355
fbshipit-source-id: 69c70d71035a47084f789ddb4dc969b45ba4648b
Summary: listening on `SIGINT` events and putting the serialized store to stdout.
Reviewed By: passy
Differential Revision: D13878051
fbshipit-source-id: 19c1d857a299ed9a474605169c54e5359e0515bd
Summary:
For the electron build, plugins are bundled with the app and loaded from there at launch. The headless version can't require from its binary, so plugins need to be required from another path.
This diff makes the path where bundled plugins are loaded from adjustable via an environment variable: `BUNDLED_PLUGIN_PATH`. If it's set, the plugins are loaded from this path, otherwise we default to the old behaviour of including them from `./defaultPlugins`.
For the headless version we expect the plugins to be in a folder called `plugins` next to the executable. This should later be configurable via an argument passed to the CLI.
Reviewed By: passy
Differential Revision: D13843676
fbshipit-source-id: 04237ae6631b4f2ba56887fe992a56f860724edc
Summary:
Pixels don't seem to allow modifying the modification time
of files on the "sdcard". You can repro this by getting a Pixel
device and running
```
$ adb shell touch /sdcard/boop
$ adb shell touch /sdcard/boop
touch: '/sdcard/boop': Invalid argument
```
Access time seems to work, strangely enough, but I'd rather
not play games and just create an empty file instead with echo.
Reviewed By: danielbuechele
Differential Revision: D13941381
fbshipit-source-id: 1321482a07a6698aa5eaf71e5a022c8e7dfe0b18
Summary:
Instead of replacing the tilde with home-dirs on an incomplete, ad-hoc
basis, let's use a package for this. It also supports `~USER` resolution
which someone might reasonbly expect to work if `~/DIR` is working.
Reviewed By: jknoxville
Differential Revision: D13940956
fbshipit-source-id: 5bfa9b8b2540fed8c05c856ff736e48e925f985d
Summary: This diff makes sure that flipper error notifications are triggered only on the non-prod builds. Ideally we should have a preference in the flipper app itself, this we can work out later. As this diff solves the issue posted in the [group](https://fb.workplace.com/groups/230455004101832/permalink/561100837703912/).
Reviewed By: passy
Differential Revision: D13923819
fbshipit-source-id: 6598f00ab3a7b0c4a3b783120e62a1796fe4e5d2
Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13900794
fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
Summary: Exposes crash reporter plugin and export data functionality to open source
Reviewed By: passy
Differential Revision: D13879149
fbshipit-source-id: ee10097cc9ff1af11e0350f50c855d7766076cd1
Summary:
Adds an optional "plugin" field to the tracked metrics. The idea is to be able to see failures in plugins.
Added it around all desktop -> sdk "call"s, so it won't require any effort from developers but we'll get lots of immediate data. E.g. How often layout -> getNodes fails. I think we can go modify the existing pipeline to take both platform and plugin data so we can get session roll-ups too.
Corresponding change to the puma app: D13882629, adds a plugin field to all tables so we can filter by plugin, or null for platform failures.
I'm thinking it will be worthwhile to expose some method to plugin developers, that lets them explicitly track failures. It would be better if it encapsulated their plugin id etc, so they just need to say what failed. But that can be done any time, I don't have any particular use cases in mind yet.
Reviewed By: passy
Differential Revision: D13878379
fbshipit-source-id: 2e2ef6b98f763e6edcfe937741d6988dae4b92d1
Summary: Change from `recordSuccessMetric` to `reportPlatformFailures`, because the next diff adds `reportPluginFailures` and I want to distinguish the two.
Reviewed By: passy
Differential Revision: D13878380
fbshipit-source-id: 9c6b8bfe1ed2e1a8bbe5aacbec31d24e9aa39171
Summary:
The function itself can easily be pure. Let's have the side-effects
(lookup of env variable and error handling) outside of it. Also
prevents spam in the test log (which I intend to make a test failure
going forwards).
Current output:
{F149794656}
Reviewed By: jknoxville
Differential Revision: D13894995
fbshipit-source-id: dacf51f8b35cb427740f9566ef993ffc6b2c3906