Commit Graph

3131 Commits

Author SHA1 Message Date
Anton Kastritskiy
499fd6b6cd ignore manifest.json
Summary: continuation of D45950055

Reviewed By: lblasa

Differential Revision: D46105664

fbshipit-source-id: 837575c3f92a9ff2876beed1c945f48a9086c345
2023-05-23 08:58:24 -07:00
Anton Kastritskiy
fda21e96e8 Update typescript to 4.9.5
Reviewed By: passy

Differential Revision: D46068908

fbshipit-source-id: 4c1ffff8690eec5a10c67d6c5d1aacf224e0f0d4
2023-05-23 03:15:10 -07:00
Andrey Goncharov
4dba523757 Remove unused patches
Summary: Fixes Github CI failures on main (see T153688440)

Reviewed By: lblasa

Differential Revision: D46016296

fbshipit-source-id: 61c624797aa4a9a967b7c9f81fbe71b5908de236
2023-05-19 10:48:06 -07:00
Andrey Goncharov
d078a89e83 Skip token verification if a special env variable is passed
Summary: Recently , we started verifying a special token for every websocket connection. It made e2e tests fail. We are going to use this bypass flag in jest e2e envs.

Reviewed By: lblasa

Differential Revision: D46025343

fbshipit-source-id: c2e6e0b561286fb8b571565243a45cdfb56a54a9
2023-05-19 10:19:10 -07:00
dependabot[bot]
f65c99c6b2 Bump deep-equal from 2.0.5 to 2.2.1 in /desktop (#4729)
Summary:
Bumps [deep-equal](https://github.com/inspect-js/node-deep-equal) from 2.0.5 to 2.2.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/inspect-js/node-deep-equal/blob/master/CHANGELOG.md">deep-equal's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/inspect-js/node-deep-equal/compare/v2.2.0...v2.2.1">v2.2.1</a> - 2023-04-27</h2>
<h3>Commits</h3>
<ul>
<li>[Tests] add passing tests covering object key ordering <a href="51c9ff6b4c"><code>51c9ff6</code></a></li>
<li>[Refactor] use <code>array-buffer-byte-length</code> <a href="f47822cf0c"><code>f47822c</code></a></li>
<li>[Deps] update <code>is-array-buffer</code>, <code>regexp.prototype.flags</code> <a href="160d851333"><code>160d851</code></a></li>
<li>[Deps] update <code>es-get-iterator</code>, <code>get-intrinsic</code> <a href="2e08e956a4"><code>2e08e95</code></a></li>
<li>[Dev Deps] update <code>object.getownpropertydescriptors</code> <a href="63e9ab7450"><code>63e9ab7</code></a></li>
<li>[Dev Deps] update <code>tape</code> <a href="c8db964f60"><code>c8db964</code></a></li>
</ul>
<h2><a href="https://github.com/inspect-js/node-deep-equal/compare/v2.1.0...v2.2.0">v2.2.0</a> - 2023-01-05</h2>
<h3>Commits</h3>
<ul>
<li>[New] add support for <code>SharedArrayBuffer</code> <a href="0ef51c79b7"><code>0ef51c7</code></a></li>
<li>[Refactor] use <code>is-array-buffer</code> package <a href="0360ee1f1b"><code>0360ee1</code></a></li>
<li>[Fix] <code>whichTypedArray</code> can return false in both cases <a href="df3e3c4e30"><code>df3e3c4</code></a></li>
<li>[Dev Deps] update <code>aud</code>, <code>object.getownpropertydescriptors</code> <a href="6d62ea4f2b"><code>6d62ea4</code></a></li>
<li>[Dev Deps] update <code>ljharb/eslint-config</code> <a href="15aab59d64"><code>15aab59</code></a></li>
<li>[Deps] update <code>which-typed-array</code> <a href="8dfce27f33"><code>8dfce27</code></a></li>
<li>[eslint] remove <code>.eslintignore</code> <a href="af46773b28"><code>af46773</code></a></li>
</ul>
<h2><a href="https://github.com/inspect-js/node-deep-equal/compare/v2.0.5...v2.1.0">v2.1.0</a> - 2022-11-02</h2>
<h3>Fixed</h3>
<ul>
<li>[New] add support for <code>ArrayBuffer</code> <a href="https://redirect.github.com/inspect-js/node-deep-equal/issues/94"><code>[https://github.com/facebook/flipper/issues/94](https://github.com/inspect-js/node-deep-equal/issues/94)</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>[actions] reuse common workflows <a href="12de2873de"><code>12de287</code></a></li>
<li>[actions] use <code>node/install</code> instead of <code>node/run</code>; use <code>codecov</code> action <a href="ec248b96f4"><code>ec248b9</code></a></li>
<li>[Tests] run assert tests on a dynamic matrix <a href="695aebd509"><code>695aebd</code></a></li>
<li>[readme] add badges <a href="492e159158"><code>492e159</code></a></li>
<li>[Test] ArrayBuffers in node &lt; 0.12 have a nonconfigurable own <code>byteLength</code> property <a href="40f4b87196"><code>40f4b87</code></a></li>
<li>[meta] use <code>npmignore</code> to autogenerate an npmignore file <a href="2627269314"><code>2627269</code></a></li>
<li>[Dev Deps] update <code>eslint</code>, <code>ljharb/eslint-config</code>, <code>safe-publish-latest</code>, <code>tape</code> <a href="7a05bb7482"><code>7a05bb7</code></a></li>
<li>[Deps] update <code>call-bind</code>, <code>es-get-iterator</code>, <code>get-intrinsic</code>, <code>is-arguments</code>, <code>is-regex</code>, <code>regexp.prototype.flags</code>, <code>side-channel</code>, <code>which-boxed-primitive</code>, <code>which-typed-array</code> <a href="c0844e629b"><code>c0844e6</code></a></li>
<li>[actions] update codecov uploader <a href="b1b0552fe3"><code>b1b0552</code></a></li>
<li>[Dev Deps] update <code>eslint</code>, <code>ljharb/eslint-config</code>, <code>aud</code>, <code>auto-changelog</code>, <code>has-symbols</code>, <code>object.getownpropertydescriptors</code>, <code>tape</code> <a href="9a1ccf5285"><code>9a1ccf5</code></a></li>
<li>[meta] do not publish github action workflow files <a href="2d63384d66"><code>2d63384</code></a></li>
<li>[actions] update rebase action to use reusable workflow <a href="69d21f55af"><code>69d21f5</code></a></li>
<li>[Dev Deps] update <code>eslint</code>, <code>ljharb/eslint-config</code>, <code>aud</code>, <code>has-symbols</code>, <code>object.getownpropertydescriptors</code>, <code>tape</code> <a href="297aae88f6"><code>297aae8</code></a></li>
<li>[Tests] add tests for regexes with the same source but different flags <a href="29c8a0da09"><code>29c8a0d</code></a></li>
<li>[Dev Deps] update <code>eslint</code>, <code>ljharb/eslint-config</code> <a href="9e64ec93a8"><code>9e64ec9</code></a></li>
<li>[Deps] update <code>is-arguments</code>, <code>is-date-object</code>, <code>is-regex</code>, <code>which-typed-array</code> <a href="edfb752810"><code>edfb752</code></a></li>
<li>[Dev Deps] update <code>eslint</code>, <code>ljharb/eslint-config</code>, <code>auto-changelog</code>, <code>tape</code> <a href="7b5f7a348b"><code>7b5f7a3</code></a></li>
<li>[Dev Deps] update <code>eslint</code>, <code>ljharb/eslint-config</code>, <code>has-typed-arrays</code>, <code>tape</code> <a href="e328a237ba"><code>e328a23</code></a></li>
<li>[Deps] update <code>get-intrinsic</code>, <code>regexp.prototype.flags</code>, <code>which-typed-array</code> <a href="29123a7185"><code>29123a7</code></a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6ea6b8d296"><code>6ea6b8d</code></a> v2.2.1</li>
<li><a href="f47822cf0c"><code>f47822c</code></a> [Refactor] use <code>array-buffer-byte-length</code></li>
<li><a href="160d851333"><code>160d851</code></a> [Deps] update <code>is-array-buffer</code>, <code>regexp.prototype.flags</code></li>
<li><a href="63e9ab7450"><code>63e9ab7</code></a> [Dev Deps] update <code>object.getownpropertydescriptors</code></li>
<li><a href="2e08e956a4"><code>2e08e95</code></a> [Deps] update <code>es-get-iterator</code>, <code>get-intrinsic</code></li>
<li><a href="c8db964f60"><code>c8db964</code></a> [Dev Deps] update <code>tape</code></li>
<li><a href="51c9ff6b4c"><code>51c9ff6</code></a> [Tests] add passing tests covering object key ordering</li>
<li><a href="b9d9e54c27"><code>b9d9e54</code></a> v2.2.0</li>
<li><a href="0ef51c79b7"><code>0ef51c7</code></a> [New] add support for <code>SharedArrayBuffer</code></li>
<li><a href="0360ee1f1b"><code>0360ee1</code></a> [Refactor] use <code>is-array-buffer</code> package</li>
<li>Additional commits viewable in <a href="https://github.com/inspect-js/node-deep-equal/compare/v2.0.5...v2.2.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=deep-equal&package-manager=npm_and_yarn&previous-version=2.0.5&new-version=2.2.1)](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/4729

Reviewed By: passy

Differential Revision: D46016549

Pulled By: ivanmisuno

fbshipit-source-id: bbce2af026fba2c5d7622c4593b241155cc6e82e
2023-05-19 05:40:02 -07:00
Andrey Goncharov
898e9c3b07 Update adbkit and logcat to maintained librarys
Summary:
We were using an old unmaintained/abandonned library for communicating with adb server https://github.com/openstf/adbkit

This was giving me issues i couldnt figure out when running flipper server.

There is a popular fork written in typescript here https://github.com/DeviceFarmer/adbkit but it uses blue bird for promises.

There is a fork of the fork here which i have chosen to use which is the same api as above but with es6 promises, https://github.com/UrielCh/adbkit.

Both forks have a slightly different api to the original. In the original library there was a single client and any command directed at a particular device had a serial as the first argument

In the new libraries you create a DeviceClient where the serial is baked in and you don't need to supply this argument every time

allow-large-files

Reviewed By: lblasa

Differential Revision: D45569652

fbshipit-source-id: 2a23c0eaa12feaebdccadb3d343e087c0d5708d5
2023-05-18 09:56:41 -07:00
generatedunixname89002005306973
55271bcfa4 Flipper Release: v0.191.0
Summary: Releasing version 0.191.0

Reviewed By: lblasa

Differential Revision: D45986192

fbshipit-source-id: 15f544da6c3904647ffd4c9b165042ab66fef933
2023-05-18 09:12:47 -07:00
Lorenzo Blasa
8400e6b240 Don't ask to install PWA if running as Electron
Summary:
I had wrongly assumed the display mode was standalone for Electron, but it turns out that is not the case.

So, explicitly prevent showing the wizard in Electron builds.

Reviewed By: antonk52

Differential Revision: D45983295

fbshipit-source-id: 0bd770d28c0e52a7417789751ac78c5f84165d86
2023-05-18 06:29:00 -07:00
Aria Fallah
0d34662698 Support the monaco editor in flipper and add it to the smax plugin
Summary:
## Context

The editor for mocks is currently just a textarea. It'd be nicer as a monaco editor :D

## Changes
* Add monaco editor
* Change bundler for flipper plugins to allow loading .ttf as `dataurl`
* Resize the input/button for name and save and put them at the top next to each other
* Add a default mock template for when the editor is empty

allow-large-files

Reviewed By: aigoncharov

Differential Revision: D45929635

fbshipit-source-id: 66f3103d073ac630cb41d21f2ce3a7f89e15fed8
2023-05-17 21:16:31 -07:00
Lorenzo Blasa
e272705af3 Add button to attempt start Flipper server
Summary: If Flipper server is not running, the offline landing site will offer an option to start it by trying to open 'start-server' under the `flipper-launcher://` scheme.

Reviewed By: mweststrate

Differential Revision: D45950872

fbshipit-source-id: 0d4e22c8474413e914c3c7b4fc9154ae628a8b42
2023-05-17 11:01:37 -07:00
Lorenzo Blasa
1a6fac2a50 Only show PWA wizard in production
Summary: ^

Reviewed By: antonk52

Differential Revision: D45942615

fbshipit-source-id: e759da943396d85cd68169f79818d7037f5a940b
2023-05-17 03:50:40 -07:00
Lorenzo Blasa
7386608a53 Track token validation
Summary: ^

Reviewed By: antonk52

Differential Revision: D45864358

fbshipit-source-id: c043555c5dd3050503115a22982162ec16aba40f
2023-05-16 04:32:47 -07:00
Lorenzo Blasa
5830333e0d PWA installation wizard usage tracking
Summary: Get some metrics from the PWA installation wizard.

Reviewed By: antonk52

Differential Revision: D45863352

fbshipit-source-id: 1cf8912a47c749b3b2c2e573796ee1935ea172c9
2023-05-16 04:32:47 -07:00
Lorenzo Blasa
c6d5eb3334 Flipper as PWA
Summary:
^

Reference: https://docs.google.com/document/d/1flQJUzTe4AuQz3QCpvbloQycenHsu7ZxbKScov7K7ao

Reviewed By: passy

Differential Revision: D45693382

fbshipit-source-id: 5a2e6c213a7e7e2cf9cd5f3033cff3e5291a2a92
2023-05-16 04:32:47 -07:00
Lorenzo Blasa
47a4c10c67 Improve error logs readability
Summary:
Setting the background to red for error logs has a lot of implications for all text colouring inside of its container.

Instead, set the error border to red, which gives a clear error indication whilst making things easier to read.

changelog: Improve console error logs readability

Reviewed By: mweststrate

Differential Revision: D45861604

fbshipit-source-id: 51f557451ac16269b69ff830a26328552e134ee5
2023-05-15 05:35:32 -07:00
Luke De Feo
cd67ce59f7 Improve selection / hovered state of visualiser
Summary:
Previously we used an overlay to indicated selected but this was kind of hard to see due to <1 opacity. I think this approach where we enchance the border is clearer.

Also we used border colour earlier to indicate type of node which i think was never obvious to the user. Given that nodes heavily overlap we should remove this design language

changelog: UIDebugger, improve selected and hover state of the visualiser

Reviewed By: antonk52

Differential Revision: D45737758

fbshipit-source-id: 5299043656787d6479cff6ec2b38cebe8417fd53
2023-05-11 08:15:19 -07:00
Andrey Goncharov
33ae7f23db Fix column sorting not visible
Summary: Fixes a regression from D45394048. It "sortable" as a nullable column prop. When it is undefined it should be treated as true.

Reviewed By: LukeDefeo

Differential Revision: D45776216

fbshipit-source-id: dcd8ce97217086deab7b2b1852837fbfa7437d13
2023-05-11 08:14:05 -07:00
Anton Kastritskiy
94482f9782 limit vscode code action apply to eslint only
Summary:
I accidentally used vscode. I acctidentally used an await keyword in a sync funciton. typescript has an codeaction to add an async to the function which was out of my screen. This changed the function return type to promise which caused other errors around the codebase and it took me a while to figure out where the error was coming from.

All eslint code actions are safe to apply which is not the case with typescript. Thus making this change.

Reviewed By: lblasa

Differential Revision: D45773531

fbshipit-source-id: 1f8835c442d7703644b1af729ab55fcef7d5be73
2023-05-11 07:30:07 -07:00
Anton Kastritskiy
4ad54db723 eslint warn on non null assertions
Summary:
Let's ban the non null assertion syntax `maybeNull!` as it is unsafe and can cause unexpected behavior. Ideally this should be an error or require a comment explaining why the value cannot be nullish. Though, there are 468 occurrences around the codebase and it is not worth it to manually go around fixing it now. Thus I used a warn to still warn developers to avoid the use where possible.

Last week I spend over an hour on debugging something where the code was null-asserted as the developer thought the value could never be null while in reallity it could. Adding a runtime check in this case sounds reasonable.

rule docs
https://typescript-eslint.io/rules/no-non-null-assertion/

Reviewed By: nikoant

Differential Revision: D45773327

fbshipit-source-id: 9e8a40af353ce979f469ffaedd8e777d72500dab
2023-05-11 07:30:07 -07:00
Lorenzo Blasa
a96caacb2b EnvironmentInfo as argument to start server
Summary:
Clean initialisation by passing down the environment info to start server.

(Also rename dir to path as that's the name used in other places)

Reviewed By: passy

Differential Revision: D45731751

fbshipit-source-id: a60fdd49c567fc312d1f8da72db3a46a0828c140
2023-05-11 04:10:16 -07:00
Luke De Feo
0f9eeda2dd Remove ctrl to stop drawing children
Summary: This feature is annoying and useless

Reviewed By: antonk52

Differential Revision: D45696921

fbshipit-source-id: 01c007d3e196a7511b940b7973bb8e6a880e27e5
2023-05-10 09:14:47 -07:00
Luke De Feo
da268f0095 Bump mock-fs
Summary: various tests failing due to this dep

Reviewed By: antonk52

Differential Revision: D45731274

fbshipit-source-id: cb79199c15a8973f50e5075dab16605d0120b30c
2023-05-10 07:47:19 -07:00
Szu-Kai Hsu
10f967fe60 feat: Update paste argument schema to support specified programming language (#4732)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/4732

This diff adds a `language` field into `CreatePasteArgs` type to potentially specify programming language in the paste service

Reviewed By: mweststrate

Differential Revision: D45701098

fbshipit-source-id: 080d76e5ff332518881e9c6b84aa47aaea680309
2023-05-10 07:36:49 -07:00
Lorenzo Blasa
fdd1a9e887 Use different location for token depending on build type
Summary:
For Electron builds, use the same directory as certificates and keys.

For headless builds, then use the static directory.

Reviewed By: antonk52

Differential Revision: D45728515

fbshipit-source-id: 55a3b143a9289fed23e57cbf6b701a5e48d27332
2023-05-10 04:35:17 -07:00
Lorenzo Blasa
b94f6b6152 Set the right environment info for headless builds
Summary: The isHeadlessBuild flag was not properly set.

Reviewed By: antonk52

Differential Revision: D45728435

fbshipit-source-id: 3616c4358114d4f3d96372766dabf48b27b44333
2023-05-10 04:35:17 -07:00
Ruslan Lesiutin
1086e05ba0 upgrade react-devtools to v4.27.7 in fbsource (#4706)
Summary:
X-link: https://github.com/facebook/react-native/pull/37146

Pull Request resolved: https://github.com/facebook/flipper/pull/4706

Changelog: [Internal]

Updating react-devtools-* packages to v4.27.7

Reviewed By: jacdebug

Differential Revision: D45317588

fbshipit-source-id: 5625f654feffced92ca933796e90ac10fc4801ff
2023-05-09 07:13:39 -07:00
Lorenzo Blasa
238f40f55d Mandate auth token to connect over TCP
Summary:
Until now, launching flipper-server with TCP would accept any incoming connection as long as it comes from the same origin (localhost) using web socket host origin verification.

This is not entirely secure as origin can be spoofed with tools like curl.

Our team created a security review and a proposal was written:
https://docs.google.com/document/d/16iXypCQibPiner061SoaQUFUY9tLVAEpkKfV_hUXI7c/

Effectively, Flipper can generate a token which is then used by the client to authenticate.

This diff contains the changes required to generate, obtain, and validate authentication tokens from clients connecting to flipper over TCP connections.

The token itself is a JWT token. JWT was chosen because it is a simple industry standard which offers three features which can immediately benefit us:

- Expiration handling. No need for Flipper to store this information anywhere.
- Payload. Payload can be used to push any data we deem relevant i.e. unix username.
- Signing. Signed and verified using the same server key pair which is already in place for certificate exchange.

Additionally, the token is stored in the Flipper static folder. This ensures that the browser and PWA clients have access to it.

Reviewed By: mweststrate

Differential Revision: D45179654

fbshipit-source-id: 6761bcb24f4ba30b67d1511cde8fe875158d78af
2023-05-05 07:52:13 -07:00
Luke De Feo
42320e1c09 Remove focus mode when frame no longer contains previously focused mode
Summary:
The logic was a little outdated to when we were accumulating subtrees, now its much simpler, if the previously focused id is not in the new frame, remove focus

Changelog: UIDebugger, fix focus mode behaviour

Reviewed By: mweststrate

Differential Revision: D45523026

fbshipit-source-id: 894a85df21cc27eb57dbef411ae57743d0c4f753
2023-05-03 06:24:07 -07:00
Andrey Goncharov
78b650dbe0 Make fliters non-exclusive
Summary:
Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Also, sync quick filters with the internal filter state of the table

Reviewed By: antonk52

Differential Revision: D45396180

fbshipit-source-id: 6a8ef4ac61a49ec7af71ae9e26f20f395fb34cef
2023-04-28 12:19:45 -07:00
Andrey Goncharov
65daaf80f1 Expose table state from table manager
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Reviewed By: antonk52

Differential Revision: D45395107

fbshipit-source-id: 8ca3639a109e40b26acead8bb4b0eace68ac9bce
2023-04-28 12:19:45 -07:00
Andrey Goncharov
424985a75a Expose removing filters programatically
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Reviewed By: antonk52

Differential Revision: D45394864

fbshipit-source-id: d2c140d542eaee157cbad5b6a0f29fc62f73a18b
2023-04-28 12:19:45 -07:00
Andrey Goncharov
647bc06f3a Make filtered state of columns more apparent
Summary: People complained about barely noticeable filtered state indication multiple times

Reviewed By: antonk52

Differential Revision: D45394233

fbshipit-source-id: 60a3531b1808ae8f95ce8cd405a20b74bad0ed46
2023-04-28 12:19:45 -07:00
Andrey Goncharov
9d2de05723 Allow to disable column sorting
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Reviewed By: antonk52

Differential Revision: D45394048

fbshipit-source-id: 4255777d477f8240f52b5f82c28e922ef1011989
2023-04-28 12:19:45 -07:00
Andrey Goncharov
a819c77f18 Expose addColumnFilter from DataTable
Summary:
Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Used to set filters externally in next diff

Reviewed By: antonk52

Differential Revision: D45393487

fbshipit-source-id: 15c1186292f45de455ebbcbfced7a63c824a6c19
2023-04-28 12:19:45 -07:00
Andrey Goncharov
27eb5978a9 Pass TableManager instance to Details sidebar of any MasterDetail table
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Reviewed By: passy

Differential Revision: D45354900

fbshipit-source-id: 7f968c9d235f5d8bb23e59e50e39fc1e9f498f46
2023-04-28 12:19:45 -07:00
Andrey Goncharov
423a8d1935 Revamp newScript detailed view
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Reviewed By: antonk52

Differential Revision: D45353402

fbshipit-source-id: 88cc26f9886fd7b2cdcd5ca3d021790d8669c140
2023-04-28 12:19:45 -07:00
Luke De Feo
862592e03d Account for race conditions with stream intercetor
Summary:
Given that stream interceptor is async the folling race conditino could occur.

Frame at time t=0 comes in, we yeild to the event loop while fetching metadata, fetch takes 5 ticks

Frame at time t=1 comes in, we yeild to the event loop but fetch takes 1 tick

At time t=2 the second frame is augmented  and display

At time t=5 the first fetch returns and we display and older frame

This is a simple check to avoid this.

Reviewed By: aigoncharov

Differential Revision: D45314013

fbshipit-source-id: 054e7e6beb52dfbfd94bc9f8ee3d0a758a669f66
2023-04-27 07:28:41 -07:00
Luke De Feo
7ce19f4359 Add static attributes from reduction trace
Summary:
In order to support this the stream inceptor transform nodes now is able to return a list of new meta enties, since these are new attributes we try to mimic what would have happened if they were generated on the client. This makes the rest of the logic downstream simpler

Introduced metadata register, same idea as on the clients.
The attributes available are a mixed bag, will work with blok server to imporove

Reviewed By: antonk52

Differential Revision: D45177781

fbshipit-source-id: 9d761b2f682e7e0fd4710f5b2e9d9d6ff26741fc
2023-04-27 07:28:41 -07:00
Luke De Feo
42963b16ab Subtree Update => Framescan
Summary: This is purely a cosmetic change but more accurately reflects the nature of how we send data from device to desktop. Ie its always an entire frame rather than subtrees. This helps with correctness great Both ios and android are like this and have been for a while.

Reviewed By: lblasa

Differential Revision: D45080088

fbshipit-source-id: 8f68047056c4825b0b1dd89f26c7fa462e2ecb1b
2023-04-27 07:28:41 -07:00
Luke De Feo
47fe0641aa Add error handling for reduciton trace and remove redundent memoization
Summary: We were memoizing the reduction trace fetch in the stream interceptor but this was redundant. We let the library handle that. Also pulled the calls into the uidebugger so we have more control over the retry behaviour

Reviewed By: mweststrate

Differential Revision: D45079132

fbshipit-source-id: 7354fce0fddbebdb0b027dade03398a36adc5e9a
2023-04-27 07:28:41 -07:00
Luke De Feo
4fdfbdc8df Open in IDE for bloks derived components
Summary:
* Added line number as an attribute to node, in theory we could get it from the device in the case of compose
* dont need to use miles as have the file already
* cleaned up naming in ide file resolver so its clear its the qualified name we are talking about

Reviewed By: lblasa

Differential Revision: D45079135

fbshipit-source-id: 24f2d5814800a4a404b680599d307cc750758fcd
2023-04-27 07:28:41 -07:00
Luke De Feo
7cc1a1246e Process Bloks derived components
Reviewed By: lblasa

Differential Revision: D45079131

fbshipit-source-id: 363f5ed2fedc6183130ef0185f8ff5bf58579c10
2023-04-27 07:28:41 -07:00
Luke De Feo
e34f3f4883 Process Bloks Bound tree
Summary:
1. Need to unminify the names from something call the minification map
2. Bloks attributes themselves are already minified. However the uidebugger also has a similar concept in its own metadata so the data we get off the device has been minified twice. To fix this we remap the metadata off the device using the minification map. In order to find the correct entry we need to get the style id of the bloks model parent. this is sent as a metadata custom attribute

Reviewed By: lblasa

Differential Revision: D45079136

fbshipit-source-id: bb448d81918c0b8c9e8ac87c4390b46a8a374d78
2023-04-27 07:28:41 -07:00
Luke De Feo
c96535e15f Infrastructure for stream inteceptor transform metadata
Summary:
Hooked up metadata to the stream inteceptor, enhanced error handling to deal with:
1. Recording subsequent metadata messaages that came in while in error state such that all of them are processed
2. Recording any frames that came in while in error state such that after recovering from error we have the latest state
3. Splitting out recoverable and non recoverable errors more explicitly

Reviewed By: lblasa

Differential Revision: D45079137

fbshipit-source-id: 67a2ffef72d94d2b1492f201a2228659720e306b
2023-04-27 07:28:41 -07:00
Luke De Feo
fd673d0535 Infrastructure for stream interceptor transform nodes
Summary:
Added stream interecptor which gets a chance to augment the messages off the wire. Stream interceptor transformations are async and can fail  due to network errors so added error state with a retry button. The retry button will just call the function again.

I am also handling errors better generally when this method fails unexpectedly, logging more clearly what went wrong and communicating it to the user

Did some refactoring of subtree update event to support this

Reviewed By: lblasa

Differential Revision: D44415260

fbshipit-source-id: a5a5542b318775b641d53941808399a8fa4634d3
2023-04-27 07:28:41 -07:00
Luke De Feo
6b7c5297a5 Added Hidden attributes to node
Summary: Type is any as it can be litterally anything, using json is a bit of pain as we have to do a lot of type checks to access anything

Reviewed By: lblasa

Differential Revision: D45079133

fbshipit-source-id: bcce93a1fce48d2779a648576f12df6392a0938e
2023-04-27 07:28:41 -07:00
Luke De Feo
9d34d12111 Added custom attributes to metadata typing
Summary: These replace tags, and are KV instead. They allow us to send framework specific data that arent common enough to be promoted to the top level, similar to hidden attributes. They will be needed for bloks

Reviewed By: lblasa

Differential Revision: D45079134

fbshipit-source-id: e4962bd56f0c24608504367f50cd796fd3d79fcd
2023-04-27 07:28:41 -07:00
Luke De Feo
1777cbf697 Remove coordinate update
Summary: This is no longer needed or sent by the client given our new approach to frames

Reviewed By: antonk52

Differential Revision: D44872566

fbshipit-source-id: 9ec340a5cc68605f730cf6677fb89778bf77a3a1
2023-04-27 07:28:41 -07:00
generatedunixname89002005306973
f8ca1551d7 Flipper Release: v0.190.0
Summary: Releasing version 0.190.0

Reviewed By: mweststrate

Differential Revision: D45308248

fbshipit-source-id: 3b03945474d644fec9a686f0f908864dbbca2322
2023-04-26 05:30:21 -07:00
Lorenzo Blasa
2583a076c0 Delete unused code
Summary:
^

There's no references to this anywhere, so delete.

Reviewed By: antonk52

Differential Revision: D45309041

fbshipit-source-id: e62e94b089eee30b82b05f64c8e7b31dd03597b6
2023-04-26 04:42:43 -07:00