refactor: Remove workflow-related commands and overlays from the application

This commit is contained in:
asepharyana
2026-07-15 03:39:15 +07:00
parent 188e7cc9a9
commit 9ba9a5048b
10 changed files with 33 additions and 183 deletions
+18 -6
View File
@@ -13,16 +13,28 @@ use super::theme::Theme;
/// Render the persistent right-hand dashboard: Workflow, Tasks, and Usage
/// widgets stacked in three roughly-equal vertical thirds.
pub fn draw_sidebar(frame: &mut Frame, area: Rect, state: &crate::app::state::rest::AppStateRest) {
let has_workflow = !state.workflow_engine.agents.is_empty();
let constraints = if has_workflow {
vec![
Constraint::Ratio(1, 2),
Constraint::Ratio(1, 4),
Constraint::Ratio(1, 4),
]
} else {
vec![
Constraint::Ratio(1, 3),
Constraint::Ratio(1, 3),
Constraint::Ratio(1, 3),
]
};
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints([
Constraint::Ratio(1, 3),
Constraint::Ratio(1, 3),
Constraint::Ratio(1, 3),
])
.constraints(constraints)
.split(area);
super::workflow::draw_workflow_widget(frame, chunks[0], state);
super::workflow::draw_workflow_panel(frame, chunks[0], state);
draw_tasks_widget(frame, chunks[1], state);
draw_usage_widget(frame, chunks[2], state);
}