Improve chat-input queue UI and add follow-up placeholder#495
Open
Improve chat-input queue UI and add follow-up placeholder#495
Conversation
- Redesign queue interface with collapsible header showing message count - Add per-message action buttons on hover (edit, promote, delete) - Show '↵ to submit' hint on each queued message in default state - Change placeholder to 'Add a follow-up...' when agent is running - Add promoteToFront method to message queue store for reordering - Extract QueuedMessageRow into separate component for clarity
Contributor
🚀 Preview Deployment
Preview will be automatically removed when this PR is closed. |
…ssage - Add submitQueuedMessageNow to AgentHelpers that promotes the message to front of queue, sets a force flag, and stops the agent - Modify onFinish handler to process queue on abort when force flag is set - Wire callback through ChatInputBase to ChatInputMessageQueue - Change '↵ to submit' from a passive hint to a clickable button
- Install @dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities - Replace ArrowUpToLine button with GripVertical drag handle - Implement sortable rows using useSortable with activator handle - Add reorder method to message queue store for index-based moves - Drag handle only appears when there are 2+ queued messages - Visual feedback: opacity change while dragging, grab cursors
Contributor
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/frontend/src/components/chat-input-message-queue.tsx">
<violation number="1" location="apps/frontend/src/components/chat-input-message-queue.tsx:136">
P2: `↵ to submit` is now rendered as a non-interactive `<span>`, and the actual submit control is hover-only. This makes submit-now harder or impossible to access on non-hover interactions.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Comment on lines
+136
to
+139
| <span className='group-hover:hidden flex items-center gap-1 text-xs text-muted-foreground/50'> | ||
| <CornerDownLeft className='size-3' /> | ||
| <span>to submit</span> | ||
| </span> |
Contributor
There was a problem hiding this comment.
P2: ↵ to submit is now rendered as a non-interactive <span>, and the actual submit control is hover-only. This makes submit-now harder or impossible to access on non-hover interactions.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/frontend/src/components/chat-input-message-queue.tsx, line 136:
<comment>`↵ to submit` is now rendered as a non-interactive `<span>`, and the actual submit control is hover-only. This makes submit-now harder or impossible to access on non-hover interactions.</comment>
<file context>
@@ -132,16 +132,17 @@ function SortableQueuedMessageRow({
- <span>to submit</span>
- </button>
+ {isFirst && (
+ <span className='group-hover:hidden flex items-center gap-1 text-xs text-muted-foreground/50'>
+ <CornerDownLeft className='size-3' />
+ <span>to submit</span>
</file context>
Suggested change
| <span className='group-hover:hidden flex items-center gap-1 text-xs text-muted-foreground/50'> | |
| <CornerDownLeft className='size-3' /> | |
| <span>to submit</span> | |
| </span> | |
| <button | |
| type='button' | |
| onClick={() => onSubmitNow?.(messageId)} | |
| className='group-hover:hidden flex items-center gap-1 text-xs text-muted-foreground/50 hover:text-muted-foreground transition-colors cursor-pointer' | |
| > | |
| <CornerDownLeft className='size-3' /> | |
| <span>to submit</span> | |
| </button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the chat input message queue interface with a cleaner, more functional design and adds a contextual placeholder when the agent is running.
Changes
Queue UI redesign (
chat-input-message-queue.tsx):↵ to submitbutton that gracefully stops the current stream and immediately sends the queued messageSortableQueuedMessageRowas a dedicated componentpb-5to the outer container to compensate for the-mb-4negative marginDrag-and-drop reordering (
chat-input-message-queue.tsx):@dnd-kit/core,@dnd-kit/sortable,@dnd-kit/utilitiesGripVerticaldrag handle for reordering queued messages (visible when 2+ messages are queued)KeyboardSensorSubmit now / takeover (
use-agent.ts):submitQueuedMessageNowtoAgentHelpers— promotes the message to front of queue, sets a force flag, and stops the agentonFinishhandler to process the queue even on abort when the force flag is set, enabling graceful takeover of the current streamFollow-up placeholder (
chat-input.tsx):Store enhancement (
chat-message-queue.ts):reordermethod for index-based drag-and-drop movespromoteToFrontmethod used by the submit-now takeover flow