ticket: add TUI input polish tasks
This commit is contained in:
parent
1da2498295
commit
97f3df651a
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
id: 20260529-010200-tui-command-completion-apply
|
||||
slug: tui-command-completion-apply
|
||||
title: Apply command completions from keyboard
|
||||
status: open
|
||||
kind: task
|
||||
priority: P2
|
||||
labels: [tui, commands, ux]
|
||||
created_at: 2026-05-29T01:02:00Z
|
||||
updated_at: 2026-05-29T01:02:00Z
|
||||
assignee: null
|
||||
legacy_ticket: null
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
The TUI command mode (`:`) can show completion candidates, but the candidates cannot currently be applied with keyboard completion keys such as Tab. Also, when there is an unambiguous or selected completion candidate, pressing Enter should be able to complete the command and execute it in one action.
|
||||
|
||||
This should make command mode behave like a small command palette rather than a read-only suggestion list.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Add keyboard application for command completions in command mode.
|
||||
- Tab should apply the currently selected completion candidate when a candidate exists.
|
||||
- If there is no explicit selection but exactly one candidate exists, Tab should apply that candidate.
|
||||
- Applying a command completion should replace the command name prefix with the canonical command name and preserve/position trailing argument editing sensibly.
|
||||
- Enter behavior should use completion when appropriate.
|
||||
- If the command input has completion candidates and the current command name is incomplete, Enter should apply the selected/unambiguous candidate and execute the completed command in one action when doing so yields a complete executable command.
|
||||
- If applying a completion only fills the command name and arguments are still required, Enter should complete the command name and keep command mode active with a helpful state/notice rather than executing an invalid command.
|
||||
- If no candidate applies, existing command execution/error behavior should remain.
|
||||
- Completion selection/navigation should be keyboard-accessible.
|
||||
- Existing up/down behavior should not regress.
|
||||
- If Tab cycles candidates today for another completion surface, command mode should still have a clear apply path.
|
||||
- Keep normal composer completion behavior unchanged.
|
||||
- This ticket is for `:` command mode completion, not file-ref/chip completion in normal input.
|
||||
- Keep command execution local.
|
||||
- Commands must not be submitted as user messages.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- In command mode, typing a command prefix and pressing Tab fills the selected/unambiguous command completion.
|
||||
- In command mode, typing a command prefix with a selected/unambiguous executable completion and pressing Enter completes and executes it in one action.
|
||||
- Ambiguous completions do not execute the wrong command silently; they require selection or further typing.
|
||||
- Commands requiring arguments are not executed with missing arguments just because Enter applied the command name.
|
||||
- Existing command execution behavior for fully typed commands is unchanged.
|
||||
- Normal composer/file-ref completion behavior is unchanged.
|
||||
- Focused tests cover Tab apply, Enter complete-and-execute, ambiguous candidate handling, and argument-required behavior.
|
||||
- `cargo fmt --check`
|
||||
- Relevant TUI command tests, e.g. `cargo test -p tui command --no-default-features` or equivalent.
|
||||
- `cargo check -p tui`
|
||||
|
||||
## Out of scope
|
||||
|
||||
- New commands.
|
||||
- Fuzzy matching beyond current prefix/alias suggestions.
|
||||
- Mouse selection in the completion popup.
|
||||
- Normal input/file reference completion changes.
|
||||
- Changing command registry semantics outside completion application.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<!-- event: create author: tickets.sh at: 2026-05-29T01:02:00Z -->
|
||||
|
||||
## Created
|
||||
|
||||
Created by tickets.sh create.
|
||||
|
||||
---
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
id: 20260529-010200-tui-composer-cursor-scroll
|
||||
slug: tui-composer-cursor-scroll
|
||||
title: Scroll TUI composer around cursor
|
||||
status: open
|
||||
kind: task
|
||||
priority: P2
|
||||
labels: [tui, input, ux]
|
||||
created_at: 2026-05-29T01:02:00Z
|
||||
updated_at: 2026-05-29T01:02:00Z
|
||||
assignee: null
|
||||
legacy_ticket: null
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
The TUI composer/input area has a fixed visible height. When the input buffer grows beyond the visible area (for example 10+ lines), the rendered text is clipped instead of scrolling to keep the cursor visible.
|
||||
|
||||
This makes editing long messages unreliable: the user can continue typing or moving the cursor, but the relevant lines may be outside the visible area.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Implement cursor-based vertical scrolling for the normal composer input area.
|
||||
- The visible viewport should follow the cursor line when the input has more lines than the allocated input height.
|
||||
- Moving the cursor above the viewport scrolls up.
|
||||
- Moving the cursor below the viewport scrolls down.
|
||||
- Typing new lines at the bottom keeps the cursor visible.
|
||||
- Deleting lines clamps the scroll offset to valid bounds.
|
||||
- Preserve existing input behavior:
|
||||
- editing operations.
|
||||
- cursor movement.
|
||||
- selection/completion behavior for file refs if applicable.
|
||||
- queued input behavior.
|
||||
- command mode behavior unless command input shares the same rendering path and needs the same fix.
|
||||
- The cursor's terminal position should correspond to the visible cursor location after scrolling.
|
||||
- The implementation should not simply increase composer height or hide conversation content indefinitely.
|
||||
- Keep visual separators/borders consistent with the existing TUI layout.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- A composer buffer longer than the visible input area renders a window around the cursor instead of clipping from a fixed origin.
|
||||
- Cursor up/down/page movement updates the composer viewport correctly.
|
||||
- Inserting/deleting lines keeps viewport bounds valid.
|
||||
- Existing short single-line and small multi-line input rendering remains unchanged.
|
||||
- Focused tests cover viewport calculation around cursor position and clamping.
|
||||
- `cargo fmt --check`
|
||||
- Relevant TUI focused tests, e.g. `cargo test -p tui input --no-default-features` or equivalent.
|
||||
- `cargo check -p tui`
|
||||
|
||||
## Out of scope
|
||||
|
||||
- Resizable composer UX redesign.
|
||||
- Mouse scrolling inside composer.
|
||||
- Horizontal scrolling/wrapping redesign beyond what is needed to keep current behavior correct.
|
||||
- Changing command completion behavior; see `20260529-010200-tui-command-completion-apply`.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<!-- event: create author: tickets.sh at: 2026-05-29T01:02:00Z -->
|
||||
|
||||
## Created
|
||||
|
||||
Created by tickets.sh create.
|
||||
|
||||
---
|
||||
Loading…
Reference in New Issue
Block a user