Skip to content

fix: show command args or description in queued slash command display, add copy button to get the queued message from the execution queue#782

Merged
pedramamini merged 4 commits intoRunMaestro:rcfrom
scriptease:fix/queued-command-display
Apr 25, 2026
Merged

Conversation

@scriptease
Copy link
Copy Markdown

@scriptease scriptease commented Apr 10, 2026

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

Bildschirmfoto 2026-04-10 um 07 28 57

Added a copy button too:

Bildschirmfoto 2026-04-11 um 08 13 42

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Per-item "Copy" action to copy a queued item's command/text with a visual success indicator (check icon and color change) that resets after ~1.5s; the success indicator only appears when the copy actually succeeds.
  • UI Improvements

    • Queued command items show the command plus a truncated adjacent segment for arguments/description to prevent overflow.
    • Action buttons (copy/remove) appear on hover/focus for a cleaner list layout.

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Per-item clipboard-copy UI added to queue rows: copy button builds item-specific text (command+args or text) and writes via safeClipboardWrite; a copied state toggles on success and resets after 1.5s via a timer ref; UI shows Copy/Check icon swap and hover-visible action group; command item layout and remove-button hover visibility adjusted.

Changes

Cohort / File(s) Summary
Queued Items List
src/renderer/components/QueuedItemsList.tsx
Added copiedItemId state and handleCopy that builds copy text (command + commandArgs or text) and calls safeClipboardWrite; sets copied id on success and clears it after 1500ms using a timer ref; updated command item rendering to a two-segment flex layout and made remove button hidden until hover.
Execution Queue Browser
src/renderer/components/ExecutionQueueBrowser.tsx
Replaced single Remove button with a hover-visible vertical action group containing Remove and new Copy buttons; added local copied state, copyResetTimerRef for reset/cleanup, and clipboard write logic via safeClipboardWrite that toggles icon/color on success and resets after 1.5s; moved opacity handling to the action-group container.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I tap a key and nibble text,
Commands and args in tidy specs,
A little check, then off I hop,
Clipboard carrots — pop, then stop. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the two main changes: displaying command args/description in queued commands and adding a copy button to the execution queue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 10, 2026

Greptile Summary

Enhances the queued slash command display in QueuedItemsList.tsx by showing commandArgs (at full brightness) or commandDescription (dimmed) alongside the command name, with truncation to keep the row single-line. Both fields are already present on the QueuedItem type, so no data-model changes are needed.

Confidence Score: 5/5

Safe 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

Filename Overview
src/renderer/components/QueuedItemsList.tsx Renders commandArgs or commandDescription alongside the command name; logic and data access are correct, but the truncate span is missing min-w-0 so ellipsis may not appear in flex layout.

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]
Loading

Reviews (1): Last reviewed commit: "fix: show command args or description in..." | Re-trigger Greptile

Comment thread src/renderer/components/QueuedItemsList.tsx Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@scriptease scriptease force-pushed the fix/queued-command-display branch from ba7f7b6 to 375cd36 Compare April 11, 2026 06:05
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ba7f7b6 and 375cd36.

📒 Files selected for processing (2)
  • src/renderer/components/ExecutionQueueBrowser.tsx
  • src/renderer/components/QueuedItemsList.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/components/QueuedItemsList.tsx

Comment thread src/renderer/components/ExecutionQueueBrowser.tsx
Comment thread src/renderer/components/ExecutionQueueBrowser.tsx Outdated
@scriptease scriptease changed the title fix: show command args or description in queued slash command display fix: show command args or description in queued slash command display, add copy button to get the queued message from the execution queue Apr 11, 2026
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>
@scriptease scriptease force-pushed the fix/queued-command-display branch from 375cd36 to 1d95af5 Compare April 11, 2026 06:17
@pedramamini
Copy link
Copy Markdown
Collaborator

@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
@pedramamini pedramamini merged commit c9a5551 into RunMaestro:rc Apr 25, 2026
3 checks passed
@pedramamini
Copy link
Copy Markdown
Collaborator

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!

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.

4 participants