219 files, 2.0 MB, untracked in souveraine/docs and existing nowhere else. The volume is at 100% with no snapshots.
2.2 KiB
Task: Blinking Cursor / Space Bar — Invisible Spaces
Description
When the user presses the space bar in the chat input, the blinking cursor remains visually positioned against the last character. This means the user can hit space multiple times in a row and have no visual indication that additional spaces are being added — the cursor doesn't move, so it feels like nothing is happening.
Location
src/ui/chat.rs — the draw_input function (around line 1625+)
Current Behavior
The cursor is rendered as a ▏ character that blinks on/off every 5 ticks. It's appended to the last span of the last line of the input. Since spaces are invisible characters, pressing space appends a space to the current chunk but the cursor's position relative to the text doesn't change visually — it still sits right after the last visible character.
let cursor_ch: &str = if cursor_visible { "▏" } else { " " };
// ...
if is_last {
spans.push(Span::styled(cursor_ch.to_string(), Style::default().fg(prefix_color)));
}
Expected Behavior
The cursor should visibly advance when spaces are typed. Options:
- Render spaces with a visible marker — e.g., show a faint
·(middle dot) for space characters in the input, so the user can see them accumulating - Always show the cursor at the end — ensure the cursor glyph is positioned after ALL characters including trailing spaces (it already is, but since spaces are invisible it looks like it hasn't moved)
- Render trailing spaces with a visible indicator — when the input ends with spaces, show them as
·or␣characters so the user knows they're there
Proposed Fix
Option 3 seems best: when rendering the input, replace trailing space characters with visible ␣ (or ·) glyphs in a dimmed style. This way:
- The user sees the cursor advance as they press space
- They can tell how many spaces they've added
- The spaces are still semantically spaces (the submitted text is unchanged)
Test
- Open chat
- Type some text
- Press space multiple times
- Observe that the cursor appears to advance and spaces are visible as
␣glyphs - Submit — the message should contain real spaces, not
␣characters