Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud/desktop mode switcher #6308

Merged
merged 312 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
312 commits
Select commit Hold shift + click to select a range
c09f3b1
Merge branch 'wip/pb/cognito-auth-authorization-app' into wip/np/cogn…
indiv0 Mar 12, 2023
ecb17ca
fixmes
indiv0 Mar 12, 2023
00e942a
Merge branch 'wip/np/cognito-auth-3' into wip/np/cognito-auth-4
indiv0 Mar 12, 2023
ba173ab
fixmes
indiv0 Mar 12, 2023
513d158
Merge branch 'wip/np/cognito-auth-4' into wip/np/cognito-auth-5
indiv0 Mar 13, 2023
d492365
fixmes
indiv0 Mar 13, 2023
82b797c
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 13, 2023
1cd2aca
fixmes
indiv0 Mar 13, 2023
5be815c
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 13, 2023
6059b38
fixmes
indiv0 Mar 13, 2023
f07f7a2
fixes for e-hern's comments
indiv0 Mar 13, 2023
1b5865d
use abortcontroller
indiv0 Mar 13, 2023
e24f3b6
add docs
indiv0 Mar 14, 2023
ee6005c
fixes
indiv0 Mar 14, 2023
73ceec5
revert craco, fix windows build
indiv0 Mar 14, 2023
16d11f7
remove from gitignore
indiv0 Mar 14, 2023
3221cff
Merge branch 'develop' into wip/pb/cognito-auth-authorization-app
mergify[bot] Mar 14, 2023
00c1a09
Merge branch 'develop' into wip/pb/cognito-auth-authorization-app
mergify[bot] Mar 14, 2023
f2227d0
Merge branch 'develop' into wip/pb/cognito-auth-authorization-app
mergify[bot] Mar 14, 2023
de6f806
remove unnecessary check
indiv0 Mar 14, 2023
7fd698e
Merge branch 'wip/pb/cognito-auth-authorization-app' into wip/np/cogn…
indiv0 Mar 14, 2023
02875e9
tmp
indiv0 Mar 14, 2023
81bbd06
Merge branch 'wip/pb/cognito-auth-authorization-app' into wip/np/cogn…
indiv0 Mar 14, 2023
2424b70
augment window
indiv0 Mar 14, 2023
34fec71
tmptmp
indiv0 Mar 14, 2023
6b5828b
split errors back up
indiv0 Mar 15, 2023
6285608
tmp
indiv0 Mar 15, 2023
2413c0e
tmp
indiv0 Mar 15, 2023
abd0193
Merge branch 'develop' into wip/np/cognito-auth-3
indiv0 Mar 16, 2023
c376f81
prettier
indiv0 Mar 16, 2023
86f6302
fix
indiv0 Mar 16, 2023
bda03ad
Fix lints
somebody1234 Mar 16, 2023
dce2fb4
Prepare for addition for `as T` lint
somebody1234 Mar 16, 2023
328df11
Merge and fix lint errors
somebody1234 Mar 16, 2023
0124b66
Add lint for early returns
somebody1234 Mar 16, 2023
bd97f86
Merge and fix lint errors
somebody1234 Mar 16, 2023
9eb76fb
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
somebody1234 Mar 16, 2023
aa92dfc
Address review issues
somebody1234 Mar 16, 2023
c55a304
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
somebody1234 Mar 16, 2023
a6ab4d5
Fix lints
somebody1234 Mar 16, 2023
c282666
remove withrouter
indiv0 Mar 16, 2023
bdcdcac
Merge branch 'wip/np/cognito-auth-3' into wip/np/cognito-auth-4
indiv0 Mar 16, 2023
8b718ca
Merge branch 'wip/np/cognito-auth-4' into wip/np/cognito-auth-5
indiv0 Mar 16, 2023
43d91cb
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 16, 2023
051837d
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 16, 2023
f3ed113
Merge branch 'develop' into wip/np/cognito-auth-3
indiv0 Mar 16, 2023
bc547fe
Merge branch 'wip/np/cognito-auth-3' into wip/np/cognito-auth-4
indiv0 Mar 16, 2023
a45d6a6
Merge branch 'wip/np/cognito-auth-4' into wip/np/cognito-auth-5
indiv0 Mar 16, 2023
40ae63a
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 16, 2023
4546e55
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 16, 2023
1e75fc6
fix file length
indiv0 Mar 16, 2023
2a10340
fixes
indiv0 Mar 16, 2023
b9fecbb
fixes
indiv0 Mar 16, 2023
949f86b
Merge branch 'wip/np/cognito-auth-4' into wip/np/cognito-auth-5
indiv0 Mar 16, 2023
80c9162
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 16, 2023
6446d02
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 16, 2023
c6616f0
remove dashboard
indiv0 Mar 16, 2023
0d4f256
remove dashboard
indiv0 Mar 16, 2023
50bd5be
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 16, 2023
652bab8
remove dashboard
indiv0 Mar 16, 2023
128bb9d
fix
indiv0 Mar 16, 2023
928d238
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 16, 2023
f74115d
use switch
indiv0 Mar 16, 2023
f2b0050
prettier
indiv0 Mar 16, 2023
f768633
fixes
indiv0 Mar 16, 2023
57f874d
prettier
indiv0 Mar 16, 2023
c88e75d
fixes
indiv0 Mar 16, 2023
f79db09
Merge branch 'wip/np/cognito-auth-3' into wip/np/cognito-auth-4
indiv0 Mar 16, 2023
6015db4
run prettier
indiv0 Mar 16, 2023
7c0bac2
Merge branch 'wip/np/cognito-auth-4' into wip/np/cognito-auth-5
indiv0 Mar 16, 2023
966b448
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 16, 2023
f2a6cc7
run prettier
indiv0 Mar 16, 2023
31ba9fe
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 16, 2023
9e459e2
run prettier
indiv0 Mar 16, 2023
48b0013
fix main page url
indiv0 Mar 17, 2023
0bc678e
allow node.js debugging
indiv0 Mar 17, 2023
70ca541
fix lints
indiv0 Mar 17, 2023
f640235
change not equal
indiv0 Mar 17, 2023
385731e
prettier
indiv0 Mar 17, 2023
e63279e
Merge branch 'develop' into wip/np/cognito-auth-4
indiv0 Mar 17, 2023
3bccd10
Merge branch 'wip/np/cognito-auth-4' into wip/np/cognito-auth-5
indiv0 Mar 17, 2023
7f1a654
Merge branch 'wip/np/cognito-auth-5' into wip/np/cognito-auth-6
indiv0 Mar 17, 2023
65d86ca
Merge branch 'wip/np/cognito-auth-6' into wip/np/cognito-auth-7
indiv0 Mar 17, 2023
56bc594
Remove references to withRouter; fix lints
somebody1234 Mar 20, 2023
d84842e
Run prettier
somebody1234 Mar 20, 2023
f9f589d
Add cloud endpoints
somebody1234 Mar 20, 2023
4a16b33
Add JSON-RPC endpoints
somebody1234 Mar 20, 2023
013f7ba
Merge branch 'wip/somebody1234/rpc-endpoints-for-desktop-ide' into wi…
somebody1234 Mar 20, 2023
e59c61a
Add dashboard skeleton
somebody1234 Mar 20, 2023
5dabcc8
Add components and edit dashboard
somebody1234 Mar 20, 2023
4ee27ec
Run prettier
somebody1234 Mar 21, 2023
3d5a89f
(WIP) Add cloud endpoints
somebody1234 Mar 21, 2023
2eadb96
Add rpc endpoints
somebody1234 Mar 21, 2023
f595d63
Merge branch 'develop' into wip/somebody1234/cognito-auth-prettier
somebody1234 Mar 21, 2023
a7da373
Address review issues
somebody1234 Mar 21, 2023
f4d92e9
Formatting and minor fixes for `newtype.ts`
somebody1234 Mar 21, 2023
9612813
Address review issues
somebody1234 Mar 21, 2023
c5fcfda
Merge remote-tracking branch 'origin/wip/somebody1234/cloud-endpoints…
somebody1234 Mar 21, 2023
bf9e1dc
Rename `Brand` to `NewtypeVariant`
somebody1234 Mar 22, 2023
b1ee3d9
Rename `Brand` to `NewtypeVariant`
somebody1234 Mar 22, 2023
ee6d9dd
Fix formatting in `newtype.ts`
somebody1234 Mar 22, 2023
2d30f33
Switch dashboard to esbuild
somebody1234 Mar 22, 2023
85a17de
Minor fixes; move Tailwind generation into esbuild-config
somebody1234 Mar 22, 2023
fb7593b
Fix watching `content/` and `client/`
somebody1234 Mar 22, 2023
6c40780
Bump esbuild binary versions; minor dependency list fixes
somebody1234 Mar 22, 2023
5fe57eb
Merge branch 'wip/somebody1234/cloud-endpoints-for-frontend' into wip…
somebody1234 Mar 22, 2023
a760d2a
Add dashboard skeleton
somebody1234 Mar 20, 2023
8626351
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/somebody1…
somebody1234 Mar 22, 2023
39fbd43
Merge branch 'develop' into wip/somebody1234/cognito-auth-prettier
somebody1234 Mar 22, 2023
fc5e9de
Run prettier
somebody1234 Mar 22, 2023
7903c1d
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
somebody1234 Mar 22, 2023
abc038c
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
somebody1234 Mar 22, 2023
862cf1c
Fixes; rename "npm run dev" to "npm run watch-dashboard"
somebody1234 Mar 22, 2023
de9b576
Avoid writing esbuild outputs to disk for `dashboard/`
somebody1234 Mar 22, 2023
cebc42b
Convert watch-dashboard to be fully in-memory; rebuild css files on c…
somebody1234 Mar 22, 2023
2323427
Remove obsolete FIXME
somebody1234 Mar 22, 2023
ca60a0d
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
somebody1234 Mar 22, 2023
c68ec39
Remove unused constants
somebody1234 Mar 22, 2023
83555d8
Run prettier
somebody1234 Mar 22, 2023
461e1fa
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
somebody1234 Mar 22, 2023
d9eb3ea
add missing styles
PabloBuchu Mar 22, 2023
697a02a
Merge branch 'wip/pb/auth-fix-styling' into wip/somebody1234/esbuild-…
somebody1234 Mar 22, 2023
16195b0
Fixes
somebody1234 Mar 22, 2023
ce6eed5
Fix the fixes
somebody1234 Mar 22, 2023
8f7a691
Run prettier
somebody1234 Mar 22, 2023
f892f3d
Fixes; use nesting plugin to wrap tailwind preflight
somebody1234 Mar 23, 2023
1ae8bc3
Remove testing flag from client/watch
somebody1234 Mar 23, 2023
33fa88d
Minor fixes
somebody1234 Mar 23, 2023
d8bdf2a
Run prettier
somebody1234 Mar 23, 2023
7d328c8
Merge branch 'wip/somebody1234/esbuild-for-dashboard' into wip/somebo…
somebody1234 Mar 23, 2023
56da39a
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/somebody1…
somebody1234 Mar 23, 2023
40036dd
Export newtypes
somebody1234 Mar 23, 2023
779ef69
Make css rebuild when tailwind config changes
somebody1234 Mar 23, 2023
2655f6e
Fix endpoints
somebody1234 Mar 23, 2023
a768a84
Finish copying changes over
somebody1234 Mar 23, 2023
5e65610
Remove duplicate type definitions
somebody1234 Mar 23, 2023
a73f773
Feat: top-bar styles and changePassword feature
Nctdt Mar 23, 2023
f2e3cf8
Fix: remove eslint disable comments
Nctdt Mar 23, 2023
6124e30
Fix bundling for dashboard
somebody1234 Mar 23, 2023
74d3c5f
Fix dashboard/bundle.ts erroring when build directory does not exist
somebody1234 Mar 23, 2023
20735db
Move CSS to Tailwind config
somebody1234 Mar 24, 2023
d611319
Run prettier
somebody1234 Mar 24, 2023
39a7698
Copy changes from old branch
somebody1234 Mar 23, 2023
8db6612
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Mar 24, 2023
093a3b4
Update endpoints
somebody1234 Mar 24, 2023
10d2c13
Merge branch 'wip/somebody1234/cloud-endpoints-for-frontend' into wip…
somebody1234 Mar 24, 2023
79f54bd
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/somebody1…
somebody1234 Mar 24, 2023
ae55f7e
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Mar 24, 2023
5d83374
Fix esbuild binary package names
somebody1234 Mar 24, 2023
bba8791
Remove redundant "npx" prefix from build scripts
somebody1234 Mar 24, 2023
030e76b
Remove unused dependency
somebody1234 Mar 24, 2023
8659ea6
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
PabloBuchu Mar 27, 2023
267d6b6
workaround for mac freeze
PabloBuchu Mar 27, 2023
4f58016
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
PabloBuchu Mar 27, 2023
68c3ccf
Merge branch 'wip/somebody1234/esbuild-for-dashboard' into wip/somebo…
somebody1234 Mar 28, 2023
cc6a0a1
Merge branch 'wip/somebody1234/cognito-auth-prettier' into wip/somebo…
somebody1234 Mar 28, 2023
f63bc66
Merge branch 'wip/somebody1234/cognito-auth-prettier' into wip/somebo…
somebody1234 Mar 28, 2023
ade5d00
Fix bug
Nctdt Mar 29, 2023
403b8b4
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
PabloBuchu Mar 29, 2023
8727494
add missing sections
PabloBuchu Mar 29, 2023
9357e56
Fix: bug
Nctdt Mar 29, 2023
91b95d8
Address review issue
somebody1234 Mar 29, 2023
0d764c6
Merge branch 'develop' into wip/somebody1234/esbuild-for-dashboard
somebody1234 Mar 29, 2023
8681348
Fix prettier config; run prettier
somebody1234 Mar 29, 2023
642fd32
Fix live-reload of `npm run watch-dashboard`
somebody1234 Mar 29, 2023
d907004
Fix service worker for client-side routing
somebody1234 Mar 29, 2023
2cc9cc8
Remove workaround for backend bug when listing directories
somebody1234 Mar 29, 2023
71660a2
Merge branch 'wip/somebody1234/esbuild-for-dashboard' into wip/somebo…
somebody1234 Mar 30, 2023
fafafc6
Merge branch 'wip/sb/prettier' into wip/somebody1234/cloud-endpoints-…
somebody1234 Mar 30, 2023
25ac827
Merge branch 'wip/somebody1234/esbuild-for-dashboard' into wip/somebo…
somebody1234 Mar 30, 2023
fe57e00
Merge branch 'wip/sb/prettier' into wip/somebody1234/rpc-endpoints-fo…
somebody1234 Mar 30, 2023
d204840
Merge branch 'wip/somebody1234/rpc-endpoints-for-desktop-ide' into wi…
somebody1234 Mar 30, 2023
d0d180d
Merge branch 'wip/somebody1234/cloud-endpoints-for-frontend' into wip…
somebody1234 Mar 30, 2023
0414667
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/somebody1…
somebody1234 Mar 30, 2023
70c8f23
Fix sizing
somebody1234 Mar 30, 2023
8949165
Fix spacing, add fixed paths
somebody1234 Mar 30, 2023
5e33331
Address review issues; minor fixes
somebody1234 Mar 31, 2023
b4cacf9
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Mar 31, 2023
03c3cef
Fix authentication on desktop IDE
somebody1234 Mar 31, 2023
e87b7e9
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Mar 31, 2023
1277d9f
Merge branch 'develop' into wip/somebody1234/rpc-endpoints-for-deskto…
somebody1234 Mar 31, 2023
7fcbf21
Merge branch 'develop' into wip/somebody1234/cloud-endpoints-for-fron…
somebody1234 Mar 31, 2023
c12ba43
Run prettier
somebody1234 Mar 31, 2023
39d40ee
Allow unused locals and parameters in tsconfig.json
somebody1234 Mar 31, 2023
238b22d
Run prettier
somebody1234 Mar 31, 2023
01d27e2
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Mar 31, 2023
9198107
Fix TypeScript errors
somebody1234 Mar 31, 2023
9deb5a4
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Mar 31, 2023
96619e2
Merge branch 'wip/somebody1234/rpc-endpoints-for-desktop-ide' into wi…
somebody1234 Apr 3, 2023
764854b
Merge branch 'develop' into wip/somebody1234/dashboard-skeleton
somebody1234 Apr 3, 2023
6d013b3
Run prettier
somebody1234 Apr 3, 2023
c4f83aa
Merge branch 'develop' into wip/somebody1234/cloud-endpoints-for-fron…
somebody1234 Apr 3, 2023
e6efd94
Merge branch 'wip/somebody1234/cloud-endpoints-for-frontend' into wip…
somebody1234 Apr 3, 2023
369bb8e
Fix eslint errors, restructure code
somebody1234 Apr 4, 2023
0a31867
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/sb/top-ba…
somebody1234 Apr 4, 2023
f8693ed
Minor fixes and other changes
somebody1234 Apr 4, 2023
eb1dfb7
Revert incorrect change to `cognito/changePassword`
somebody1234 Apr 4, 2023
39c3f34
Merge branch 'develop' into wip/somebody1234/dashboard-skeleton
somebody1234 Apr 6, 2023
04fc930
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/somebody1…
somebody1234 Apr 6, 2023
3de3aab
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/somebody1…
somebody1234 Apr 6, 2023
b831f8a
Remove unused file
somebody1234 Apr 6, 2023
c50c18a
Merge branch 'wip/somebody1234/dashboard-skeleton' into wip/sb/top-ba…
somebody1234 Apr 6, 2023
6b316e4
Run prettier
somebody1234 Apr 6, 2023
d58656a
Merge branch 'wip/sb/top-bar-styles-2' into wip/somebody1234/start-an…
somebody1234 Apr 6, 2023
df1aa6d
Merge with top bar; implement switching between IDE and dashboard
somebody1234 Apr 6, 2023
fa03af1
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/som…
somebody1234 Apr 6, 2023
462dbc2
Animate project switcher (WIP)
somebody1234 Apr 7, 2023
13daf67
Fix IDE and project switcher animation
somebody1234 Apr 7, 2023
0672e2f
Merge branch 'develop' into wip/somebody1234/dashboard-directory-view
somebody1234 Apr 11, 2023
ca2fbc6
Fix eslint errors
somebody1234 Apr 11, 2023
a0e8e89
Change `#dashboard` to `.dashboard` for Tailwind
somebody1234 Apr 11, 2023
879c198
Split `-authentication` option into `-cloud.authentication` and `-clo…
somebody1234 Apr 11, 2023
a2b75e5
Address review issues
somebody1234 Apr 12, 2023
0c6a1ea
Merge branch 'develop' into wip/somebody1234/dashboard-directory-view
somebody1234 Apr 12, 2023
a36ff09
Add description for cloud option group
somebody1234 Apr 12, 2023
f52f3eb
Merge branch 'wip/somebody1234/dashboard-directory-view' into wip/sb/…
somebody1234 Apr 12, 2023
12c00f5
Extract custom CSS values into Tailwind config; use ModalProvider
somebody1234 Apr 12, 2023
3c01ebb
Merge branch 'wip/sb/top-bar-styles-2' into wip/somebody1234/start-an…
somebody1234 Apr 12, 2023
ede6ea0
Hide topbar in IDE view
somebody1234 Apr 12, 2023
7838d31
Add project manager backend service
somebody1234 Apr 13, 2023
1998269
Begin fixing IDE open
somebody1234 Apr 13, 2023
e67cb98
(WIP)
somebody1234 Apr 14, 2023
4db81a7
Clean up unused code
somebody1234 Apr 17, 2023
1049f3c
Minor fixes
somebody1234 Apr 17, 2023
6b55240
Merge branch 'develop' into wip/sb/cloud-desktop-mode-switcher
somebody1234 Apr 17, 2023
19e4bae
Fix
somebody1234 Apr 17, 2023
d6d4b90
Fix local backend's usage of project manager (WIP)
somebody1234 Apr 19, 2023
077ed45
WIP
somebody1234 Apr 20, 2023
9e05371
Minor fixes
somebody1234 Apr 20, 2023
3bbe89c
Merge branch 'develop' into wip/sb/cloud-desktop-mode-switcher
somebody1234 Apr 21, 2023
9ea26dd
Fix scrollbar showing because of margins
somebody1234 Apr 21, 2023
7a9b858
Expose `runProject` instead of `main`
somebody1234 Apr 21, 2023
d929cd5
Keep persistent websocket to Project Manager
somebody1234 Apr 21, 2023
8401dc9
Fix spinner state bug
somebody1234 Apr 21, 2023
02f0cc5
Fix race condition when switching between backends
somebody1234 Apr 21, 2023
25b0745
Fix loading local projects
somebody1234 Apr 21, 2023
cad29ad
Make switching local projects work
somebody1234 Apr 24, 2023
8f353d9
Fix opening cloud projects
somebody1234 Apr 24, 2023
e58c2a0
Add shortcut to switch back to dashboard
somebody1234 Apr 24, 2023
6e1253e
Merge branch 'develop' into wip/sb/cloud-desktop-mode-switcher
somebody1234 Apr 25, 2023
161eab0
Fix templates for desktop; other fixes
somebody1234 Apr 25, 2023
dfb934e
Fix status check polling in `ProjectActionButton` not being stopped
somebody1234 Apr 25, 2023
f1a6207
Run prettier
somebody1234 Apr 26, 2023
3ade90e
Retry reconnecting to Project Manager
somebody1234 Apr 26, 2023
82c300e
fix back to dashboard shortcut on macOS
PabloBuchu Apr 26, 2023
5f5d524
Merge branch 'develop' into wip/sb/cloud-desktop-mode-switcher
somebody1234 Apr 26, 2023
7c40d00
Merge branch 'wip/sb/cloud-desktop-mode-switcher' of github.com:enso-…
somebody1234 Apr 26, 2023
7889da7
Fixes
somebody1234 Apr 26, 2023
b470976
More fixes
somebody1234 Apr 26, 2023
34b08d5
Rename `backendModule` to `cloudService`
somebody1234 Apr 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/ide-desktop/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ const RESTRICTED_SYNTAXES = [
'TSAsExpression:has(TSUnknownKeyword, TSNeverKeyword, TSAnyKeyword) > TSAsExpression',
message: 'Use type assertions to specific types instead of `unknown`, `any` or `never`',
},
{
selector: 'IfStatement > ExpressionStatement',
message: 'Wrap `if` branches in `{}`',
},
]

/* eslint-disable @typescript-eslint/naming-convention */
Expand Down
9 changes: 2 additions & 7 deletions app/ide-desktop/lib/content/esbuild-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export function bundlerOptions(args: Arguments) {
entryPoints: [
pathModule.resolve(THIS_PATH, 'src', 'index.ts'),
pathModule.resolve(THIS_PATH, 'src', 'index.html'),
pathModule.resolve(THIS_PATH, 'src', 'run.js'),
pathModule.resolve(THIS_PATH, 'src', 'style.css'),
pathModule.resolve(THIS_PATH, 'src', 'docsStyle.css'),
...wasmArtifacts.split(pathModule.delimiter),
Expand All @@ -108,13 +107,9 @@ export function bundlerOptions(args: Arguments) {
outbase: 'src',
plugins: [
{
// This is a workaround that is needed
// because esbuild panics when using `loader: { '.js': 'copy' }`.
// See https://github.com/evanw/esbuild/issues/3041.
// Setting `loader: 'copy'` prevents this file from being converted to ESM
// because of the `"type": "module"` in the `package.json`.
// This file MUST be in CommonJS format because it is loaded using `Function()`
// in `ensogl/pack/js/src/runner/index.ts`
// in `ensogl/pack/js/src/runner/index.ts`.
// All other files are ESM because of `"type": "module"` in `package.json`.
name: 'pkg-js-is-cjs',
setup: build => {
build.onLoad({ filter: /[/\\]pkg.js$/ }, async ({ path }) => ({
Expand Down
1 change: 0 additions & 1 deletion app/ide-desktop/lib/content/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<link rel="stylesheet" href="/docsStyle.css" />
<link rel="stylesheet" href="/tailwind.css" />
<script type="module" src="/index.js" defer></script>
<script type="module" src="/run.js" defer></script>
</head>
<body>
<div id="enso-dashboard" class="enso-dashboard"></div>
Expand Down
208 changes: 118 additions & 90 deletions app/ide-desktop/lib/content/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import * as authentication from 'enso-authentication'
import * as contentConfig from 'enso-content-config'

import * as app from '../../../../../target/ensogl-pack/linked-dist/index'
import * as projectManager from './project_manager'
import GLOBAL_CONFIG from '../../../../gui/config.yaml' assert { type: 'yaml' }

const logger = app.log.logger

Expand All @@ -25,6 +23,8 @@ const ESBUILD_EVENT_NAME = 'change'
const SECOND = 1000
/** Time in seconds after which a `fetchTimeout` ends. */
const FETCH_TIMEOUT = 300
/** The `id` attribute of the element that the IDE will be rendered into. */
const IDE_ELEMENT_ID = 'root'

// ===================
// === Live reload ===
Expand Down Expand Up @@ -119,104 +119,132 @@ function displayDeprecatedVersionDialog() {
}

// ========================
// === Main Entry Point ===
// === Main entry point ===
// ========================

interface StringConfig {
[key: string]: StringConfig | string
}

class Main {
async main(inputConfig: StringConfig) {
const config = Object.assign(
{
loader: {
wasmUrl: 'pkg-opt.wasm',
jsUrl: 'pkg.js',
assetsUrl: 'dynamic-assets',
},
},
inputConfig
)

const appInstance = new app.App({
config,
configOptions: contentConfig.OPTIONS,
packageInfo: {
version: BUILD_INFO.version,
engineVersion: BUILD_INFO.engineVersion,
// Hack to mutate `configOptions.OPTIONS`
let currentAppInstance: app.App | null = new app.App({
config: {
loader: {
wasmUrl: 'pkg-opt.wasm',
jsUrl: 'pkg.js',
assetsUrl: 'dynamic-assets',
},
},
configOptions: contentConfig.OPTIONS,
packageInfo: {
version: BUILD_INFO.version,
engineVersion: BUILD_INFO.engineVersion,
},
})

function tryStopProject() {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
currentAppInstance?.wasm?.drop?.()
}

async function runProject(inputConfig?: StringConfig) {
tryStopProject()
const rootElement = document.getElementById(IDE_ELEMENT_ID)
if (!rootElement) {
logger.error(`The root element (the element with ID '${IDE_ELEMENT_ID}') was not found.`)
} else {
while (rootElement.firstChild) {
rootElement.removeChild(rootElement.firstChild)
}
}

const config = Object.assign(
{
loader: {
wasmUrl: 'pkg-opt.wasm',
jsUrl: 'pkg.js',
assetsUrl: 'dynamic-assets',
},
})
},
inputConfig
)

if (appInstance.initialized) {
if (contentConfig.OPTIONS.options.dataCollection.value) {
// TODO: Add remote-logging here.
}
if (!(await checkMinSupportedVersion(contentConfig.OPTIONS))) {
displayDeprecatedVersionDialog()
} else {
if (
(contentConfig.OPTIONS.options.authentication.value ||
contentConfig.OPTIONS.groups.featurePreview.options.newDashboard.value) &&
contentConfig.OPTIONS.groups.startup.options.entry.value ===
contentConfig.OPTIONS.groups.startup.options.entry.default
) {
const hideAuth = () => {
const auth = document.getElementById('dashboard')
const ide = document.getElementById('root')
if (auth) auth.style.display = 'none'
if (ide) ide.style.display = ''
}
/** This package is an Electron desktop app (i.e., not in the Cloud), so
* we're running on the desktop. */
/** TODO [NP]: https://github.com/enso-org/cloud-v2/issues/345
* `content` and `dashboard` packages **MUST BE MERGED INTO ONE**. The IDE
* should only have one entry point. Right now, we have two. One for the cloud
* and one for the desktop. Once these are merged, we can't hardcode the
* platform here, and need to detect it from the environment. */
const platform = authentication.Platform.desktop
/** FIXME [PB]: https://github.com/enso-org/cloud-v2/issues/366
* React hooks rerender themselves multiple times. It is resulting in multiple
* Enso main scene being initialized. As a temporary workaround we check whether
* appInstance was already ran. Target solution should move running appInstance
* where it will be called only once. */
let appInstanceRan = false
const onAuthenticated = () => {
if (
!contentConfig.OPTIONS.groups.featurePreview.options.newDashboard.value
) {
hideAuth()
if (!appInstanceRan) {
appInstanceRan = true
void appInstance.run()
}
}
}
authentication.run({
logger,
platform,
projectManager: projectManager.ProjectManager.default(),
showDashboard:
contentConfig.OPTIONS.groups.featurePreview.options.newDashboard.value,
onAuthenticated,
})
} else {
void appInstance.run()
}
const email = contentConfig.OPTIONS.groups.authentication.options.email.value
// The default value is `""`, so a truthiness check is most appropriate here.
if (email) {
logger.log(`User identified as '${email}'.`)
}
}
currentAppInstance = new app.App({
config,
configOptions: contentConfig.OPTIONS,
packageInfo: {
version: BUILD_INFO.version,
engineVersion: BUILD_INFO.engineVersion,
},
})
console.log('bruh', currentAppInstance)

if (!currentAppInstance.initialized) {
console.error('Failed to initialize the application.')
} else {
if (contentConfig.OPTIONS.options.dataCollection.value) {
// TODO: Add remote-logging here.
}
if (!(await checkMinSupportedVersion(contentConfig.OPTIONS))) {
displayDeprecatedVersionDialog()
} else {
console.error('Failed to initialize the application.')
const email = contentConfig.OPTIONS.groups.authentication.options.email.value
// The default value is `""`, so a truthiness check is most appropriate here.
if (email) {
logger.log(`User identified as '${email}'.`)
}
void currentAppInstance.run()
}
}
}

const API = new Main()

// @ts-expect-error `globalConfig.windowAppScopeName` is not known at typecheck time.
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
window[GLOBAL_CONFIG.windowAppScopeName] = API
if (
(contentConfig.OPTIONS.options.authentication.value ||
contentConfig.OPTIONS.groups.featurePreview.options.newDashboard.value) &&
contentConfig.OPTIONS.groups.startup.options.entry.value ===
contentConfig.OPTIONS.groups.startup.options.entry.default
) {
window.tryStopProject = tryStopProject
window.runProject = runProject
const hideAuth = () => {
const auth = document.getElementById('dashboard')
const ide = document.getElementById('root')
if (auth) {
auth.style.display = 'none'
}
if (ide) {
ide.hidden = false
}
}
/** This package is an Electron desktop app (i.e., not in the Cloud), so
* we're running on the desktop. */
/** TODO [NP]: https://github.com/enso-org/cloud-v2/issues/345
* `content` and `dashboard` packages **MUST BE MERGED INTO ONE**. The IDE
* should only have one entry point. Right now, we have two. One for the cloud
* and one for the desktop. Once these are merged, we can't hardcode the
* platform here, and need to detect it from the environment. */
const platform = authentication.Platform.desktop
/** FIXME [PB]: https://github.com/enso-org/cloud-v2/issues/366
* React hooks rerender themselves multiple times. It is resulting in multiple
* Enso main scene being initialized. As a temporary workaround we check whether
* appInstance was already ran. Target solution should move running appInstance
* where it will be called only once. */
let appInstanceRan = false
const onAuthenticated = () => {
if (!contentConfig.OPTIONS.groups.featurePreview.options.newDashboard.value) {
hideAuth()
if (!appInstanceRan) {
appInstanceRan = true
void runProject()
}
}
}
authentication.run({
logger,
platform,
showDashboard: contentConfig.OPTIONS.groups.featurePreview.options.newDashboard.value,
onAuthenticated,
})
} else {
void runProject()
}
39 changes: 0 additions & 39 deletions app/ide-desktop/lib/content/src/newtype.ts

This file was deleted.

Loading