BRO-027: jab pager must use the xterm alternate screen buffer (smcup/rmcup)

Now
DONE

The JS pager paints over the user's normal screen: enter does tty.raw + hide-cursor + ESC[2J clear, exit clears again the shell's screen content is destroyed and the pager frame pollutes scrollback. vim/less switch to the alternate screen buffer (ESC[?1049h on enter, ESC[?1049l on exit) so the prior screen is restored intact on quit. Do the same in Bro pager, views/bro/pager.js.

Input

Context

views/bro/pager.js run(): line 956 tty.raw(this.fd), then ttyWrite(fd, HIDE_CUR + MOUSE_ON + PASTE_ON); the finally at 977 writes MOUSE_OFF + PASTE_OFF + ESC[0m + SHOW_CUR + CLEAR + tty.cook. No ?1049 anywhere in be/.

Goals

Bracket the whole raw-mode session in the alternate screen buffer, restoring the user's screen on every exit path.

Constraints

WIP

Design decisions

?1049 (save cursor + alt screen + clear, restore on l) over the legacy ?47+?1048 pair it is the terminfo smcup/rmcup pair on every terminal jab targets.

TODOs

Blockers and bummers

Editor handover (_suspend/_resume, pager.js ~1041, BE-047) cooks/re-raws WITHOUT leaving the alt screen a spawned vim doing its own ?1049h/l may drop back to the NORMAL screen under the pager on exit. Out of this ticket's scope, left untouched (test/bro/vim green); candidate follow-up ticket.

Outcome

Landed in worktree work/BRO-027, NOT merged: ?972f8b60 (pager.js + test bump), ?4235044a (test subtree: test/bro/altscreen/ run.sh+alt.js, ctest name be-js-bro-altscreen). ALT_ON/OFF at pager.js:73, bracket at :1324/:1345. Suite 267/267 (-LE big); orchestrator re-verified the test solo.