-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[JetBrains] Show notification when port becomes available 🔔 #10107
Conversation
87e97e5
to
0949310
Compare
20a346f
to
d1b64dc
Compare
...nts/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodManager.kt
Outdated
Show resolved
Hide resolved
57e3dee
to
d790f82
Compare
d790f82
to
66bafa0
Compare
66bafa0
to
cf6cf73
Compare
5ab5547
to
7a10c72
Compare
8426b15
to
2221755
Compare
p.url = port.exposed.url | ||
|
||
try { | ||
manager.client.server.openPort(workspaceId, p).await() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the moment, pressing the button doesn't update the UI (in VS Code in the ports view you can see the text "private" change into "public"), so it looks a bit unfinished. We could consider adding an extra notification like:
val message = "The port ${port.localPort} is now public"
val notification = manager.notificationGroup.createNotification(message, NotificationType.INFORMATION)
ClientId.withClientId(session.clientId) {
val project = RestService.getLastFocusedOrOpenedProject()
notification.notify(project)
}
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many notification is also not nice. Is it possible to update an action? Maybe just make it expirable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was a good idea, unfortunately if I do "Make Public" createSimpleExpiring
- when I click it, it expires all actions including "Open Browser" :(
@andreafalzetti I see these ports too: |
...ckend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/GitpodClientProjectSessionTracker.kt
Outdated
Show resolved
Hide resolved
If I close a client and open again, I don't see notifications it is something with state management. But it is rather minor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/hold
because we need to filter out JB built-in server and CWM ports
@andreafalzetti 5990 is a default port for SSH connection from JB GW. You can hardcore it as to ignore. I'm not sure why built-in server port is not ignored. It seems you are waiting properly for it. |
I think Also, the backend port is |
2221755
to
1e84823
Compare
then you should also add something like to ignore it
|
db680a3
to
96bb30d
Compare
Added 👍 |
96bb30d
to
406ebf8
Compare
/unhold |
Description
This PR introduces ports notification in JetBrains IDEs. 🔔
Context
Currently, when ports become available (e.g. a web server is ready to handle requests and the port is exposed to the internet), in VS Code you get a toast notification within the IDE, to inform you. Additionally, you get an action within the notification to open the browser or the preview (specifically for VS Code, as it supports preview windows). While, for JetBrains IDEs, we didn't yet show any notification when ports became available.
Example notification in VS Code
Approach
The approach used is to listen to supervisor ports status updates (see status.proto).
Gitpod's JetBrains backend-plugin already integrates with supervisor generic notification, so this feature leverages the existing integration and re-uses the same notification group.
After this change, the notifications will appear in the native notifications panel. See example below:
Additionally, we offer to "Make Public" a port when its visibility is private.
Notes
Related Issue(s)
Fixes #9908
How to test
notify
in.gitpod.yml
).gitpod.yml
)Release Notes
Documentation