Skip to content

examples(refactor): Use the public pane wait - #197

Merged
tony merged 2 commits into
qualified-read-hooksfrom
notebook-pane-wait
Dec 6, 2026
Merged

tony merged 2 commits into
qualified-read-hooksfrom
notebook-pane-wait

Conversation

@tony

@tony tony commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #184.

What changed, and why

The README notebook example used its own capture loop after the public bounded wait shipped. It now uses Pane.wait_for_text/4 for the ready line and saved-note receipt. The omitted-Enter example reports its last screen on timeout.

Checks run

The normal run printed the receipt. Omitting Enter returned the documented timeout and screen. The packed public examples ran on upstream tmux 3.8.

  • Notebook success and timeout passed in 6.06 s.
  • Packed examples passed in 73.10 s.

Review evidence

The notebook example consumes Pane.wait_for_text/4 for both readiness and the saved-note receipt. The pane API owns the timeout and last-screen evidence.

This changes the example only. The complete program printed the receipt with Enter and returned its documented timeout evidence when Enter was omitted. The packed examples ran through the consumer entry point.

Merge stack

This PR follows #196 in the tested merge order. The comparison shows this PR’s own changes. Stack #206 · Changes in this PR

All six required Linux jobs passed on 72144885d. GitHub records the stack merge at 15b285de9. CI run · Merged commit

Tool use

Codex extracted this change from #169 and ran the checks above on the topic branch. A separate Codex reviewer checked the component boundaries and the two corrected test fixtures.

tony added 2 commits December 5, 2026 19:05
why: The notebook example carried its own capture loop after the
library gained a public wait with the same deadline and screen data.
README readers had to copy the loop to follow the example.

what:
- Wait for the notebook's ready line and receipt through the pane API.
- Keep the missing-Enter diagnostic and its process exit status.
@tony
tony changed the base branch from main to qualified-read-hooks December 6, 2026 01:07
@tony
tony force-pushed the notebook-pane-wait branch from 9f12b85 to 7214488 Compare December 6, 2026 01:08
@tony
tony added this pull request to stack #206 December 6, 2026 01:08
@tony
tony merged commit 15b285d into main Dec 6, 2026
6 of 10 checks passed
tony added a commit that referenced this pull request Dec 6, 2026
why: A tmux hook could add output to a pane or option read. A large
MCP reply could hide an operation outcome or advance a cursor before
the client received the page.

what:
- Fit the Program listener to the server socket path, wake waiters on
  exit, and retry pane removal after a lost reply (#191, #192, #193).
- Keep MCP operation outcomes readable and size pages before advancing
  their cursors. Show the STDIO client reading a result (#194, #195).
- Keep hook output out of pane captures and option reads. Use
  `Pane.wait_for_text/4` in the notebook (#196, #197).
- Check root exit separately from trace delivery in cold-start tests
  (#198).
- Document checkout dependencies, inherited sockets and capability
  APIs (#199, #200, #201).
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.

The notebook example reimplements the public pane wait

1 participant