Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(work-panel): restore window dragging in unused tab-strip space

AR307e697ceaa17ae
diff --git a/apps/desktop/src/components/workpanel/WorkPanel.tsx b/apps/desktop/src/components/workpanel/WorkPanel.tsx
index ac7144ca7..dae68bbea 100644
--- a/apps/desktop/src/components/workpanel/WorkPanel.tsx
+++ b/apps/desktop/src/components/workpanel/WorkPanel.tsx
@@ -801,7 +801,7 @@ export function WorkPanel({
/>
<div className="work-panel-main">
<header className="work-panel-header">
- <div className="work-panel-tab-strip-wrap no-drag">
+ <div className="work-panel-tab-strip-wrap">
<div
ref={tabStripRef}
className="work-panel-tab-strip"
@@ -824,7 +824,7 @@ export function WorkPanel({
return (
<div
className={cx(
- "work-panel-tab",
+ "work-panel-tab no-drag",
selected && "active",
draggingTabId === tab.id && "is-dragging",
dropIndicator?.tabId === tab.id &&
diff --git a/docs/spec/04-ux/01-ui-ia.md b/docs/spec/04-ux/01-ui-ia.md
index 844c30b18..940958419 100644
--- a/docs/spec/04-ux/01-ui-ia.md
+++ b/docs/spec/04-ux/01-ui-ia.md
@@ -100,8 +100,10 @@ destination, chat as the home surface, tools and permissions inline.
- **Work panel**: docked right column (not an overlay) opened by an artifact,
the viewport-fixed toggle, or `Cmd/Ctrl + J`. File, URL, browser-preview, and
successful workspace-edit artifacts create their resources atomically. The
- 46px content header exposes a tablist and a fixed `+` trigger. Its tokenized
- 44px right-side safe lane (the 28px control, its 12px viewport inset, and the
+ 46px content header exposes a tablist and a fixed `+` trigger. Unused
+ tab-strip space remains a native window drag region; individual tabs and
+ header actions are no-drag so selection, closing, and reordering still work.
+ Its tokenized 44px right-side safe lane (the 28px control, its 12px viewport inset, and the
header's 4px control gap) keeps the `+`, maximize, and viewport-fixed
work-panel toggle one button group, spaced by that same gap, while the trigger
keeps a distinct hit target. Clicking `+` creates and activates
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index be11b1497..f7b70918b 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -4170,7 +4170,9 @@ identify the platform validation still needed.
the before/after drop indicator, resulting order, and unchanged active tab;
hold a drag at each strip edge until hidden tabs scroll into view, then verify
the indicator follows the newly visible targets. Repeat with
- `Alt+ArrowLeft`/`Alt+ArrowRight`. 4) Click `+` twice and verify each click
+ `Alt+ArrowLeft`/`Alt+ArrowRight`. With only one or two tabs, drag unused
+ header space to move the native window; tab and action clicks must still
+ work without moving it. 4) Click `+` twice and verify each click
creates and activates a separate New launcher tab. Confirm the launcher body
contains Review plus each in-scope plugin view exactly once as clickable rows;
there is no work-panel dropdown or popup. Click Browser from one New tab and
diff --git a/scripts/e2e/work-panel-reorder.tsx b/scripts/e2e/work-panel-reorder.tsx
index a6ff9ee2c..df86018c2 100644
--- a/scripts/e2e/work-panel-reorder.tsx
+++ b/scripts/e2e/work-panel-reorder.tsx
@@ -130,6 +130,19 @@ globalThis.workPanelReorderProbe = async () => {
);
flushSync(() => cardRoot.render(<CardFixture moved={(id) => cardMoves.push(id)} />));
assert(panelHost.querySelector('[role="tab"][aria-selected="true"]'), "active launcher tab did not render");
+ // Unused header space drags the window; tabs remain interactive.
+ assert(
+ !panelHost.querySelector(".work-panel-tab-strip-wrap")?.classList.contains("no-drag"),
+ "empty tab-strip space blocks native window dragging",
+ );
+ assert(
+ [...panelHost.querySelectorAll(".work-panel-tab")].every((tab) => tab.classList.contains("no-drag")),
+ "tab interactions must remain outside native window dragging",
+ );
+ assert(
+ panelHost.querySelector(".work-panel-actions")?.classList.contains("no-drag"),
+ "header actions must remain clickable",
+ );
window.requestAnimationFrame = (callback) => {
const id = ++nextFrameId;