Skip to content

fix(tui): label pending input modes#2532

Closed
cyq1017 wants to merge 1 commit into
Hmbown:mainfrom
cyq1017:codex/2054-pending-input-labels
Closed

fix(tui): label pending input modes#2532
cyq1017 wants to merge 1 commit into
Hmbown:mainfrom
cyq1017:codex/2054-pending-input-labels

Conversation

@cyq1017

@cyq1017 cyq1017 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Problem

  • The pending-input preview rendered steer and queued follow-up rows with the same prefix, making the delivery mode hard to read while a turn is running.

Change

  • Label pending steer, rejected steer, and queued follow-up rows separately in the pending-input preview.
  • Keep the existing unified list, truncation behavior, and queued-message edit hint.
  • Update the rejected-steer field comment to match the labelled rendering.

Verification

  • cargo test -p codewhale-tui pending_input_rows_label_each_delivery_mode --locked
  • cargo test -p codewhale-tui pending_input_preview --locked
  • cargo fmt --all -- --check
  • git diff --check

Refs #2054

Greptile Summary

This PR adds distinct labels to each delivery-mode row in the pending-input preview, replacing the generic prefix with ↳ Steer pending:, ↳ Rejected steer:, and ↳ Queued follow-up: labels. A new test verifies each label is rendered correctly.

  • pending_input_preview.rs: Three push_truncated_item call-sites updated with typed prefixes; a new pending_input_rows_label_each_delivery_mode test added alongside the existing suite.
  • app.rs: One-line doc-comment update to rejected_steers to match the new labelled rendering; no logic change.

Confidence Score: 4/5

Safe to merge; the change is purely presentational and backed by new tests.

The only notable gap is that subsequent_indent remains " " (4 spaces) while the new first-line prefixes are 19–22 characters wide. Any steer or queued message that wraps to a second display line will show content starting at column 4 rather than aligning under the label text. This is visible to end users but does not break functionality.

crates/tui/src/tui/widgets/pending_input_preview.rs — the continuation-indent values passed to push_truncated_item do not match the new prefix widths.

Important Files Changed

Filename Overview
crates/tui/src/tui/widgets/pending_input_preview.rs Adds distinct labels ("Steer pending:", "Rejected steer:", "Queued follow-up:") to each delivery-mode row in the pending-input preview, with a corresponding new test; continuation-line indent is unchanged at 4 spaces despite the prefix growing to 19–22 chars.
crates/tui/src/tui/app.rs One-line doc-comment update to rejected_steers to reflect the new labelled rendering; no logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[lines] --> B{has pending inputs?}
    B -- No --> C[return empty vec]
    B -- Yes --> D[push Pending inputs header]
    D --> E[iterate pending_steers]
    E --> F[push_truncated_item with Steer pending label]
    F --> G[iterate rejected_steers]
    G --> H[push_truncated_item with Rejected steer label]
    H --> I[iterate queued_messages]
    I --> J[push_truncated_item with Queued follow-up label]
    J --> K{queued_messages non-empty?}
    K -- Yes --> L[push edit-binding hint line]
    K -- No --> M[return lines]
    L --> M
Loading

Fix All in Codex Fix All in Claude Code Fix All in Cursor

Reviews (1): Last reviewed commit: "fix(tui): label pending input modes" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Comment on lines 112 to 134
for steer in &self.pending_steers {
push_truncated_item(&mut lines, steer, width, dim, " ↳ ", " ");
push_truncated_item(&mut lines, steer, width, dim, " ↳ Steer pending: ", " ");
}
for steer in &self.rejected_steers {
push_truncated_item(&mut lines, steer, width, dim, " ↳ ", " ");
push_truncated_item(
&mut lines,
steer,
width,
dim,
" ↳ Rejected steer: ",
" ",
);
}
for message in &self.queued_messages {
push_truncated_item(&mut lines, message, width, dim_italic, " ↳ ", " ");
push_truncated_item(
&mut lines,
message,
width,
dim_italic,
" ↳ Queued follow-up: ",
" ",
);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The subsequent_indent is still " " (4 spaces) even though the new first-line prefixes are 19–22 characters wide. If any steer or queued message wraps across multiple display lines, continuation lines will start at column 4 while the first line's content starts at column 19/21/22, producing a jagged, misaligned block. Matching the indent width to the prefix width keeps wrapped content visually aligned under the label text.

Suggested change
for steer in &self.pending_steers {
push_truncated_item(&mut lines, steer, width, dim, " ↳ ", " ");
push_truncated_item(&mut lines, steer, width, dim, " ↳ Steer pending: ", " ");
}
for steer in &self.rejected_steers {
push_truncated_item(&mut lines, steer, width, dim, " ↳ ", " ");
push_truncated_item(
&mut lines,
steer,
width,
dim,
" ↳ Rejected steer: ",
" ",
);
}
for message in &self.queued_messages {
push_truncated_item(&mut lines, message, width, dim_italic, " ↳ ", " ");
push_truncated_item(
&mut lines,
message,
width,
dim_italic,
" ↳ Queued follow-up: ",
" ",
);
}
for steer in &self.pending_steers {
push_truncated_item(&mut lines, steer, width, dim, " ↳ Steer pending: ", " ");
}
for steer in &self.rejected_steers {
push_truncated_item(
&mut lines,
steer,
width,
dim,
" ↳ Rejected steer: ",
" ",
);
}
for message in &self.queued_messages {
push_truncated_item(
&mut lines,
message,
width,
dim_italic,
" ↳ Queued follow-up: ",
" ",
);
}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex Fix in Claude Code Fix in Cursor

@Hmbown

Hmbown commented Jun 3, 2026

Copy link
Copy Markdown
Owner

This PR was harvested into v0.8.50. Closing as already landed.

@Hmbown Hmbown closed this Jun 3, 2026
timothybrush pushed a commit to timothybrush/DeepSeek-TUI that referenced this pull request Jun 8, 2026
Harvested from PR Hmbown#2532 by @cyq1017.

Pending input rows now distinguish steer-pending, rejected-steer, and queued-follow-up states, with continuation rows aligned under the delivery label.

Refs Hmbown#2054; leaves the broader cancel/edit affordance work open.

Co-authored-by: cyq1017 <61975706+cyq1017@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants