Fix workspace accumulation, tab-close popover, scrollbars, drag ghost

- window_state.rs: persist only the main window's workspaces. The aggregator
  flattened every window's tabs into the saved file; main then adopted the
  whole blob on launch, so detached windows' ephemeral tabs (and Pane N
  drag-out artifacts) accumulated without bound.
- TabStrip: portal the close-confirm popover to <body> with fixed,
  viewport-clamped positioning so the horizontally-scrolling strip can't clip
  it and it never runs off a window edge.
- styles.css: make themed ::-webkit-scrollbar global, not just xterm viewport.
- LeafPane: B1 drag-out ghost chip (portal, edge-pinned, orange detach state).
- App.tsx: moveToNewWindow waits briefly for pane registration instead of
  failing instantly on an in-flight spawn/adopt.
- gitignore cargo-test.lo*.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-28 20:24:09 +01:00
parent bea6cf2977
commit e6d0040021
9 changed files with 224 additions and 95 deletions

View file

@ -1005,10 +1005,19 @@ export default function App() {
notify("Cannot move — pane not found");
return;
}
const paneId = paneIdByLeafRef.current.get(leafId);
// The pane's id is registered only after its XtermPane finishes the
// async spawn/adopt round-trip. If the user drags out a pane that's
// still completing that (e.g. just after a shell-swap, or a pane in a
// freshly-detached window), wait for registration instead of failing
// outright. Resolves immediately if already registered.
let paneId = paneIdByLeafRef.current.get(leafId);
if (paneId == null) {
notify("Cannot move — PTY not ready yet");
return;
try {
paneId = await waitForPaneRegistration(leafId, 5000);
} catch {
notify("Cannot move — PTY not ready yet");
return;
}
}
try {