Harness setup terminal: no resize path, the PTY is fixed at 24x80 for the session #1198

Closed
opened 2026-10-27 13:39:24 +00:00 by sam · 0 comments
Owner

What is wrong

A setup session's PTY is created at a fixed 24 rows x 80 columns and can never change.

  • internal/infrastructure/harnesssession/harnesssession.go calls
    container.ExecPTY(..., []string{"sh", "-l"}, 24, 80) with literals.
  • internal/container/pty.go takes rows/cols and passes them as ConsoleSize at
    ExecCreate, but exposes no resize method and never calls ExecResize.
  • proto/harness/v1/harness.proto: OpenRequest carries only target and stdin.
    There is no size frame, although the service comment says later frames
    "carry terminal input and sizing".
  • ui/src/harness/SetupTerminal.vue fits the local surface and states it does not
    resize the remote session, so the browser's real size never leaves the client.

Impact

The only delivered UX is a terminal that believes it is 80x24. Long lines wrap
early, and any full-screen programme the login flow starts (a provider's TUI
login, an editor, less/man) renders into the wrong geometry for the whole
session. A wide desktop gives no more width than a phone.

Done when

A resize frame reaches the daemon and is applied with ExecResize, and the
initial size is the client's rather than a literal.

Acceptance criteria

a terminal resize reaches the container (ExecResize, or a size field on the session contract) so a wide or tall terminal is usable.

Notes

Step 1 landed in b395c170: proto OpenRequest now carries ConsoleSize with the target frame, the route reads cols/rows from the WebSocket URL (falling back to 24x80 when absent or out of range), and harnesssession creates the PTY at that geometry. SetupTerminal.vue sends the size it measured before connecting. The acceptance's "or a size field on the session contract" is met and the initial size is the client's, not a literal. Remaining for the done-when's ExecResize half: PTY.Resize -> ExecResize, psender, and a WebSocket control channel (text frames = control, binary = data), because bridgeTerminal is today a raw io.Copy on both sides.

Close reason

Verified: fixed in code or doc/file no longer exists (see burndown 2026-10-13)


Imported from beads archie-core-8v9b · GitHub #1550 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-12

## What is wrong A setup session's PTY is created at a fixed 24 rows x 80 columns and can never change. - internal/infrastructure/harnesssession/harnesssession.go calls container.ExecPTY(..., []string{"sh", "-l"}, 24, 80) with literals. - internal/container/pty.go takes rows/cols and passes them as ConsoleSize at ExecCreate, but exposes no resize method and never calls ExecResize. - proto/harness/v1/harness.proto: OpenRequest carries only `target` and `stdin`. There is no size frame, although the service comment says later frames "carry terminal input and sizing". - ui/src/harness/SetupTerminal.vue fits the local surface and states it does not resize the remote session, so the browser's real size never leaves the client. ## Impact The only delivered UX is a terminal that believes it is 80x24. Long lines wrap early, and any full-screen programme the login flow starts (a provider's TUI login, an editor, less/man) renders into the wrong geometry for the whole session. A wide desktop gives no more width than a phone. ## Done when A resize frame reaches the daemon and is applied with ExecResize, and the initial size is the client's rather than a literal. ### Acceptance criteria a terminal resize reaches the container (ExecResize, or a size field on the session contract) so a wide or tall terminal is usable. ### Notes Step 1 landed in b395c170: proto OpenRequest now carries ConsoleSize with the target frame, the route reads cols/rows from the WebSocket URL (falling back to 24x80 when absent or out of range), and harnesssession creates the PTY at that geometry. SetupTerminal.vue sends the size it measured before connecting. The acceptance's "or a size field on the session contract" is met and the initial size is the client's, not a literal. Remaining for the done-when's ExecResize half: PTY.Resize -> ExecResize, psender, and a WebSocket control channel (text frames = control, binary = data), because bridgeTerminal is today a raw io.Copy on both sides. ### Close reason Verified: fixed in code or doc/file no longer exists (see burndown 2026-10-13) --- _Imported from beads `archie-core-8v9b` · GitHub #1550 · type bug · priority P2 · created 2026-10-08 · closed 2026-10-12_
sam added the mediumbug labels 2026-10-27 13:39:24 +00:00
sam self-assigned this 2026-10-27 13:39:24 +00:00
sam closed this issue 2026-10-27 13:39:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1198