-
Notifications
You must be signed in to change notification settings - Fork 98
Add status endpoint #133
base: master
Are you sure you want to change the base?
Add status endpoint #133
Conversation
fe7fcb0
to
1b08e11
Compare
Codecov Report
@@ Coverage Diff @@
## master #133 +/- ##
============================================
- Coverage 25.19% 25.03% -0.16%
Complexity 63 63
============================================
Files 132 133 +1
Lines 3890 3918 +28
Branches 407 409 +2
============================================
+ Hits 980 981 +1
- Misses 2889 2916 +27
Partials 21 21
Continue to review full report at Codecov.
|
|
||
@Serializable | ||
data class ClientClipboardEvent( | ||
val stringContent: String, // TODO: support more types | ||
) : ClientEvent() | ||
) : ClientNonUserEvent() |
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.
Why clipboard is not a user event? It's intentionally initiated by user
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.
I consider this one as a non-user because it happens when clipboard content on the client side is changed. Well, in Web Client, it's currently generated just before a user presses Ctrl+V, but it's a limitation of the browser that we can't easily listen to clipboard updates system-wide (I have some noted thoughts how we can support listening in the future; and there shouldn't be any problems when implementing listeners for native apps).
So this is low-level clipboard sync event, it's not user-generated.
I agree it's unclear.
Do you think adding a comment for ClientClipboardEvent
like the following is enough here?
/** A change of the clipboard content of the client-side has happened. */
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.
I think comment should mention that change happened because of 'low-level clipboard sync event'
|
||
@Serializable | ||
data class ClientSetKeymapEvent( | ||
val keymap: UserKeymap, | ||
) : ClientEvent() | ||
) : ClientUserEvent() |
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.
Inverse situation of clipboard: isn't keymap updated automatically? Or please specify what you understand saying user and non-user event
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.
Currently, in the Web Client, indeed this event is sent only during the start of the connection. However, it can be implemented that a user can send this event manually. That's why I've selected to make it ClientUserEvent.
I agree that it's a bit unclear how to divide events. Initial though for this is to allow the server to understand if this action is counted as user activity or not. Maybe the naming user and non-user isn't good here. Maybe we can have a call and brainstorm it?
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.
Feel free to schedule a call on Tuesday or Wednesday. Also I plan to work about a half of Monday, so it's also an option
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.
This is PR is not in priority so let me add this topic to the weekly meeting
This PR adds a new
/status
endpoint. The main purpose is to use it in Projector in Space for auto hibernation and health check, but it can be also used any way you want.Paired PR: JetBrains/projector-server#114