-
-
Notifications
You must be signed in to change notification settings - Fork 178
feat: Device Name Display Implementation #2017
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
base: master
Are you sure you want to change the base?
Conversation
- Add getActiveClients() method to WebSocket interface - Add /security/devices/active API endpoint with device name resolution - Add Active Clients navigation menu and page component - Display connected clients with friendly names instead of raw IDs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Test /skServer/security/devices/active endpoint functionality - Verify endpoint returns connected WebSocket clients with device info - Test authentication requirements (admin access only) - Validate response structure includes clientId, description, remoteAddress, etc. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
This reverts commit bc03a96.
Related to ws id visibility on Dashboard, I made this kind of proposal to view devices. |
No biggie, but for PRs with UI changes including screenshots makes it easier to get the overall impression. |
Build failing with
|
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 the idea and alternative client naming scheme is sound, but I am just thinking that does it make sense to create one more view under Security or could this information be incorporated in the Devices list? More menu items and more views is more UI complexity for the user - like in what cases would you use the existing list view and when this?
There's also the overlap with the list in the Dashboard. Would it make sense to leverage that view? Additions there are potentially useful for all SK users, not just for those that have security active.
Another point is client-server comms: statistics on the dashboard and Data Browser update via WebScket without any user interaction. This view is showing real time status - what devices are online now, so as a user I would expect this view to update automatically, without reloading the view.
- Add device name resolution utility from Active Clients feature - Update deltastats to include display names for WebSocket providers - Modify Dashboard to show friendly device names with ID fallback - Remove Active Clients page, route, menu item and API endpoint - Address PR SignalK#2017 review feedback to reduce UI complexity - Resolves issue SignalK#1342 for WebSocket device identification This change improves the Dashboard by showing meaningful device names (e.g., 'OpenCPN', 'SensESP Device') instead of auto-generated IDs (e.g., 'ws.c3f60a8f-c123-4b45-8de7') in the connections activity list. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
I'm going to take a stab at a different approach. The issue I am seeing is regarding the security context and how the dashboard, websocket interface, and delta stats are lacking security context. Instead of adding the new endpoint, I am going to inject security context. Here is a comprehensive plan. Let me know if you would like to keep the new endpoint. It might be useful for something, but not for what is needed to properly display device/client information based on security context. |
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.
Done
@tkurki do you need anything to merge this PR? It's been open for over a month |
Apologies for letting this and the one by @KEGustafsson sit here. The reason is twofold:
So please wait a bit more while I have a go at redoing things a bit differently and circle back to this and #2013 |
Device Name Display Implementation Summary
Overview
Implemented a device name display feature for WebSocket connections in the SignalK Dashboard using a device registry cache approach. This addresses PR 2017 feedback about reducing UI complexity by integrating device names into the existing Dashboard rather than adding new menu items.
What Was Implemented
New Files Created
Modified Files
getActiveClients()
to accept optional security context (backward compatible)Architecture Implementation
Device Registry Cache
deviceUpdated
anddeviceRemoved
eventsName Resolution Priority
Event-Driven Updates
Key Technical Details
ID Matching Solution
ws.{principal-id}
Current Behavior
Testing & Validation
Uploading Screen Recording 2025-06-22 at 2.17.58 PM.mov…