feat(ui): demo-mode keystroke badges (#22, ADR-0047 D2/D4/D5)
In --demo mode, an otherwise-invisible key (Tab, Enter, arrows, Ctrl-O, …) raises a transient [LABEL] badge — a floating black-on-yellow box inset at the output panel's bottom-right. Set in App::update before the modal gate (so it shows over the load picker, the #24 cast); pure demo_badge_label maps the key set. The runtime expires it on a ~1.5s timer via a new nearest_deadline helper that extends the existing time-boxed-recv arm condition without disturbing the ADR-0027 indicator debounce. New App.last_output_area lets the top-level draw anchor the overlay; overlay colours centralised in theme.rs. Tier 1 (label fn, badge set/seq, over-modal), Tier 2 (dark/light snapshots, black-on-yellow style, too-small clamp), runtime unit (nearest_deadline). Phase B of ADR-0047; captions land in C.
This commit is contained in:
@@ -20,6 +20,16 @@ use ratatui::style::Color;
|
||||
|
||||
use crate::dsl::grammar::HighlightClass;
|
||||
|
||||
/// Foreground of the demonstration-mode overlays (ADR-0047 D4).
|
||||
///
|
||||
/// Deliberately a fixed, theme-independent high-contrast pair — black
|
||||
/// on yellow — so the badge / caption boxes are hard to overlook in a
|
||||
/// screencast on any background.
|
||||
pub const DEMO_OVERLAY_FG: Color = Color::Black;
|
||||
/// Background of the demonstration-mode overlays (ADR-0047 D4); see
|
||||
/// [`DEMO_OVERLAY_FG`].
|
||||
pub const DEMO_OVERLAY_BG: Color = Color::Rgb(0xFF, 0xD7, 0x00);
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Background {
|
||||
Light,
|
||||
|
||||
Reference in New Issue
Block a user