Expand description
BC.7 (2026-06-24): the crate-owned install(boot) entry point.
The multibuffer subsystem registers its own modes + commands + services +
off-keystroke wake through the generic [SubsystemBoot] surface,
collapsing the host’s ~6 scattered editor_boot sites into one Phase-B
line (lattice_multibuffer::install(&mut boot)) — the terminal /
claude-code / diff shape.
§What collapses here
- The registry handle ([
InMemoryMultibufferRegistry::handle]) is created insideinstall— multibuffer-owned, because it carries no host-state dependency (unlike diff’s resolver-backedDiffSubsystemHandleor terminal’s host-BufferRegistry-backedTerminalStoreHandle, both of which the host must construct). It is used for mode registration + the excerpt-jump motion handlers, and published as a service the host reads back at dispatch time (Editor::resolve_narrow_target) viaservices.get::<MultibufferRegistryHandle>(). - Modes —
multibuffer-mode(+ itsDocumentClosedcleanup subscriber),narrow-mode, and thesearchprovider mode. - Commands — the excerpt-jump motions (
]e/[e/]E/[E), the:multibuffer-*ex-commands,:narrow/:widen, theznnarrow operator SPEC, and the:searchex-command. - Services — the registry handle + the project-search service.
- The off-keystroke wake —
boot.wake_on_event::<MultibufferExcerptsReady>(), replacing the host’s hand-rolled mpsc→async_landedforwarder so streamed search excerpts repaint without a keypress. The wake is now a property of the primitive (BC design §3), not by-discipline.
§What stays host-side (documented residue, NOT mode-ownership violations)
- The
znnarrow-operator binding at the universal operator-pending (Builtin) layer. The operator spec/handler lives here (crate::providers::narrow::register_narrow_operator); only the binding is host-side, becauseznis universal grammar — it composes with the universal motion/text-object vocabulary and needs the host-resolvedBuiltins. This is the same category aslattice-syntax’s structural text objects (N.1.4c): registered-in-crate, bound-at-Builtin. There is no single “owning mode” for a universal operator. BC.7 decision (A): the host resolves the operator by name (registry.id_by_name("operator:narrow")), so the registration return value no longer threads through the host — the K.2.5 motion name-resolution pattern. - Host
Effectappliers —Editor::resolve_narrow_target+ theAppEffect::{SearchTrigger,NarrowTrigger,NarrowLines,NarrowWiden,MultibufferExpand}dispatch arms mutate&mut Editor(open buffers, pane tree, splits) — the Effect-vocabulary-is-the-host-boundary rule (diff’sdo_diff_*precedent). The trigger substrate fns (project_search,create_narrow_view,multibuffer_expand_excerpt_at) are crate-owned helpers those arms call. - The generic
event_busservice stays a Phase-A host primitive — many subsystems consume it; it is not multibuffer-owned.
Functions§
- install
- Wire the multibuffer subsystem’s modes + commands + services + wake into the
editor at boot. One Phase-B line in
editor_boot.rs.