Beagle SCM
Context
The pager can view and click but not edit; dropping to a shell to edit the file on screen breaks the flow.
- Verbs take (context, arg) and resolve via resolve(context, arg) (BE-030); a typed
:vim inherits the view's context — the current file rides the context URI's path (BE-046 launch-context threading included).
- The pager runs raw-mode fullscreen on /dev/tty (views/bro/pager.js); an editor needs the tty handed over (cooked mode, alt-screen released) and taken back on exit.
Goals
vim and nvim verbs (ONE shared implementation, two names): open the editor on the currently open file (:vim bare = the view's file; vim <path> = an explicit file, context-resolved).
- on editor exit: return to the pager and REFRESH the current view (re-drive its spell — the edit must show).
- outside the pager (plain CLI
jab vim <file>): just exec the editor on the resolved file.
Constraints
- the fs path comes from resolve(context, arg) — confined, NAVESCAPE on climbs; no raw path math, no regex URI parsing.
- needs a child-process + tty handover story — survey the existing exec/spawn bindings (shared/wire.js local/ssh sessions) FIRST; if jab lacks a tty-passthrough exec, that is a BLOCKER to report, not to improvise around.
- editor binary = the verb's own name (vim →
vim, nvim → nvim); no $EDITOR magic in this ticket.
WIP
Design decisions
- bindings exist, no blocker: io.spawnFds (execvp, -1 = inherit, /dev/tty handover) + io.reap (wait); tty.raw/cook stateless; wire.js already spawns this way.
- editor gate = a
fn.tty marker on the handler (the _isMutation pattern); the pager owns suspend/resume (fd + termios), the VERB owns spawn+wait; binary = be.verb (vim|nvim, one impl).
- new
be.context (the nav context URI on mintBe) so a bare editor verb sees the view's file, not just its dir.
TODOs
Blockers and bummers
- change sits UNCOMMITTED in work/BE-047 (3 mod: core/loop.js, views/bro/bro.js, views/bro/pager.js; 2 new verbs; 3 test files); suite 171/172 (the 1 red = pre-existing be-js-get-oddname), orchestrator re-ran the new test green.
- UX nuance (needs a ruling?): only a NAV'D view carries a FILE in its context —
:vim right after jab cat f (launch view, no navigation yet) refuses VIMNONE, per the context-only-changes-by-navigation law.
Outcome