Skip to content

serial monitor: emit port_disconnected events when the daemon reader loses the port #636

Closed

Description

@zackees

Refs #592.\n\n## Context\n\nThe #592 rollout calls for structured disconnect / re-enumeration events so clients do not guess whether a serial port is alive. Today the serial reader logs a read error and stops, but WebSocket subscribers only receive serial data frames; there is no structured port_disconnected event for clients to handle.\n\n## Acceptance\n\n- The daemon's shared serial manager broadcasts a typed disconnect event when the background reader exits due to a non-timeout serial read error.\n- /ws/serial-monitor forwards that event as a structured port_disconnected server message with at least port, reason, and message fields.\n- HTTP/deploy monitor consumers handle the typed event without treating it as serial data.\n- Python client message decoding tolerates the new event variant.\n- Tests cover serialization and consumer handling of the disconnect event.\n\nThis is a first shippable slice of #592 section 3.3; transparent renumber/rebind with rack_serial=True can build on the event channel in a later child issue.

Activity

  1. added a commit that references this issue on Jun 18, 2026
    54e6351
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions