fix: show command args or description in queued slash command display, add copy button to get the queued message from the execution queue#782
Conversation
Queued slash commands only showed the command name in green with no context. Now shows either the arguments (if provided) or the command description, truncated to a single line. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPer-item clipboard-copy UI added to queue rows: copy button builds item-specific text (command+args or Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as QueuedItemsList / ExecutionQueueBrowser
participant Clip as safeClipboardWrite (Clipboard API)
User->>UI: Hover row, click "Copy"
UI->>UI: build copyText (command + commandArgs OR text)
UI->>Clip: safeClipboardWrite(copyText)
Clip-->>UI: success
UI->>UI: set copied state (copiedItemId or copied = true)
UI-->>User: show Check icon and color change
Note right of UI: after 1500ms (timer ref) reset copied state -> revert icon/state
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryEnhances the queued slash command display in Confidence Score: 5/5Safe to merge; the single remaining finding is a P2 CSS polish item that does not affect correctness. The logic is straightforward and the fields being accessed (commandArgs, commandDescription) are well-typed on QueuedItem. The only finding is a missing min-w-0 on the truncate span, which is a non-blocking style suggestion. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[QueuedItem rendered] --> B{item.type === 'command'?}
B -- Yes --> C[Show command name in green]
C --> D{commandArgs present?}
D -- Yes --> E[Show commandArgs in textMain color]
D -- No --> F{commandDescription present?}
F -- Yes --> G[Show commandDescription in textDim color]
F -- No --> H[Show command name only]
B -- No --> I[Show message text with expand/collapse]
Reviews (1): Last reviewed commit: "fix: show command args or description in..." | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
ba7f7b6 to
375cd36
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/renderer/components/ExecutionQueueBrowser.tsx`:
- Line 609: The action controls are hidden from keyboard users because the div
uses "opacity-0 group-hover:opacity-100"; update the class on the actions
wrapper inside ExecutionQueueBrowser (the div with className "flex flex-col
items-center gap-1 opacity-0 group-hover:opacity-100 transition-all") to also
include "group-focus-within:opacity-100" so the controls become visible when the
group receives keyboard focus, enabling accessible keyboard navigation to the
buttons.
- Around line 353-354: Replace the raw Clipboard API call and anonymous .catch
with the safeClipboardWrite utility and add a tracked timer for resetting copied
state: import safeClipboardWrite from src/renderer/utils/clipboard.ts and use it
instead of navigator.clipboard.writeText in the copy handler (preserve call site
around setting setCopied(true) and ensure you handle the returned promise errors
via safeClipboardWrite), add a new ref copyResetTimerRef (same type as
pressTimerRef) to store the timeout ID, clear any existing
copyResetTimerRef.current before creating a new setTimeout to reset
setCopied(false), and add a cleanup in the component useEffect/unmount to clear
both pressTimerRef.current and copyResetTimerRef.current so timers are not
leaked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5b682eb6-56fb-4673-baba-d51163190749
📒 Files selected for processing (2)
src/renderer/components/ExecutionQueueBrowser.tsxsrc/renderer/components/QueuedItemsList.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/components/QueuedItemsList.tsx
Add a copy-to-clipboard button (bottom-right, visible on hover) to queued items alongside the existing remove button (top-right). Shows a checkmark on successful copy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
375cd36 to
1d95af5
Compare
|
@copilot resolve the merge conflicts in this pull request |
Resolves conflicts: - Combined Copy/Check/Hammer icon imports in QueuedItemsList - Kept useModalLayer migration alongside Copy/Check icons in ExecutionQueueBrowser
|
Thanks @scriptease for the contribution! 🙌 The added context for queued slash commands and the copy button are both genuinely useful quality-of-life improvements. Appreciate the patience while this got reconciled with rc — merged! |
Queued slash commands only showed the command name in green with no context. Now shows either the arguments (if provided) or the command description, truncated to a single line. See screenshot
Added a copy button too:
Summary by CodeRabbit
Summary by CodeRabbit
New Features
UI Improvements