feat(dnd): tear-off window matches pane size and grab position#310
Open
AgentA-asaf wants to merge 6 commits intomainfrom
Open
feat(dnd): tear-off window matches pane size and grab position#310AgentA-asaf wants to merge 6 commits intomainfrom
AgentA-asaf wants to merge 6 commits intomainfrom
Conversation
29 commands across 5 categories (open, split, window, tab, pane, dev). Agents/MCP can invoke any command programmatically via the run_command IPC endpoint without opening the UI. - frontend/app/store/command-registry.ts: CommandRegistry singleton, registerDefaultCommands(), agentmux-run-command event listener - frontend/app/modals/command-palette.tsx: SolidJS overlay with fuzzy search, arrow key nav, Enter to execute, Escape to dismiss - frontend/app/modals/command-palette.scss: palette styles - frontend/app/store/keymodel.ts: Ctrl+P → opens palette - frontend/app/modals/modalregistry.tsx: registers CommandPaletteModal - frontend/wave.ts: calls registerDefaultCommands() at init - agentmux-cef/src/commands/palette.rs: run_command handler, dispatches agentmux-run-command CustomEvent to target browser window - agentmux-cef/src/commands/mod.rs: pub mod palette - agentmux-cef/src/ipc.rs: "run_command" route arm Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New window is sized to match the torn-off pane's on-screen dimensions and positioned so the cursor lands at the same relative point within the window as it was within the pane when the drag started. - TileLayout.win32.tsx: capture paneRect (screen coords) and grabOffset (cursor offset within pane) in onDragStart via getBoundingClientRect - DragItemPayload: add optional paneRect + grabOffset fields - CrossWindowDragMonitor.win32.tsx: forward paneRect/grabOffset through performTearOff → openWindowAtPosition - CrossWindowDragMonitor.tsx/.platform.tsx: export PaneRect, GrabOffset types - custom.d.ts + cef-api.ts: extend openWindowAtPosition with width, height, grabOffsetX, grabOffsetY (all optional, backward-compatible) - drag.rs: use passed dimensions (min 400×300); position from grab offset instead of hardcoded center+16px; falls back to 1200×800 / top-center if frontend doesn't provide size (e.g. tab tearoff) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
ReAgent Diagnostics
| Field | Value |
|---|---|
| ReAgent Version | 5.12.5 |
| Trigger | PR opened |
| Project Context | CLAUDE.md loaded |
| Model | claude-opus-4-6 |
| Effort | high |
| Ref Repos | Disabled |
| Merge Analysis | Clean |
| Review Time | 209.5s |
| Timestamp | 2026-04-07T06:43:24Z |
| Repository | agentmuxai/agentmux |
| PR | #310 |
LGTM
AgentA-asaf
pushed a commit
that referenced
this pull request
Apr 13, 2026
- specs/SPEC_CONSOLIDATE_FORGE_IDENTITY_INTO_AGENT_2026_04_13.md: Commit the forge+identity consolidation spec alongside its four merged PRs (#363-#366). - specs/per-pane-process-tree-metrics.md: Commit previously-untracked per-pane metrics draft (v0.32.74 era). - docs/analysis/pane-tearoff-bug-status-2026-04-07.md: Move TEAROFF-BUG-STATUS.md (root scratch note) into docs/analysis/ where tear-off investigation docs already live. Related to open PR #310. - docs/archive/: new directory for stale session artifacts - HANDOFF-2026-03-31, 2026-04-02 (x2), 2026-04-03, 2026-04-04, 2026-04-08 — session hand-off snapshots, all stale - NEXT-2026-04-04 — day-ahead plan from last month - REPORT-2026-04-03-status, REPORT-v0.33.26 — point-in-time reports - CRASH-DUMP-ANALYSIS-2026-03-26 — one-time investigation - CEF-VERSION-REPORT-2026-04-03 — version snapshot - docs/retro → docs/retros: merge singleton dir into plural dir (raw-browser-on-launch.md). - docs/spec → docs/specs: merge singleton dir into plural dir (process-state-tracker.md), plus docs/spec-dead-code-removal.md moved to docs/specs/dead-code-removal.md. bump: 0.33.128 -> 0.33.129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a pane is torn off into a new window, the new window is now sized to match the pane's on-screen dimensions and positioned so the cursor lands at the same relative point within the window as it was within the pane when the drag started.
Before: New window was always 1200×800, centered on cursor horizontally with a fixed 16px title-bar offset.
After: New window matches the pane's pixel dimensions (min 400×300). The cursor lands at the exact grab point — if you grabbed the pane near the top-left, the window appears top-left of the cursor; if you grabbed near the center, the window centers on it.
Changes
frontend/layout/lib/TileLayout.win32.tsxpaneRect(screen coords) andgrabOffsetinonDragStartviagetBoundingClientRectfrontend/app/drag/CrossWindowDragMonitor.win32.tsxpaneRect/grabOffsettoDragItemPayload; forward throughperformTearOff → openWindowAtPositionfrontend/app/drag/CrossWindowDragMonitor.tsx+.platform.tsxPaneRect,GrabOffsettypesfrontend/types/custom.d.tsopenWindowAtPositionsignature (optionalwidth,height,grabOffsetX,grabOffsetY)frontend/util/cef-api.tsagentmux-cef/src/commands/drag.rsFully backward-compatible — all new fields are optional with safe fallbacks.
Test plan
🤖 Generated with Claude Code