Skip to main content

Module components

Module components 

Source
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§

CollapsibleSection
A reusable collapsible section component for detail panels.
ProgressBar
A visual progress bar component.
StatusDot
A reusable status dot component that renders a small filled circle with a color representing the current status.
StatusLabel
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§

StatusColors
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.