Skip to content

Detect stale terminal connection after inactivity and block input behind reconnect overlay #52

@guysmoilov

Description

@guysmoilov

Problem

After periods of tab inactivity, the UI can look healthy but terminal input no longer reaches tmux. This makes the app appear functional while silently dropping user commands.

Expected Behavior

If terminal connectivity is stale/broken, the frontend should detect it and immediately show a full-screen reconnecting state instead of allowing normal interaction.

Proposal

Add explicit liveness detection for terminal/control channels and gate the UI when command delivery is not possible.

Required UX

  • Show full-screen blocking overlay with reconnecting spinner/message
  • Prevent typing/sending commands while disconnected or degraded
  • Automatically clear overlay once connectivity and send-path health are restored

Scope

  • Define connection health model (control WS + terminal WS + send-path readiness)
  • Detect stale connections after tab background/foreground transitions
  • Trigger reconnect flow on failed sends, missed heartbeats, or terminal channel silence (as appropriate)
  • Ensure user cannot waste time entering commands during outage

Acceptance Criteria

  • Repro case: leave tab inactive, return, stale terminal is detected
  • Overlay appears and blocks terminal/compose input when sends are not possible
  • Reconnect attempts are visible and automatic
  • Overlay dismisses only after verified recovery
  • Tests cover at least one inactivity recovery path and one blocked-input path

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendFrontend/UI codearea:networkConnections and client networkingarea:uxUser experience and interaction designenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions