Fix split-pane right-edge resize clipping (#1261)

* fix(app): clamp split pane resize

Prevent right-edge drags from overflowing the Electron viewport.

* fix(app): isolate resize pointer state

Keep concurrent resize drags from clobbering each other.
This commit is contained in:
Éverton Toffanetto
2026-06-01 15:32:26 +08:00
committed by GitHub
parent 539d2969f1
commit ae5dfc0b3c
6 changed files with 181 additions and 24 deletions
@@ -1,5 +1,6 @@
import invariant from "tiny-invariant";
import type { WorkspaceTab, WorkspaceTabTarget } from "@/stores/workspace-tabs-store";
import { MIN_SPLIT_SIZE } from "@/stores/workspace-layout-constants";
import { defaultWorkspaceLayoutIds } from "@/stores/workspace-layout-ids";
import type { WorkspaceLayoutNodeIdPrefix } from "@/stores/workspace-layout-ids";
import {
@@ -208,7 +209,6 @@ export interface WorkspaceTabSnapshot {
}
const DEFAULT_PANE_ID = "main";
const MIN_SPLIT_SIZE = 0.1;
function trimNonEmpty(value: string | null | undefined): string | null {
if (typeof value !== "string") {
@@ -0,0 +1 @@
export const MIN_SPLIT_SIZE = 0.1;