Skip to content

fix(terminal): make history truncation visible and recoverable #258

Description

@DodgyBadger

Problem

Terminal output can appear truncated or lost after tab switches or reloads. History is split across browser xterm scrollback, the server byte buffer, and tmux history. Later tab switches fetch a 1 MB tail, full-history responses can be capped, and the current truncation notice is only a faint line inside the terminal where it is easy to miss.

Relevant paths:

  • app.js terminal fetch/replay and TERMINAL_TAIL_SIZE
  • GET /api/sessions/:id/terminal truncation handling
  • tmux, server, and browser history limits

Expected behavior

Clearly distinguish an intentionally partial replay from actual retained-history loss, and give users an obvious way to request available full history.

Acceptance criteria

  • Show a persistent, accessible partial-history indicator outside terminal output.
  • Offer Load full history when more retained history may be available.
  • Accurately communicate when the oldest history has been permanently evicted.
  • Preserve current performance safeguards and add focused replay/truncation tests.

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions