8000 Pane lock: separate "lock size/layout" from "lock against agents" · Issue #481 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Pane lock: separate "lock size/layout" from "lock against agents" #481

Backlog

Description

@mkh63d

Problem

A pane has a single locked flag. Today it means "agents and moved tabs can't enter" (see the surfaceTab.lockedTooltip string, lockedAssignedPane in src/main/agent-spawn-target.ts), and wmux layout grid also refuses a workspace with a locked pane.

These are two different intents and users want them independently:

  1. Keep the pane's size/position fixed — don't let layout grid / layout agents / splits / dividers reshuffle it, but still allow agents to be spawned into it.
  2. Keep other agents out — don't let wmux agent spawn or tab moves target it, but still allow resizing and re-layout.

With one flag you can't get either alone: locking to keep agents out also freezes layout operations, and there is no way to freeze size while still letting an orchestrator put agents there.

Proposal

Split into two independent flags per pane (e.g. sizeLocked and agentsLocked; names open):

  • UI: two toggles on the pane/tab bar (or one toggle with a small menu), each with its own tooltip and icon state.
  • agentsLocked: current spawn/tab-move behavior (SpawnTargetError "Pane X is locked").
  • sizeLocked: pane keeps its size and place; layout grid/layout agents, divider drag and splits adjacent to it respect it (and report a clear error naming the pane if they can't).
  • CLI: wmux pane lock|unlock [--size] [--agents] (default --agents, preserving current behavior), and both flags exposed in the pane/layout JSON.
  • Migration: existing locked: true maps to agentsLocked: true so nothing changes for current users.
  • Update the agent instructions text that mentions locked panes.

Acceptance

  • Each flag can be set and cleared independently, persists across restart, and shows in the UI.
  • Agent spawn into an agentsLocked pane fails; into a sizeLocked-only pane succeeds.
  • layout grid leaves a sizeLocked pane's size untouched; an agentsLocked-only pane doesn't block it.
  • Existing sessions with locked: true behave as before.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0