pub enum LayoutBreakpoint {
Narrow,
MediumNarrow,
Medium,
Wide,
UltraWide,
}Expand description
Responsive layout breakpoint based on terminal width.
§Topology Matrix
| Surface | Narrow (<80) | MediumNarrow (80-119) | Medium (120-159) | Wide (≥160) |
|---|---|---|---|---|
| Search | Single pane, focus | Side-by-side tight | Side-by-side balanced | Side-by-side spacious |
| └ Results | Full-width or hide | min 35 cols | min 45 cols | min 50 cols |
| └ Detail | Full-width or hide | min 25 cols | min 32 cols | min 34 cols |
| └ Split handle | None (no split) | Active (draggable) | Active (draggable) | Active (draggable) |
| └ Navigation | Focus toggles pane | Focus + mouse + drag | Focus + mouse + drag | Focus + mouse + drag |
| Analytics | Compact chrome | Standard chrome | Full chrome + tabs | Full chrome + tabs |
| └ Tab bar | Hidden (active only) | Hidden (active only) | Full tab bar | Full tab bar |
| └ Filter summary | Hidden | Shown | Shown | Shown |
| └ Footer hints | Minimal | Full nav hints | Full nav hints | Full nav hints |
| └ Content views | min 20w×4h guard | Full area, inline adjust | Full area, inline adjust | Full area, inline adjust |
| Detail modal | Full-screen overlay | Full-screen overlay | Full-screen overlay | Full-screen overlay |
| Other modals | Centered, fixed | Centered, fixed | Centered, fixed | Centered, fixed |
| Footer | “narrow” | “med-n” | “med” | “wide” |
| Inspector | “Narrow (<80)” | “MedNarrow (80-119)” | “Medium (120-159)” | “Wide (>=160)” |
§Interaction expectations
- Narrow: Keyboard-primary.
Tab/Enterswitches between results ↔ detail. No split handle. Mouse clicks work on the visible pane only. - MediumNarrow: Both panes visible but tight. Detail shows wrapped message previews (25-col minimum). Split handle is draggable but range is constrained.
- Medium: Comfortable dual-pane. Both panes have enough room for full content. Split handle draggable within 25–75% range.
- Wide: Spacious dual-pane. Extra width used for wider result columns and full detail formatting. Split handle draggable within 25–75% range.
§Ultra-narrow fallback
Below ULTRA_NARROW_MIN_WIDTH (30) or ULTRA_NARROW_MIN_HEIGHT (6), the
full UI is not rendered. Instead, a compact “terminal too small” message is
shown. This prevents layout panics and unreadable content at degenerate
sizes (e.g., 10x3). See LayoutBreakpoint::is_ultra_narrow.
§Analytics surface notes
Analytics view content areas do NOT consume LayoutBreakpoint — each view
checks its assigned Rect dimensions directly (e.g., area.height < 4 as
a minimum guard) and adapts layout inline. The breakpoint drives the outer
chrome: header tab bar visibility, filter summary, and footer hint density.
See AnalyticsTopology for the per-breakpoint contract.
Variants§
Narrow
<80 cols: single pane with tab switching (very tight)
MediumNarrow
80-119 cols: side-by-side with tight detail pane
Medium
120-159 cols: side-by-side results/detail with balanced ratio
Wide
=160 cols: comfortable side-by-side results + detail panes
UltraWide
=240 cols: massive screen real-estate with expansive detail pane
Implementations§
Source§impl LayoutBreakpoint
impl LayoutBreakpoint
Sourcepub fn from_width(cols: u16) -> Self
pub fn from_width(cols: u16) -> Self
Classify from terminal width.
Sourcepub fn is_ultra_narrow(width: u16, height: u16) -> bool
pub fn is_ultra_narrow(width: u16, height: u16) -> bool
Check whether the given dimensions are below the ultra-narrow threshold.
When true, the UI should render a minimal fallback instead of the full surface. This prevents empty/broken layouts at very constrained sizes.
Sourcepub fn search_topology(self) -> SearchTopology
pub fn search_topology(self) -> SearchTopology
Return the search surface topology contract for this breakpoint.
Sourcepub fn analytics_topology(self) -> AnalyticsTopology
pub fn analytics_topology(self) -> AnalyticsTopology
Return the analytics surface topology contract for this breakpoint.
Sourcepub fn visibility_policy(self) -> VisibilityPolicy
pub fn visibility_policy(self) -> VisibilityPolicy
Return the visibility policy for optional UI elements at this breakpoint.
Short label for the status footer.
Sourcepub fn inspector_label(self) -> &'static str
pub fn inspector_label(self) -> &'static str
Descriptive label for the inspector overlay.
Sourcepub fn cockpit_topology(self, mode: CockpitMode) -> CockpitTopology
pub fn cockpit_topology(self, mode: CockpitMode) -> CockpitTopology
Return the cockpit overlay topology for this breakpoint and mode.
Trait Implementations§
Source§impl Clone for LayoutBreakpoint
impl Clone for LayoutBreakpoint
Source§fn clone(&self) -> LayoutBreakpoint
fn clone(&self) -> LayoutBreakpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LayoutBreakpoint
impl Debug for LayoutBreakpoint
Source§impl PartialEq for LayoutBreakpoint
impl PartialEq for LayoutBreakpoint
Source§fn eq(&self, other: &LayoutBreakpoint) -> bool
fn eq(&self, other: &LayoutBreakpoint) -> bool
self and other values to be equal, and is used by ==.impl Copy for LayoutBreakpoint
impl Eq for LayoutBreakpoint
impl StructuralPartialEq for LayoutBreakpoint
Auto Trait Implementations§
impl Freeze for LayoutBreakpoint
impl RefUnwindSafe for LayoutBreakpoint
impl Send for LayoutBreakpoint
impl Sync for LayoutBreakpoint
impl Unpin for LayoutBreakpoint
impl UnsafeUnpin for LayoutBreakpoint
impl UnwindSafe for LayoutBreakpoint
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more