A local-first multi-agent app development platform, built on PenguinHarness
fix(ui): 下侧栏的拖拽带伸到框架外的一半被裁掉,边界线按不动
lmlihengce7b9548eb91
diff --git a/changelog/unreleased/2026-10-17-dock-resize-band.md b/changelog/unreleased/2026-10-17-dock-resize-band.mdnew file mode 100644index 00000000..142a8ef3--- /dev/null+++ b/changelog/unreleased/2026-10-17-dock-resize-band.md@@ -0,0 +1,21 @@+# The bottom dock's resize boundary is grabbable along its whole length++- **Date:** 2026-10-17+- **Type:** fix+- **Scope:** `ui`, `web`++[中文版](2026-10-17-dock-resize-band.zh.md)++The bottom dock's top boundary is a 6 px drag band that resizes it. The band used to straddle the frame's top edge — but the frame is `overflow-hidden` (it clips itself while its size animates), so the half sticking out above the edge was clipped away: only the inner 3 px could be grabbed, and the line the user actually sees (the frame's 1 px border) sat on the clipped side and did nothing when pressed.++The band now sits wholly inside the frame's top edge (`top-0`, still 6 px), where nothing clips it: the 6 px below the line all drag, and the pointer turns into the row-resize arrow across them. The right dock's band (the vertical one between columns) has no clipping ancestor and still straddles its edge; in full screen the same element is carried by the frame's fixed seat, so its position is unchanged.++## Details++- `packages/ui`, `ResizeHandle`: `edge="start"` on `axis="y"` goes from `-top-[3px]` to `top-0`, with the reason written next to the constant.+- `packages/web`, `dock-panel.tsx`: comment only — the boundary handle lies along the top edge, just inside it.+- The matching assertion in `test/resize-handle.test.ts` follows, plus the x-axis case that still straddles.++## Verification++A real server and browser (one-off data root, `localhost`, Chromium): before the change, `elementFromPoint` at the band's centre resolved to the dock frame itself and a 120 px drag changed the height by **0**; after it, the same point resolves to the band and the same drag takes the height **276 → 394** (+118). The browser e2e `dock.spec.mjs` "sizes and the arrangement survive a reload" goes from red to green.diff --git a/changelog/unreleased/2026-10-17-dock-resize-band.zh.md b/changelog/unreleased/2026-10-17-dock-resize-band.zh.mdnew file mode 100644index 00000000..e2d28a80--- /dev/null+++ b/changelog/unreleased/2026-10-17-dock-resize-band.zh.md@@ -0,0 +1,21 @@+# 下侧栏的拖拽边界整条都能抓++- **Date:** 2026-10-17+- **Type:** fix+- **Scope:** `ui`, `web`++[English](2026-10-17-dock-resize-band.md)++底边停靠栏(下侧栏)的上边界是一条 6 px 的拖拽带,用它上下拖动改高度。这条带子过去以框架顶边为中心横跨两侧 —— 但框架自己是 `overflow-hidden`(动画收缩尺寸时要裁内容),于是伸到框架外面的那一半被裁掉:真正能抓的只剩内侧 3 px,而屏幕上看到的那条边界线(框架的 1 px 边线)恰好落在被裁掉的一侧、按下去毫无反应。++现在这条带子整体贴在框架顶边以内(`top-0`,仍是 6 px),不再被裁:边界线以下 6 px 都能拖,指针也在这 6 px 里变成上下箭头。右侧栏那条(列与列之间的竖带)没有裁剪它的祖先,照旧跨在边界上;全屏时那条仍由框架的固定定位「座位」托着,位置不变。++## 细节++- `packages/ui` 的 `ResizeHandle`:`edge="start"` 在 `axis="y"` 时由 `-top-[3px]` 改为 `top-0`,并在常量旁写明缘由。+- `packages/web` 的 `dock-panel.tsx` 只改注释:边界柄沿顶边放、且贴在内侧。+- `test/resize-handle.test.ts` 那条断言跟着改,并补上「x 轴仍跨在边界上」的对照。++## 验证++真服务端 + 真浏览器(一次性数据根、`localhost`、Chromium):改前在拖拽带中心 `elementFromPoint` 命中的是停靠栏框架本身、按下拖动高度变化为 **0**;改后在同一点命中拖拽带,向上拖 120 px 高度 **276 → 394**(+118)。浏览器 e2e 的 `dock.spec.mjs`「sizes and the arrangement survive a reload」由红转绿。diff --git a/packages/ui/src/components/layout/resize-handle/resize-handle.tsx b/packages/ui/src/components/layout/resize-handle/resize-handle.tsxindex 8b0a8c75..78bab152 100644--- a/packages/ui/src/components/layout/resize-handle/resize-handle.tsx+++ b/packages/ui/src/components/layout/resize-handle/resize-handle.tsx@@ -30,14 +30,21 @@ export const RESIZE_HANDLE_PX = 6;/** One arrow-key step, in px: coarse enough to get somewhere, fine enough to land. */export const RESIZE_STEP_PX = 16;-/** The overlay placements: which edge of the positioned parent the bar straddles, by axis. */+/**+ * The overlay placements: which edge of the positioned parent the bar rides, by axis. Along x+ * the bar straddles the edge (the column beside it has no clipping ancestor in between); along+ * y the START edge sits *inside* instead — a bottom panel's frame is `overflow-hidden` (it clips+ * its animated size), so a half sticking out above the edge was clipped away and only the inner+ * 3 px of the 6 px band could be grabbed, with the boundary line itself dead. `end` (a bottom+ * edge, used by nothing today) keeps the straddle.+ */const EDGE_CLASS = {x: {start: "absolute inset-y-0 -left-[3px] z-20 w-1.5",end: "absolute inset-y-0 -right-[3px] z-20 w-1.5",},y: {- start: "absolute inset-x-0 -top-[3px] z-20 h-1.5",+ start: "absolute inset-x-0 top-0 z-20 h-1.5",end: "absolute inset-x-0 -bottom-[3px] z-20 h-1.5",},} as const;diff --git a/packages/ui/test/resize-handle.test.ts b/packages/ui/test/resize-handle.test.tsindex 3b981232..f49560b2 100644--- a/packages/ui/test/resize-handle.test.ts+++ b/packages/ui/test/resize-handle.test.ts@@ -51,19 +51,30 @@ describe("ResizeHandle", () => {expect(html).toContain('tabindex="0"');});- it("draws in the info tone, as a row sibling or straddling an edge", () => {+ it("draws in the info tone, as a row sibling or an overlay on an edge", () => {const inline = classTokens(renderStatic(createElement(ResizeHandle, { axis: "x", label: "Resize", onResize: noop })),);expect(inline).toEqual(expect.arrayContaining(["w-1.5", "shrink-0", "cursor-col-resize"]));expect(inline).toContain("hover:bg-tone-info-emphasis/40");expect(inline).not.toContain("absolute");+ // Along x the overlay straddles the edge it resizes.+ const side = classTokens(+ renderStatic(+ createElement(ResizeHandle, { axis: "x", label: "Resize", onResize: noop, edge: "start" }),+ ),+ );+ expect(side).toEqual(expect.arrayContaining(["absolute", "-left-[3px]", "w-1.5"]));+ // Along y the leading overlay sits just INSIDE its parent: the bottom panel's frame clips its+ // animated size with `overflow-hidden`, so a straddling half was clipped away and only the+ // inner 3 px of the 6 px band could be grabbed at all (the boundary line itself was dead).const edge = classTokens(renderStatic(createElement(ResizeHandle, { axis: "y", label: "Resize", onResize: noop, edge: "start" }),),);- expect(edge).toEqual(expect.arrayContaining(["absolute", "-top-[3px]", "h-1.5"]));+ expect(edge).toEqual(expect.arrayContaining(["absolute", "top-0", "h-1.5"]));+ expect(edge).not.toContain("-top-[3px]");});});diff --git a/packages/web/src/features/dock/dock-panel.tsx b/packages/web/src/features/dock/dock-panel.tsxindex 0f5ea7bc..cfb431be 100644--- a/packages/web/src/features/dock/dock-panel.tsx+++ b/packages/web/src/features/dock/dock-panel.tsx@@ -807,8 +807,9 @@ export function DockPanel({</ConfirmModal>);- // The boundary handle: on the bottom dock an overlay straddling the top edge (it costs no- // height), on the right dock a layout sibling (it must cost real width); the frame seats it,+ // The boundary handle: on the bottom dock an overlay along the top edge (it costs no height —+ // and it sits just inside, since the frame's own overflow-hidden would clip a straddling half),+ // on the right dock a layout sibling (it must cost real width); the frame seats it,// and moves the same element onto the cover's leading edge while the surface is fullscreen, so// a drag that snaps the surface in or out keeps its pointer and ends on the release as usual.// The store clamps the size a drag asks for.