Skip to content

Investigate: OverviewView re-fetches full terminal list on every lifecycle event #201

@danshapiro

Description

@danshapiro

Opportunity

OverviewView.tsx calls api.get('/api/terminals') to fetch the entire terminal list every time it receives terminals.changed, terminal.exit, terminal.detached, or terminal.attach.ready WebSocket events. This is an unbounded full-list re-fetch for what is often a single-terminal change.

Analysis

The server already broadcasts terminals.changed with a revision number. The terminal directory read model and revision-based polling infrastructure already exist. The fix would be to use these existing mechanisms instead of re-fetching the full list, or adopt a delta pattern with upsert/remove events similar to terminal.meta.updated.

Impact

Medium impact, low complexity. With many terminals open, each lifecycle event triggers a full HTTP round-trip and JSON parse of the entire terminal directory.

Action

Investigate and validate this opportunity. Determine the right implementation approach following TDD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions