Skip to content

fix(tui): show the queued-message preview above the composer, not below - #361

Merged
gnanam1990 merged 1 commit into
mainfrom
fix-queued-message-above-composer
Jul 1, 2026
Merged

fix(tui): show the queued-message preview above the composer, not below#361
gnanam1990 merged 1 commit into
mainfrom
fix-queued-message-above-composer

Conversation

@gnanam1990

@gnanam1990 gnanam1990 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

A message typed while a run is active is queued for the next turn. Its [queued] … preview rendered on the line below the input box; this moves it to directly above the box so it reads as "waiting to send," sitting on top of what you're currently typing, instead of being visually detached from the composer by the status line beneath it. Footer height is unchanged — the preview line just relocates from below to above the box.

Test plan

  • go build ./...
  • go vet ./internal/tui/
  • go test ./internal/tui/ -count=1 (new: TestQueuedPromptPreviewSitsAboveComposer asserts the preview line index is above the composer box top border)

Summary by CodeRabbit

  • Bug Fixes
    • Adjusted the queued message preview so it now appears above the composer area on its own line, improving clarity in the footer.
    • Kept the rest of the footer layout behavior unchanged, including status and hint placement.
  • Tests
    • Added coverage to confirm the queued prompt preview renders in the correct position relative to the composer.

A message typed while a run is active is queued for the next turn. Its
"[queued] …" preview rendered on the line BELOW the input box; move it to
directly ABOVE the box so it reads as "waiting to send," sitting on top of
what you're currently typing, and doesn't get visually detached from the
composer by the status line beneath it. Footer height is unchanged (the
preview line just moves from below to above the box).

New test: TestQueuedPromptPreviewSitsAboveComposer asserts the preview
line index is above the composer box top border.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Zero automated PR review

Verdict: No blockers found

Blockers

  • None found.

Validation

  • [pass] Diff hygiene: git diff --check
  • [pass] Tests: go test ./...
  • [pass] Build: go run ./cmd/zero-release build
  • [pass] Smoke build: go run ./cmd/zero-release smoke

Scope

Head: d52b26f4db80
Changed files (2): internal/tui/model.go, internal/tui/queued_message_test.go

This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality.

@gnanam1990

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12fcb090-6049-42b5-a702-96564c32fd9e

📥 Commits

Reviewing files that changed from the base of the PR and between 85273ea and d52b26f.

📒 Files selected for processing (2)
  • internal/tui/model.go
  • internal/tui/queued_message_test.go

Walkthrough

The queued-message "waiting to send" preview in footerView is repositioned to render above the composer box instead of after it. A new test verifies the queued preview line appears strictly above the composer's top border line.

Changes

Queued Preview Ordering

Layer / File(s) Summary
Reposition queued preview render order
internal/tui/model.go
The conditional queued message preview block, including its trailing newline, is moved to render immediately before composerBox, removing its prior placement after the composer.
Test for preview ordering
internal/tui/queued_message_test.go
New test TestQueuedPromptPreviewSitsAboveComposer queues a prompt during a pending run, renders the footer, and asserts the "queued" line appears above the composer's "╭" border line.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • Gitlawb/zero#168: Also modifies internal/tui/model.go's footer/composer rendering logic, refactoring footer composition and composer chrome.
  • Gitlawb/zero#300: Also modifies the TUI footer layout in internal/tui/model.go, specifically the row above the composer.

Suggested reviewers: Vasanthdev2004

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: moving the queued-message preview above the composer in the TUI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@gnanam1990
gnanam1990 merged commit 3fde03a into main Jul 1, 2026
7 checks passed
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.

1 participant