Skip to content

Support factory terminal orchestration#322

Merged
danshapiro merged 46 commits into
mainfrom
replacement/factory-terminal-orchestration
May 18, 2026
Merged

Support factory terminal orchestration#322
danshapiro merged 46 commits into
mainfrom
replacement/factory-terminal-orchestration

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Replaces the externally-owned factory terminal orchestration PR #297 with a branch based on current origin/main.

Notes:

  • Ports only the intended factory terminal orchestration behavior.
  • Drops stale unrelated ancestry from the external fork.
  • Keeps current origin/main formatting and branch context.
  • Adds terminal open-or-select orchestration, replayable UI command delivery, and last emitted terminal line metadata.

Verification:

  • npm run test:server -- --run test/server/agent-tabs-write.test.ts -t "opens an existing terminal|selects the existing pane"
  • npm run test:server -- --run test/server/terminals-api.test.ts -t "last emitted terminal line"
  • npm run test:vitest -- test/unit/client/ui-commands.test.ts --run
  • npm run typecheck:server

Baseline note:

  • npm run test:server -- --run test/server/agent-tabs-write.test.ts currently has 5 failures on clean origin/main as well as this branch; this replacement PR does not introduce those failures.

Dan Shapiro added 11 commits May 6, 2026 00:10
OpenCode CLI's TUI enables mouse tracking for click-handling, which
caused the fallbackToCursorKeysWhenAltScreenMouseCapture policy to
intercept scroll events and send up/down arrow keys instead. The CLI
doesn't interpret arrow keys as scroll commands, so scrolling broke.

Change scrollInputPolicy to 'native' so xterm.js passes mouse scroll
SGR sequences through to the CLI, letting it handle them natively.
…creen

- Skip term.scrollLines() in alt screen for touch scrolling (it's a no-op
  since alternate buffer has no scrollback)
- Update opencode scroll/touch test fixtures and assertions to match the
  new native policy: OpenCode no longer translates scroll events to cursor
  keys
@danshapiro danshapiro merged commit 3fb477e into main May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant