feat: pager escape hatch (#56) + deterministic EOF test (#63) - #64
Merged
Conversation
…#63) The #44b idle-to-EOF integration test flaked ~2/7 on the macOS 3.2 CI leg (rc 124): EOF arrival depended on a fifo writer's wall-clock hold racing runner scheduling. The fixture now causes EOF from inside an on_key handler (exec 0</dev/null on a sentinel key), so key ordering — not elapsed time — decides. Idle-survival coverage remains at the reader level (test-read-eof.sh held-fifo cases), which are race-free by construction: no data ever arrives, so a timeout tick is guaranteed and asserted. Same treatment for the #51 throttle decision table: frozen clock stub instead of two live now() calls that could straddle the 33 ms window under load (measured 6/20 in a loaded bash 5 container). Verified: host 10/10, /bin/bash 3.2 5/5, container 3.x 3/3, throttle-loop 5/5 — zero flakes.
…ts (#56) New src/pager.sh: shellframe_pager_requested (SHELLFRAME_DUMP=1), shellframe_dump_lines (ANSI/C0-stripped plain-text dump), and shellframe_pager_view (exits alt screen + restores cooked tty, runs ${PAGER:-less} with stdio on /dev/tty so the $() contract holds). Wired: - v1 table + action-list: 'v' builds a sanitized dump and suspends to the pager using each widget's saved-stty global; redraw on return. SHELLFRAME_DUMP=1 prints the dump to stdout and skips the TUI. - v2 list regions: 'v' returns rc 4 with SHELLFRAME_PAGER_FILE; the shell runtime owns suspension (its saved stty) and force-rebuilds the screen afterwards. PTY-validated round trip on both architectures: content visible in PAGER=cat, chrome redrawn intact after. Grid/menu wiring follows the same three-line pattern; left as contributor follow-ups.
…eview) - PAGER='less -R' silently fell back to cat: the whole string was type-checked as one binary. Now split into words, probe the binary, and warn on stderr when falling back. - shellframe_dump_lines had a bespoke sed strip that leaked OSC payloads (\033]0;t\007plain → '0;tplain'); it now routes every line through shellframe_sanitize (#45), matching full CSI/OSC/DCS/nF + C0 coverage on BSD and GNU sed alike. Tests: OSC-payload dump case (unit), PAGER-with-args round trip and missing-pager fallback warning (PTY).
Owner
Author
Verdict: approved — merge-ready (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-picks the two commits that landed after PR #62 merged:
src/pager.sh):shellframe_pager_view(alt-screen exit → cooked tty →shellframe_dump_lines,SHELLFRAME_DUMP=1non-interactive mode. Wired into v1 table/action-list and v2 list regions.Review follow-ups already addressed (from the pre-merge review)
PAGER="less -R"now works: arguments split, binary probed, fallback to cat warns on stderrshellframe_dump_linesreusesshellframe_sanitize— OSC payloads no longer leak through the bespoke sed stripTest plan