Skip to content

Separate per-connection capability state from process startup defaults #353

Description

@stalep

Review of terminal-detect, terminal-api, and terminal-tty at 859020a6 on 2026-09-28.

Review item: Design 2
Priority: P2
Evidence: Cross-connection shared-state coupling confirmed in call paths.

Problem / scope

Every EventDecoder theme notification calls the process-global
TerminalCapabilities.onThemeChanged(). EventDecoder is also used for remote
SSH/Telnet/HTTP connections. A client's theme can therefore alter global local
defaults, and TerminalFeatures consults shared probe results for per-connection
mode answers. Startup defaults and an individual terminal's state need distinct
ownership.

Source at the reviewed commit

Acceptance criteria

  • Define which capabilities belong to an individual Connection and how standalone defaults seed a local connection.
  • Test two connections with conflicting themes/modes without cross-contamination.
  • Preserve a simple standalone API and decide a compatible migration path for existing consumers.

Tracking

Part of #300. Related: #293, #292.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions