Skip to content

feat(tui): move background task feedback from left to right on input box top border #836

Description

@adolfousier

Current Layout (input box top border)

In src/tui/render/input.rs, render_input():

  • Top border, LEFT: background task feedback (bg_task_title, Alignment::Left) -- e.g. "cargo clippy 18s"
  • Top border, RIGHT: attachment indicators (attach_title, Alignment::Right) -- e.g. "[Image Use candle as a powerful way to run local LLMs without OLLAMA #1]"
  • Bottom border, RIGHT: context budget (context_title, via title_bottom) -- e.g. "ctx: 118K/200K (59%)"

Desired Layout

Move the background task feedback from the LEFT to the RIGHT side of the top border, so it sits above the context budget:

  • No attachments: bg task right-aligned on the top border
  • With attachments: bg task to the LEFT of attachments, both right-aligned on the top border

Visual result:

Top border:    [... bg_task] [Image #1]
Bottom border: [... ctx: 118K/200K (59%)]

Implementation

File: src/tui/render/input.rs, render_input() function.

  1. Change bg_task_title from Alignment::Left to Alignment::Right
  2. Reorder the .title() calls on the block so attachments are added FIRST, then bg_task SECOND. Ratatui renders right-aligned titles right-to-left in insertion order, so adding attach first + bg_task second gives the visual order [bg_task] [attach] (bg_task left of attach). If the ordering is wrong, combine bg_task + attachment spans into a single right-aligned title to guarantee left-to-right order.

Context

Requested by Adolfo. The background task feedback (detached background commands like cargo clippy) should be visually grouped with the context budget on the right side, not isolated on the left.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions