diff --git a/src/tui/app.rs b/src/tui/app.rs index 9469055..9cfa571 100644 --- a/src/tui/app.rs +++ b/src/tui/app.rs @@ -838,7 +838,7 @@ impl App { config, tasks, selected_index: 0, - project_pane_focus: ProjectPaneFocus::Tasks, + project_pane_focus: ProjectPaneFocus::Assistants, view: View::ProjectList, preview_content: String::new(), logs_editor, @@ -2677,7 +2677,7 @@ impl App { self.current_project = Some(name); self.selected_index = 0; self.assistant_list_index = 0; - self.project_pane_focus = ProjectPaneFocus::Tasks; + self.project_pane_focus = ProjectPaneFocus::Assistants; self.refresh_tasks_for_project(); self.refresh_assistants(); self.view = View::TaskList; diff --git a/src/tui/ui.rs b/src/tui/ui.rs index efa85dd..f1aa068 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -1094,17 +1094,17 @@ fn draw_project_detail(f: &mut Frame, app: &App, area: Rect) { .constraints([Constraint::Percentage(50), Constraint::Percentage(50)]) .split(area); - draw_tasks_pane( + draw_project_assistants_pane( f, app, panes[0], - app.project_pane_focus == ProjectPaneFocus::Tasks, + app.project_pane_focus == ProjectPaneFocus::Assistants, ); - draw_project_assistants_pane( + draw_tasks_pane( f, app, panes[1], - app.project_pane_focus == ProjectPaneFocus::Assistants, + app.project_pane_focus == ProjectPaneFocus::Tasks, ); } @@ -1441,8 +1441,9 @@ fn draw_tasks_pane(f: &mut Frame, app: &App, area: Rect, focused: bool) { }; // Dim stopped tasks, brighten unread stopped, highlight active + let is_selected = focused && task_index == app.selected_index; let text_color = if is_active { - if task_index == app.selected_index { + if is_selected { Color::White } else { Color::Gray @@ -1484,7 +1485,7 @@ fn draw_tasks_pane(f: &mut Frame, app: &App, area: Rect, focused: bool) { Span::raw(" "), Span::styled( format!("{: