Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 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 |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/23/2026, 02:23:54 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Tests:
|
There was a problem hiding this comment.
Pull request overview
This pull request adds a right-click context menu to the active jobs button in the top menu section, enabling users to quickly clear the queue. The implementation follows Vue 3 Composition API patterns and reuses the existing clear queue command with proper initialization cleanup.
Changes:
- Added a PrimeVue context menu component with custom styling matching the Queue Progress modal design
- Integrated right-click handler on the active jobs button to show the context menu
- Implemented handleClearQueue function that clears pending tasks and their initialization state
- Added unit tests verifying the menu item's enabled/disabled state based on queue contents
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/components/TopMenuSection.vue | Added context menu component with right-click handler, clear queue action, and custom styling to match Figma design |
| src/components/TopMenuSection.test.ts | Added tests for context menu disabled/enabled states based on pending tasks |
src/components/TopMenuSection.vue
Outdated
| :class=" | ||
| cn( | ||
| 'flex h-8 w-full items-center gap-2 rounded-sm px-2 text-sm font-normal', | ||
| item.class, | ||
| item.disabled && 'opacity-50' | ||
| ) | ||
| " |
There was a problem hiding this comment.
The menu item styling is missing hover state feedback. Consider adding hover:bg-secondary-background-hover to provide visual feedback when users hover over menu items, consistent with other interactive elements in the codebase.
| @@ -49,6 +49,7 @@ | |||
| class="px-3" | |||
| data-testid="queue-overlay-toggle" | |||
There was a problem hiding this comment.
The button that triggers the context menu should have the aria-haspopup attribute set to "menu" to indicate that it opens a context menu. This helps screen reader users understand the button's functionality.
| data-testid="queue-overlay-toggle" | |
| data-testid="queue-overlay-toggle" | |
| aria-haspopup="menu" |
src/components/TopMenuSection.vue
Outdated
| cn( | ||
| 'flex h-8 w-full items-center gap-2 rounded-sm px-2 text-sm font-normal', | ||
| item.class, | ||
| item.disabled && 'opacity-50' |
There was a problem hiding this comment.
The disabled menu items should include cursor-not-allowed styling to provide a visual indication that the item is not clickable. Additionally, consider adding pointer-events-none to ensure the disabled item cannot be interacted with, following the pattern used in other components like ColorPickerMenu.
| item.disabled && 'opacity-50' | |
| item.disabled && 'opacity-50 cursor-not-allowed pointer-events-none' |
| it('enables the clear queue context menu item when queued jobs exist', async () => { | ||
| const wrapper = createWrapper() | ||
| const queueStore = useQueueStore() | ||
| queueStore.pendingTasks = [createTask('pending-1', 'pending')] | ||
|
|
||
| await nextTick() | ||
|
|
||
| const menu = wrapper.findComponent({ name: 'ContextMenu' }) | ||
| const model = menu.props('model') as MenuItem[] | ||
| expect(model[0]?.disabled).toBe(false) | ||
| }) |
There was a problem hiding this comment.
The handleClearQueue function is missing test coverage. While the tests verify that the menu item is enabled/disabled correctly, there's no test that actually invokes the command when the user clicks the menu item. Add a test that verifies the command execution and the executionStore.clearInitializationByPromptIds call with the correct prompt IDs.
AustinMroz
left a comment
There was a problem hiding this comment.
I really feel the prime vue suffering here and fighting it feels like a losing battle. As written, the code doesn't provide hover state or cursor hints and the clear queue button can be clicked even when in the disabled state.
From a higher view, I have some slight reservations about right clicking a button not being discoverable, but that's not an issue I'd block merging on
src/components/TopMenuSection.vue
Outdated
| class: 'text-destructive-background', | ||
| disabled: queueStore.pendingTasks.length === 0, |
There was a problem hiding this comment.
| class: 'text-destructive-background', | |
| disabled: queueStore.pendingTasks.length === 0, | |
| icon: 'icon-[lucide--list-x] text-destructive-background', | |
| class: '*:text-destructive-background', |
This is enough to get primevue to behave and lets you simplify the ContextMenu component to
<ContextMenu ref="queueContextMenu" :model="queueContextMenuItems" />df54de8 to
258a1d5
Compare
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.7 kB (baseline 22.7 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 940 kB (baseline 948 kB) • 🟢 -7.93 kBGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 80.7 kB (baseline 80.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 440 kB (baseline 440 kB) • 🟢 -8 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 3 added / 3 removed Editors & Dialogs — 2.83 kB (baseline 2.83 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 33.7 kB (baseline 33.7 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed Data & Services — 3.17 MB (baseline 3.17 MB) • 🟢 -52 BStores, services, APIs, and repositories
Status: 8 added / 8 removed Utilities & Hooks — 24 kB (baseline 24 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 7 added / 7 removed Vendor & Third-Party — 10.7 MB (baseline 10.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 6.36 MB (baseline 6.36 MB) • 🟢 -192 BBundles that do not match a named category
Status: 30 added / 30 removed |
|
0d62e57 to
22a291c
Compare
The base branch was changed.
|
Sorry I had to change the base branch to main, the diff is still exactly the same |
Add a right-click context menu to the active jobs button that clears the queue and matches the Queue Progress modal styling. Per [design](https://www.figma.com/design/LVilZgHGk5RwWOkVN6yCEK/Queue-Progress-Modal?node-id=3407-41345&m=dev) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8216-feat-active-jobs-context-menu-2ef6d73d365081e68386cf0f7c3c23f2) by [Unito](https://www.unito.io)
Add a right-click context menu to the active jobs button that clears the queue and matches the Queue Progress modal styling.
Per design
┆Issue is synchronized with this Notion page by Unito