Support https/wss and other Add Device UI improvements#87
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ControllerAddress utility to handle URL normalization and WebSocket endpoint generation. The review feedback suggests adding validation to ensure only 'http' or 'https' schemes are accepted to prevent errors in WebSocket URL construction, and recommends replacing the deprecated appendingPathComponent method with the modern appending(path:) API.
962d280 to
8cb8461
Compare
8cb8461 to
9d29682
Compare
|
/gemini review |
|
/gemini summary |
There was a problem hiding this comment.
Code Review
This pull request implements support for secure connections (HTTPS/WSS) and improves device address normalization across the application. Key changes include the addition of computed URL and WebSocket URL properties to the Device model, a redesigned device addition interface featuring a secure connection toggle and custom naming, and fixes for path construction in the update service. Review feedback identifies an empty localization entry for 'Device Added' and recommends refactoring duplicated address normalization logic into a shared utility to improve maintainability.
Summary of ChangesThis pull request introduces robust support for secure connections (HTTPS/WSS) by standardizing how device URLs are stored and processed throughout the application. It refactors the device addition flow to provide a more native user experience, including manual URL entry, custom naming, and better feedback during the connection process. These changes ensure consistent URL handling across webviews, websocket clients, and OTA update services. Highlights
Activity
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request enhances device management by introducing a centralized DeviceAddressNormalizer and updating the Device model to provide computed url and webSocketURL properties. The "Add Device" interface has been refactored to support custom device names and a toggle for secure connections, while the underlying services now utilize the normalized address logic. Additionally, the PR fixes a file path bug in the update service and improves the UI for device status and addition. Review feedback highlights a potential desync in the secure connection toggle logic and identifies localization issues with interpolated strings in SwiftUI views.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Implements the following changes
URL Handling
User Interface
DeviceAddView:
DeviceInfoTwoRows: