-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add window recording support to protocol and libraries #52
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
Conversation
14a2229 to
3f50ccd
Compare
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.
Pull request overview
This PR adds comprehensive window recording support to the NOW protocol (version 1.5), enabling tracking of active window changes and title updates across the remote session. The implementation includes new protocol messages, capability flags, and full integration into both Rust and .NET libraries with corresponding test coverage.
- Introduces three new session messages:
WindowRecStart,WindowRecStop, andWindowRecEventfor controlling and receiving window recording events - Updates protocol version from 1.4 to 1.5 and adds the
WINDOW_RECORDINGcapability flag - Provides complete implementations in Rust (
now-proto-pdu) and .NET (Devolutions.NowProto) with handlers and CLI examples
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
rust/now-proto-pdu/src/session/window_rec_start.rs |
Implements WindowRecStart message with polling interval and title tracking flag |
rust/now-proto-pdu/src/session/window_rec_stop.rs |
Implements WindowRecStop message to terminate window recording |
rust/now-proto-pdu/src/session/window_rec_event.rs |
Implements WindowRecEvent message with three event types: active window, title changed, and no active window |
rust/now-proto-pdu/src/session/mod.rs |
Integrates new window recording messages into session message enum and routing |
rust/now-proto-pdu/src/channel/capset.rs |
Adds WINDOW_RECORDING capability flag and updates protocol version to 1.5 |
rust/now-proto-testsuite/tests/proto/session.rs |
Adds comprehensive roundtrip tests for all window recording messages |
rust/now-proto-testsuite/tests/proto/channel.rs |
Updates expected byte sequences for capability tests due to version bump |
dotnet/Devolutions.NowProto/src/SessionMessageKind.cs |
Adds window recording message kind enumerations |
dotnet/Devolutions.NowProto/src/NowProtoVersion.cs |
Updates protocol version to 1.5 |
dotnet/Devolutions.NowProto/src/Messages/NowMsgSessionWindowRecStart.cs |
.NET implementation of window recording start message |
dotnet/Devolutions.NowProto/src/Messages/NowMsgSessionWindowRecStop.cs |
.NET implementation of window recording stop message |
dotnet/Devolutions.NowProto/src/Messages/NowMsgSessionWindowRecEvent.cs |
.NET implementation of window recording event message with event data types |
dotnet/Devolutions.NowProto/src/Messages/NowMsgRdmCapabilities.cs |
Fixes timestamp documentation from signed to unsigned representation |
dotnet/Devolutions.NowProto/src/Exceptions/NowDecodeException.cs |
Adds error kind for invalid window recording event flags |
dotnet/Devolutions.NowProto/src/Capabilities/NowCapabilitySession.cs |
Adds WindowRecording capability flag to session capabilities |
dotnet/Devolutions.NowProto.Tests/src/MsgSession.cs |
Adds comprehensive tests for window recording messages |
dotnet/Devolutions.NowProto.Tests/src/MsgChannel.cs |
Updates expected bytes for capability tests |
dotnet/Devolutions.NowClient/src/Worker/WorkerCtx.cs |
Adds window recording event handler registration and message routing |
dotnet/Devolutions.NowClient/src/Worker/CommandSetWindowRecEventHandler.cs |
Command to set window recording event handler |
dotnet/Devolutions.NowClient/src/Worker/CommandSessionWindowRecStart.cs |
Command to start window recording |
dotnet/Devolutions.NowClient/src/Worker/CommandSessionWindowRecStop.cs |
Command to stop window recording |
dotnet/Devolutions.NowClient/src/NowClient.cs |
Public API methods for window recording control with capability checks |
dotnet/Devolutions.NowClient/src/IWindowRecEventHandler.cs |
Interface for handling window recording events |
dotnet/Devolutions.NowClient.Cli/Program.cs |
CLI commands and example handler for window recording |
docs/NOW-spec.md |
Protocol specification for window recording messages and version history update |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
dotnet/Devolutions.NowProto/src/Messages/NowMsgSessionWindowRecEvent.cs
Outdated
Show resolved
Hide resolved
| catch (Exception ex) | ||
| { | ||
| // Rethrow critical exceptions | ||
| if (ex is OutOfMemoryException || ex is StackOverflowException || ex is ThreadAbortException) |
Copilot
AI
Nov 27, 2025
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.
ThreadAbortException has been obsolete since .NET Core 2.0+ and .NET 5+. It's not thrown in modern .NET runtimes. This check should be removed to modernize the code and align with current .NET best practices.
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.
@copilot open a new pull request to apply changes based on this feedback
dotnet/Devolutions.NowProto/src/Messages/NowMsgSessionWindowRecEvent.cs
Outdated
Show resolved
Hide resolved
CBenoit
left a comment
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! Feel free to address the nits found by Copilot and merge 👍
|
@pacmancoder I've opened a new pull request, #54, to work on those changes. Once the pull request is ready, I'll request review from you. |
Addresses review feedback from #52 to remove `ThreadAbortException` checks, which are obsolete in .NET Core 2.0+ and .NET 5+. - Removed `ThreadAbortException` from critical exception checks in `ExecuteRdmActionCommand` and `ExecuteWindowRecStartCommand` ```csharp // Before if (ex is OutOfMemoryException || ex is StackOverflowException || ex is ThreadAbortException) // After if (ex is OutOfMemoryException || ex is StackOverflowException) ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pacmancoder <3994505+pacmancoder@users.noreply.github.com>
ac94040 to
8abd281
Compare
This PR adds new messages for the current active windows tracking.
Issue: ARC-353