waveterm/frontend/app/tab
Copilot e2b2498741
UI component for vertical tab bar
Dragging in the vertical tab bar had two UX artifacts: the drop marker
reserved layout space (leaving a visible accent gap above selected
tabs), and hover styling could remain on the old row after drop until
the mouse moved. This updates drag visuals to be overlay-based and
forces hover recalculation at drag end.

- **Drop marker moved out of flow (no selected-tab accent gap)**
- Replaced per-row in-flow divider placeholders with a single absolutely
positioned drop line in the scroll container.
- Drop line now aligns to actual tab boundaries (`offsetTop` /
`offsetHeight`) so it covers the divider location directly.

- **Drop target rendering simplified**
- Container is `relative`; marker is conditionally rendered only while
reordering.
- `dropLineTop` is tracked during drag events and used to position the
marker without affecting layout.

- **Stale hover state cleared after drop**
- Added a minimal drag-lifecycle reset mechanism (`hoverResetVersion`)
and used it in `VTab` keys.
- On drag end/drop, rows remount once, clearing browser-retained
`:hover` on the old index immediately.

```tsx
<VTab key={`${tab.id}:${hoverResetVersion}`} ... />

{dragTabId != null && dropIndex != null && dropLineTop != null && (
    <div
        className="pointer-events-none absolute left-0 right-0 border-t-2 border-accent/80"
        style={{ top: dropLineTop, transform: "translateY(-1px)" }}
    />
)}
```

- **<screenshot>**
-
https://github.com/user-attachments/assets/8c25ef6f-c600-484e-a4fa-6ac83657b484

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-03 09:00:34 -08:00
..
tab.scss Tab Indicators, Confirm on Quit, etc (#2811) 2026-01-29 17:04:29 -08:00
tab.tsx add a preview component for tabs, update contextmenu model w/ getInstance method (#2927) 2026-02-25 12:39:07 -08:00
tabbar-model.ts Make Block Close / Cmd-W more consistent (#2417) 2025-10-09 23:57:02 -07:00
tabbar.scss QoL and Layout Fixes for Windows (#2661) 2025-12-11 17:50:02 -08:00
tabbar.tsx update eslint to v9 (and fix all eslint errors) (#2923) 2026-02-23 18:42:17 -08:00
tabcontent.tsx New AIPanel (#2370) 2025-10-07 13:32:10 -07:00
updatebanner.tsx small bug fixes noticed in beta 0 (#2429) 2025-10-13 18:01:24 -07:00
vtab.tsx UI component for vertical tab bar 2026-03-03 09:00:34 -08:00
vtabbar.tsx UI component for vertical tab bar 2026-03-03 09:00:34 -08:00
workspaceeditor.scss Synchronize workspace edits across windows, close window when workspace is deleted (#1540) 2024-12-16 21:54:13 -08:00
workspaceeditor.tsx New AIPanel (#2370) 2025-10-07 13:32:10 -07:00
workspaceswitcher.scss New AIPanel (#2370) 2025-10-07 13:32:10 -07:00
workspaceswitcher.tsx Generate WaveEvent as a typed discriminated union with explicit null payloads for no-data events (#2899) 2026-02-20 17:04:03 -08:00