Skip to content

Conversation

@X9X0
Copy link
Owner

@X9X0 X9X0 commented Nov 28, 2025

Summary

Fixes equipment disconnect showing error despite working, and ensures all UI elements are properly cleared after disconnect.

Issues Fixed

1. Disconnect Shows "Failed" Despite Working

Problem:
When clicking disconnect button:

  • Equipment actually disconnected (disappeared from list)
  • But UI showed "Disconnection failed" message
  • Readings and equipment info remained populated

Root Cause:
Server returns:

{"equipment_id": "ps_56fdd3df", "status": "disconnected"}

The server returns {"equipment_id": "...", "status": "disconnected"}
but the UI was checking for a "success" field, causing disconnect to
show as failed even though it worked.

Changes:
- Check for status == "disconnected" instead of success field
- Clear selected_equipment, readings_display, and info_display on disconnect
- Prevents stale readings/info from remaining after disconnect

Fixes disconnect showing "failed" message despite actually working.
Fixed AttributeError where code tried to clear 'info_display' which doesn't exist.
Equipment info is displayed via individual labels (name_label, type_label, etc.)
not a single QTextEdit widget.

Now properly clears all equipment detail labels on disconnect.
@X9X0 X9X0 merged commit 252d0be into main Nov 28, 2025
25 checks passed
@X9X0 X9X0 deleted the claude/fix-disconnect-ui-011YNFgs3A54537srRvDcAe6 branch November 28, 2025 21:40
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.

3 participants