Skip to content

feat: pager escape hatch (#56) + deterministic EOF test (#63) - #64

Merged
fissible merged 3 commits into
mainfrom
fix/56-63-followup
Aug 26, 2026
Merged

feat: pager escape hatch (#56) + deterministic EOF test (#63)#64
fissible merged 3 commits into
mainfrom
fix/56-63-followup

Conversation

@fissible

Copy link
Copy Markdown
Owner

Summary

Cherry-picks the two commits that landed after PR #62 merged:

Review follow-ups already addressed (from the pre-merge review)

  • PAGER="less -R" now works: arguments split, binary probed, fallback to cat warns on stderr
  • shellframe_dump_lines reuses shellframe_sanitize — OSC payloads no longer leak through the bespoke sed strip

Test plan

  • Unit: OSC-payload dump parity (12/12 spinner file)
  • PTY: pager round-trip under plain cat, PAGER-with-args, missing-pager warning; deterministic detach fixture
  • Suite 1608/1608 across 55 files; Docker matrix 3/3 PASS (bash 3.2/4.4/5.x)

…#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).
@fissible

Copy link
Copy Markdown
Owner Author

Verdict: approved — merge-ready (bd0bee9)

Re-verified against the head, not the summary:

After merge: feat: commit (#56) → this plus the already-merged #62 makes v0.6.0.

🤖 Generated with Claude Code

@fissible
fissible merged commit 3026113 into main Aug 26, 2026
2 checks 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

1 participant