Skip to main content

Crate lattice_dashboard

Crate lattice_dashboard 

Source
Expand description

Lattice launch dashboard — the branded start page shown when the editor opens with no file argument.

This crate (DB.1) is the pure library core: the DashboardSection trait, the DashboardRegistry extensibility seam, the DashboardFragment content contract, the eight built-in sections, and the dashboard.* config options. The editor wiring — the read-only *dashboard* buffer, the dashboard-mode major mode, the :dashboard command, the dashboard.* theme elements, the branding terminal-art, and the startup trigger — lands in later slices (DB.2+).

Design: docs/dev/architecture/dashboard.md. Slice plan: docs/dev/operations/slice-plans/dashboard.md.

Re-exports§

pub use branding::BRANDING_ROW_COUNT;
pub use branding::DashboardBrandingProvider;
pub use branding::branding_block_width;
pub use fragment::Align;
pub use fragment::DashboardFragment;
pub use fragment::DashboardRole;
pub use fragment::DashboardRow;
pub use fragment::DashboardSpan;
pub use fragment::LinkTarget;
pub use install::install;
pub use mode::DashboardMode;
pub use mode::register_dashboard_modes;
pub use options::Dashboard;
pub use options::DashboardEnabled;
pub use options::DashboardSections;
pub use options::DashboardSource;
pub use registry::DashboardRegistry;
pub use registry::DashboardRegistryHandle;
pub use registry::SectionSelection;
pub use section::DashboardCtx;
pub use section::DashboardSection;
pub use sections::builtin_registry;
pub use theme::DashboardElementIds;
pub use theme::register_dashboard_theme_elements;

Modules§

branding
The branding block (DB.4): the Lattice mark + wordmark, rendered as custom-colored virtual rows anchored above the first document line.
fragment
The content contract between a section and the dashboard compositor.
install
Wire the dashboard subsystem into the editor at boot (DB.2, DB.5, DB.6). Called from the host’s Phase-B install list (editor_boot.rs) — the only host touch-point the mode-ownership acid test allows.
mode
dashboard-mode — the major mode for the *dashboard* launch buffer (DB.2). It is self-contained: it contributes the read-only / gutterless option set directly (the same set help-mode contributes), so the dashboard needs no help-mode dependency for behaviour. <CR>-follow and Esc reuse the help machinery via the BufferKind::Dashboard gates (dashboard.md §9.2), not via a mode.
options
Dashboard configuration, owned by the dashboard subsystem ([[feedback_mode_owns_its_surface]]), not host core. Self-registers via linkme like every other options! block; the host’s init_from_linkme() walks the global slice at boot, so linking lattice-dashboard into the binary (it always is — install runs in the Phase-B list, DB.2) picks these up automatically.
registry
The section registry — the single extensibility seam.
section
The section trait and the read-only facts passed to it.
sections
The nine built-in dashboard sections (native Rust — the built-in surface stays native, like the vim grammar). Each is a small pure renderer; the branding art and custom theme roles are layered on in later slices, but the text content and roles are real here.
theme
The dashboard.* theme element vocabulary (DB.3).