Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
21 changes: 11 additions & 10 deletions src/tui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1484,7 +1485,7 @@ fn draw_tasks_pane(f: &mut Frame, app: &App, area: Rect, focused: bool) {
Span::raw(" "),
Span::styled(
format!("{:<width$}", display_repo, width = repo_width),
if task_index == app.selected_index {
if is_selected {
Style::default()
.fg(Color::White)
.add_modifier(Modifier::BOLD)
Expand All @@ -1495,7 +1496,7 @@ fn draw_tasks_pane(f: &mut Frame, app: &App, area: Rect, focused: bool) {
Span::raw(COL_GAP),
Span::styled(
format!("{:<width$}", display_branch, width = branch_width),
if task_index == app.selected_index {
if is_selected {
Style::default()
.fg(Color::White)
.add_modifier(Modifier::BOLD)
Expand Down Expand Up @@ -1539,7 +1540,7 @@ fn draw_tasks_pane(f: &mut Frame, app: &App, area: Rect, focused: bool) {
),
]);

let style = if task_index == app.selected_index {
let style = if is_selected {
Style::default().bg(Color::Rgb(40, 40, 50))
} else {
Style::default()
Expand Down Expand Up @@ -1599,7 +1600,7 @@ fn draw_project_assistants_pane(f: &mut Frame, app: &App, area: Rect, focused: b
.split(inner);

const MIN_NAME_WIDTH: usize = 4;
const MAX_NAME_WIDTH: usize = 28;
const MAX_NAME_WIDTH: usize = 56;
const TYPE_WIDTH: usize = 10;
const STATUS_WIDTH: usize = 10;
const CREATED_WIDTH: usize = 10;
Expand Down Expand Up @@ -1649,7 +1650,7 @@ fn draw_project_assistants_pane(f: &mut Frame, app: &App, area: Rect, focused: b
.iter()
.enumerate()
.map(|(i, assistant)| {
let is_selected = i == app.assistant_list_index;
let is_selected = focused && i == app.assistant_list_index;
let (status, status_icon, status_color) = assistant_runtime_status(app, assistant);
let row_style = if is_selected {
Style::default().bg(Color::Rgb(40, 40, 50))
Expand Down
Loading