Skip to content

Expose production read-screen capture-pane APIs - #219

Merged
lawrencecchen merged 1 commit into
mainfrom
issue-152-153-read-screen-production
Feb 21, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
issue-152-153-read-screen-production

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • expose read_screen in production socket command routing and add --scrollback / --lines parsing
  • add production v2 surface.read_text method and include it in system.capabilities
  • add CLI read-screen command wired to surface.read_text with help/usage docs
  • update tests_v2 client text-read helper to prefer surface.read_text (with fallback)
  • add regression test tests_v2/test_read_screen_capture_pane_parity.py covering capabilities + CLI behavior

Issues

Validation

  • xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build
  • CMUX_TAG=issue-152-153-read-screen CMUX_SOCKET=/tmp/cmux-debug-issue-152-153-read-screen.sock CMUX_SOCKET_PATH=/tmp/cmux-debug-issue-152-153-read-screen.sock CMUXTERM_CLI=/tmp/cmux-issue-152-153-read-screen/Build/Products/Debug/cmux python3 tests_v2/test_read_screen_capture_pane_parity.py
  • CMUX_TAG=issue-152-153-read-screen CMUX_SOCKET=/tmp/cmux-debug-issue-152-153-read-screen.sock CMUX_SOCKET_PATH=/tmp/cmux-debug-issue-152-153-read-screen.sock CMUXTERM_CLI=/tmp/cmux-issue-152-153-read-screen/Build/Products/Debug/cmux python3 tests/test_blank_screen.py

Implements capture-pane parity item from #153 by shipping production read-screen support from #152.
@cmux-agent

cmux-agent Bot commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit b163c2b.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

@vercel

vercel Bot commented Feb 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Feb 21, 2026 0:23am

@lawrencecchen
lawrencecchen merged commit 71a8644 into main Feb 21, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b163c2bbf3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2403 to +2405
let response = readTerminalTextBase64(
surfaceArg: v2String(params, "surface_id") ?? "",
includeScrollback: includeScrollback,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve read_text against requested workspace

surface.read_text ignores workspace_id (and the workspace implied by surface_id) because it forwards only surface_id into readTerminalTextBase64, which always reads from tabManager.selectedTabId. In a multi-workspace session, calling surface.read_text (or cmux read-screen --workspace ...) for a non-selected workspace will read the wrong surface or return "Terminal surface not found" even when the target workspace/surface exists; this is a correctness regression compared with other surface.* v2 methods that resolve the workspace from params.

Useful? React with 👍 / 👎.

@lawrencecchen
lawrencecchen deleted the issue-152-153-read-screen-production branch February 21, 2026 00:26
lawrencecchen added a commit that referenced this pull request Feb 21, 2026
Addresses review feedback from #219 by resolving read-screen targets against requested workspace/surface instead of the selected workspace.
@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Follow-up fix is up in #220. It updates to resolve reads against the requested / instead of the selected workspace, and adds non-selected-workspace regression coverage in .

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Follow-up fix is up in #220. It updates the surface.read_text implementation to read from the requested workspace_id/surface_id context (not just the selected workspace) and adds non-selected-workspace regression coverage in tests_v2/test_read_screen_capture_pane_parity.py.

JINWOO-J pushed a commit to JINWOO-J/term-mesh that referenced this pull request Mar 17, 2026
Addresses review feedback from manaflow-ai/cmux#219 by resolving read-screen targets against requested workspace/surface instead of the selected workspace.
bn-l pushed a commit to bn-l/cmux that referenced this pull request Apr 3, 2026
…d-screen-production

Expose production read-screen capture-pane APIs

This branch was successfully deployed

1 active deployment
Preview — b163c2bb Deployed Feb 21, 2026 by vercel[bot]
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.

Expose read-screen / capture-pane in production builds

1 participant