Expand description
Reusable UI components for the GUI.
This module contains reusable widgets and helper functions for consistent status visualization across the application, including status dots, progress indicators, and time formatting utilities.
Re-exports§
pub use crate::ui::shared::format_duration;pub use crate::ui::shared::format_duration_secs;pub use crate::ui::shared::format_relative_time;pub use crate::ui::shared::format_relative_time_secs;pub use crate::ui::shared::format_run_duration;pub use crate::ui::shared::RunProgress;pub use crate::ui::shared::Status;
Structs§
- Collapsible
Section - A reusable collapsible section component for detail panels.
- Progress
Bar - A visual progress bar component.
- Status
Dot - A reusable status dot component that renders a small filled circle with a color representing the current status.
- Status
Label - A component that renders a status dot followed by a text label.
Constants§
- MAX_
BRANCH_ LENGTH - Maximum characters for branch name truncation.
- MAX_
TEXT_ LENGTH - Maximum characters for general text truncation.
- STATUS_
DOT_ RADIUS - Default radius for status indicator dots.
Traits§
- Status
Colors - GUI-specific color mapping for the shared Status enum.
Functions§
- badge_
background_ color - Create a badge background color from any status color.
- format_
state - Format a machine state as a human-readable string.
- is_
terminal_ state - Check if a MachineState represents a finished/terminal state.
- state_
to_ background_ color - Map a MachineState to its background color (for badges).
- state_
to_ color - Map a MachineState directly to its display color.
- strip_
worktree_ prefix - Strip worktree-related prefixes from branch names for cleaner display.
- truncate_
with_ ellipsis - Truncate a string with ellipsis if it exceeds the max length.