mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
MAESTRO: Add file tab overlay menu with hover actions
Implements file-specific overlay menu for FileTab component: - Add shell:showItemInFolder IPC handler for "Reveal in Finder" action - Add showItemInFolder to shell preload API and global.d.ts types - Extend FileTabProps with position and close action callbacks - Implement full overlay menu with file actions: - Copy File Path/Name to clipboard - Open in Default App via file:// URL - Reveal in Finder via new showItemInFolder API - Move to First/Last Position - Close Tab/Other/Left/Right actions - Add 10 tests for file tab overlay menu - Add 3 tests for shell:showItemInFolder handler
This commit is contained in:
@@ -3010,9 +3010,9 @@ describe('FileTab overlay menu', () => {
|
||||
|
||||
// Should show Close Other Tabs option
|
||||
const closeOtherButtons = screen.getAllByText('Close Other Tabs');
|
||||
// Find the one in the file tab overlay (has file-text-icon)
|
||||
// Find the one in the file tab overlay (has Copy File Path which identifies file tab overlay)
|
||||
const closeOtherButton = closeOtherButtons.find((btn) =>
|
||||
btn.closest('.shadow-xl')?.querySelector('[data-testid="file-text-icon"]')
|
||||
btn.closest('.shadow-xl')?.textContent?.includes('Copy File Path')
|
||||
);
|
||||
expect(closeOtherButton).toBeTruthy();
|
||||
|
||||
@@ -3116,7 +3116,7 @@ describe('FileTab overlay menu', () => {
|
||||
// Should show Close Tabs to Left option
|
||||
const closeLeftButtons = screen.getAllByText('Close Tabs to Left');
|
||||
const closeLeftButton = closeLeftButtons.find((btn) =>
|
||||
btn.closest('.shadow-xl')?.querySelector('[data-testid="file-text-icon"]')
|
||||
btn.closest('.shadow-xl')?.textContent?.includes('Copy File Path')
|
||||
);
|
||||
expect(closeLeftButton).toBeTruthy();
|
||||
|
||||
@@ -3223,7 +3223,7 @@ describe('FileTab overlay menu', () => {
|
||||
// Should show Close Tabs to Right option
|
||||
const closeRightButtons = screen.getAllByText('Close Tabs to Right');
|
||||
const closeRightButton = closeRightButtons.find((btn) =>
|
||||
btn.closest('.shadow-xl')?.querySelector('[data-testid="file-text-icon"]')
|
||||
btn.closest('.shadow-xl')?.textContent?.includes('Copy File Path')
|
||||
);
|
||||
expect(closeRightButton).toBeTruthy();
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
Loader2,
|
||||
ExternalLink,
|
||||
FolderOpen,
|
||||
FileText,
|
||||
} from 'lucide-react';
|
||||
import type { AITab, Theme, FilePreviewTab, UnifiedTab } from '../types';
|
||||
import { hasDraft } from '../utils/tabHelpers';
|
||||
|
||||
Reference in New Issue
Block a user