Файли
openidea/e2e
l0ng-ai da7125a944 fix(workbench): show ghost and insertion indicator when dragging project tabs (#6135)
## What and why

Reordering project window tabs in `WindowGroupTabs` previously gave almost no visual feedback: the dragged tab only dimmed in place (`opacity: 0.55`) with no drag ghost, no drop-target indicator, no grabbing cursor or `Escape` cancel, and it waited for the backend IPC round-trip before updating the tab order.

This switches `WindowGroupTabs` onto the shared pointer drag-and-drop pipeline (`startPointerDrag`, `registerDropTarget`, and `dropIndex`) matching tool window stripes and tab strips:
- Shows a translucent ghost following the pointer (dimming when outside the tab bar) while keeping the source tab dimmed in place (`opacity: 0.4`) and hiding hover close/detach buttons during the drag.
- Marks the exact drop target with a 2px `var(--accent)` vertical insertion line (omitted on adjacent no-op slots).
- Optimistically applies the new tab order on drop (rolling back via `refreshWindowGroup()` on failure), swallows the trailing `click`, cancels cleanly on `Escape`, and respects `dragRequiresAlt()`.

## How it was verified

- `pnpm vitest run src/workbench/WindowGroupTabs.test.tsx src/platform/windowGroups.test.ts` — 2 test files, 13 tests passed.
- `OPENIDEA_E2E_PORT=1459 pnpm e2e e2e/windowGroupTabDrag.spec.ts e2e/windowGroupTabColor.spec.ts` — 2 Playwright E2E specs passed (both new drag feedback/reorder/cancel coverage and existing tinted-tab hover regression).
- `pnpm typecheck` — passed across all workspace tsconfigs including `e2e`.
- `pnpm exec oxfmt --check src/workbench/WindowGroupTabs.tsx src/workbench/WindowGroupTabs.module.css src/workbench/WindowGroupTabs.test.tsx e2e/windowGroupTabDrag.spec.ts` — passed.

## Review focus

- `projectTabDropTarget` mapping between `dropIndex` (`0..count`) and `reorderedTabs` target indices in `src/workbench/WindowGroupTabs.tsx`.
- `.dropBefore::before` / `.dropAfter::after` styling in `src/workbench/WindowGroupTabs.module.css` alongside the existing tab separator rule.

Made with [Cursor](https://cursor.com)
2026-11-26 20:42:49 +08:00
..