Skip to content

Conversation

@marioserrano09
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 1, 2025 19:54
@marioserrano09 marioserrano09 merged commit 5dfe527 into main Dec 1, 2025
2 checks passed
Copy link

Copilot AI left a 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 improves the WebSocketPushSender class by adding a new checkDesktop() method to validate WebSocket session availability and auto-reconnect if needed. Additionally, all module versions are bumped from 5.4.7 to 5.4.8.

  • Refactored handler retrieval into a reusable private method getHandler()
  • Added new checkDesktop() method to verify and restore WebSocket connections
  • Improved Javadoc comment for initWS() method

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
zk/src/main/java/tools/dynamia/zk/websocket/WebSocketPushSender.java Added checkDesktop() method, extracted getHandler() helper method, improved documentation
zk/pom.xml Version bump to 5.4.8
web/pom.xml Version bump to 5.4.8
viewers/pom.xml Version bump to 5.4.8
ui/pom.xml Version bump to 5.4.8
templates/pom.xml Version bump to 5.4.8
starter/pom.xml Version bump to 5.4.8
reports/pom.xml Version bump to 5.4.8
pom.xml Version bump to 5.4.8
navigation/pom.xml Version bump to 5.4.8
io/pom.xml Version bump to 5.4.8
integration/pom.xml Version bump to 5.4.8
domain/pom.xml Version bump to 5.4.8
domain-jpa/pom.xml Version bump to 5.4.8
crud/pom.xml Version bump to 5.4.8
commons/pom.xml Version bump to 5.4.8
app/pom.xml Version bump to 5.4.8
actions/pom.xml Version bump to 5.4.8

Comment on lines +135 to +143
public static void checkDesktop(Desktop desktop) {
var handler = getHandler();
if (handler != null) {
var session = handler.findSession(desktop);
if (session == null || !session.isOpen()) {
initWS();
}
}
}
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

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

The checkDesktop() method is missing the @param Javadoc tag for the desktop parameter. According to the project's coding guidelines, all public methods must include complete Javadoc with parameters documented using @param.

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +143
public static void checkDesktop(Desktop desktop) {
var handler = getHandler();
if (handler != null) {
var session = handler.findSession(desktop);
if (session == null || !session.isOpen()) {
initWS();
}
}
}
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

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

The checkDesktop() method calls initWS() which operates on Executions.getCurrent().getDesktop() (via ZKUtil.isInEventListener()), but the Desktop parameter passed to checkDesktop() is not used by initWS(). This means the WebSocket will be initialized for the current execution context's desktop, not necessarily for the desktop parameter being checked. This could result in initializing the wrong Desktop's WebSocket connection.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants