Skip to content

Add xterm as an IDE #8464

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

Merged
merged 7 commits into from
Mar 23, 2023
Merged

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Feb 25, 2022

Description

Adds Xterm.js as a web alternative to connecting to your workspace via SSH from your terminal. The code can be found at https://github.com/gitpod-io/xterm-web-ide and the Docker image is at ide/xterm-web.

Warning: this PR was not actually merged. The corrected version is #17005

How to test

  1. Open the preview environment
  2. In the preferences, select notice there is no Xterm IDE
  3. In Configcat, include yourself in the enable-rule for experimentalIdes (non-prod)
  4. Wait a couple of minutes (🫖 time)
  5. Reload and see the Terminal IDE magically appear
  6. Create a workspace and have a blast

Useful commands

Re-pull the IDE:

kubectl rollout restart deployment/ide-service

Current limitations

  • Does not work on mobile [fixed]

    iPad demo
    RPReplay_Final1679590301.mp4

Release Notes

NONE

⬆️ we can mention it after we finish the internal dog food

Documentation

Todo

  • gp stop closes xterm.js editor and shows the "Workspace Stopping" screen
  • gp open works
  • gp preview works
  • Ensure heartbreating works
  • Move Docker image from DockerHub to our GCP registry

Nice-to-haves

Werft options:

  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm

@codecov
Copy link

codecov bot commented Feb 25, 2022

Codecov Report

Merging #8464 (115b6ce) into main (ebf351e) will decrease coverage by 4.16%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             main   #8464      +/-   ##
=========================================
- Coverage   12.31%   8.15%   -4.17%     
=========================================
  Files          20      31      +11     
  Lines        1161    2183    +1022     
=========================================
+ Hits          143     178      +35     
- Misses       1014    2002     +988     
+ Partials        4       3       -1     
Flag Coverage Δ
components-gitpod-cli-app 11.17% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?
installer-raw-app 5.63% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go
installer/pkg/components/ws-manager/tlssecret.go 0.00% <0.00%> (ø)
installer/pkg/components/ws-manager/configmap.go 30.05% <0.00%> (ø)
installer/pkg/components/ws-manager/role.go 0.00% <0.00%> (ø)
installer/pkg/common/objects.go 0.00% <0.00%> (ø)
...staller/pkg/components/ws-manager/networkpolicy.go 0.00% <0.00%> (ø)
installer/pkg/common/display.go 0.00% <0.00%> (ø)
...components/ws-manager/unpriviledged-rolebinding.go 0.00% <0.00%> (ø)
installer/pkg/common/storage.go 0.00% <0.00%> (ø)
... and 5 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@akosyakov
Copy link
Member

What we are going to do about it?

@felladrin
Copy link
Contributor

I'd love to see it in production. I vote for continuing it, even if it's just developed sporadically.

@stale
Copy link

stale bot commented Mar 29, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 29, 2022
@akosyakov akosyakov closed this Mar 30, 2022
@filiptronicek filiptronicek reopened this Jul 1, 2022
@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Jul 1, 2022
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-ft-add-xterm-ide.5 because the annotations in the pull request description changed
(with .werft/ from main)

@felladrin
Copy link
Contributor

felladrin commented Jul 6, 2022

Impressed with how well it's working! 🎉

image

I haven't faced any hotkey conflict between the apps and the browser.

@felladrin
Copy link
Contributor

Reminder: Running "gp stop" should lead the user to the "Stopping Workspace" page.

@filiptronicek
Copy link
Member Author

Reminder: Running "gp stop" should lead the user to the "Stopping Workspace" page.

Thanks for noting this, @felladrin! I tried this and it worked for the most part, but there were indeed occurrences where I got an error message which blocked the navigation. Now it should not block the main thread (we switched over from alert() to <dialog>) and just work.

@felladrin
Copy link
Contributor

felladrin commented Jul 11, 2022

ℹ️ Something interesting I saw yesterday: https://github.com/cloudcmd/gritty
Leaving it here as it matches what's being done in this PR. An alternative, if needed.

@filiptronicek
Copy link
Member Author

filiptronicek commented Jul 11, 2022

ℹ️ Something interesting I saw yesterday: cloudcmd/gritty

Looks interesting, @felladrin! I think that would be useful for some smaller things, but it seems like implementing stuff like custom link matching wouldn't be possible like this 🤔

@filiptronicek
Copy link
Member Author

Ok one issue that I would love input for:

This looks good
image

This looks very bad
image

@felladrin
Copy link
Contributor

felladrin commented Jul 18, 2022

Can we add a background ourselves?
Similar to the background on JetBrains IDEs logos.
Something like this, to make it fit both light and dark modes:

image


Adding here, for the record, how it currently looks like on dark mode:

image

image

---

Btw, the preview environment is working again!

@felladrin
Copy link
Contributor

felladrin commented Jul 18, 2022

Something to add to the docs later: The browser's accessibility functionality of pressing the ESC key to un-focus input fields won't allow sending the keystroke to the terminal. So, for escaping the input mode in terminal apps like VIM, please use ctrl+c.

@stale
Copy link

stale bot commented Jul 30, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jul 30, 2022
@mustard-mh mustard-mh added the meta: never-stale This issue can never become stale label Aug 1, 2022
Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SID-related changes LGTM

@roboquat roboquat added size/XXL and removed size/M labels Mar 23, 2023
@filiptronicek filiptronicek force-pushed the ft/add-xterm-ide branch 2 times, most recently from 2e770e6 to 9ebc383 Compare March 23, 2023 14:56
@roboquat roboquat added size/M and removed size/XXL labels Mar 23, 2023
@filiptronicek
Copy link
Member Author

filiptronicek commented Mar 23, 2023

/gh run recreate-vm

Comment triggered a workflow run

Started workflow run: 4502888822

  • recreate_vm: true

@filiptronicek filiptronicek changed the base branch from main to filiptronicek/replace-the-editor-13116 March 23, 2023 19:30
@roboquat roboquat merged commit f2a98ec into filiptronicek/replace-the-editor-13116 Mar 23, 2023
@roboquat roboquat deleted the ft/add-xterm-ide branch March 23, 2023 19:31
@filiptronicek filiptronicek restored the ft/add-xterm-ide branch March 23, 2023 19:31
@filiptronicek
Copy link
Member Author

filiptronicek commented Mar 23, 2023

Alright... didn't expect roboquat to merge this automatically... let's make another PR. Sorry folks

@filiptronicek filiptronicek mentioned this pull request Mar 23, 2023
20 tasks
@vulkoingim
Copy link
Contributor

Alright... didn't expect roboquat to merge this automatically... let's make another PR. Sorry folks

When you change the base branch for the PR from main the requirements to merge are no longer the same :) If there's an approval (regardless from whom) it gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

10 participants