From a7378bff8c5dd1637a5b3be59aa03c6e0380eea6 Mon Sep 17 00:00:00 2001 From: hannesreinsch Date: Thu, 17 Sep 2026 12:06:17 +0200 Subject: [PATCH 01/11] feat: one pane that asks, a grid of six, drag a title to move a pane An office no longer opens a fixed layout. It opens ONE pane whose menu asks what it should be: any OFFICE_AGENTS entry, a shell, or the file editor. Ctrl-Space n asks the same for every pane after it. Panes sit in a grid of at most three across and two down, rebuilt on every add, park, move and close. - parked panes are listed first in that menu, each under a letter, and the bar counts them, so a parked pane can always be found again - drag a pane's title onto another pane to move it there; border drag no longer resizes (tmux reports a divider press as the same event) - the first agent works in the checkout, every later one in its own worktree - removed: the right strip, the s/e/c/a toggles, | - C, the chat pane and OFFICE_CHAT_*, OFFICE_STRIP_WIDTH, OFFICE_DEFAULT_DESKS - bin/grid-probe replaces bin/zoom-probe; bin/menu-probe drives the menu on a real client; bin/mouse-probe covers the title drag Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/ci.yml | 17 +- bin/agent-probe | 30 +- bin/attn-probe | 7 +- bin/grid-probe | 145 ++++++ bin/menu-probe | 131 ++++++ bin/mouse-probe | 46 ++ bin/off-probe | 3 +- bin/office-attn | 2 +- bin/root-probe | 3 +- bin/zoom-probe | 98 ---- office.tmux.conf | 73 ++- office.zsh | 862 ++++++++++++----------------------- theme/office-theme.tmux.conf | 14 +- 13 files changed, 720 insertions(+), 711 deletions(-) create mode 100755 bin/grid-probe create mode 100755 bin/menu-probe delete mode 100755 bin/zoom-probe diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0566a87..23559d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,13 +63,13 @@ jobs: zsh -n bin/off-probe zsh -n bin/root-probe zsh -n bin/ctx-probe - zsh -n bin/zoom-probe + zsh -n bin/grid-probe zsh -n bin/agent-probe zsh -n install.sh sh -n bin/office-attn sh -n bin/office-ctx sh -n bin/office-cwd - python3 -m py_compile bin/key-probe bin/mouse-probe + python3 -m py_compile bin/key-probe bin/mouse-probe bin/menu-probe # tmux refuses to parse a config it cannot read, and a broken one would # otherwise only surface as "the keys do nothing" inside a probe. @@ -80,6 +80,10 @@ jobs: tmux -L cfg source-file "$PWD/theme/office-theme.tmux.conf" tmux -L cfg list-keys -T prefix | grep -qE '^bind-key +-T prefix +n ' \ || { echo "prefix n is not bound"; exit 1; } + # the pane toggles are gone: a pane is whatever you pick from n + if tmux -L cfg list-keys -T prefix | grep -qE "^bind-key +-T prefix +[scea] .*office"; then + echo "a pane toggle key is back"; exit 1 + fi # No destructive action may sit behind one hard-coded letter again. # `confirm-before` takes exactly one key for yes -- y -- and on a # QWERTZ keyboard the key the hand reaches for sends z, so the prompt @@ -135,8 +139,9 @@ jobs: - name: root-probe run: bin/root-probe - - name: zoom-probe - run: bin/zoom-probe + # one pane that asks, then the grid: three across, two down, six in all + - name: grid-probe + run: bin/grid-probe - name: attn-probe run: bin/attn-probe @@ -157,3 +162,7 @@ jobs: - name: agent-probe run: bin/agent-probe + + # the menu draws only on a real client, so this one attaches one + - name: menu-probe + run: bin/menu-probe diff --git a/bin/agent-probe b/bin/agent-probe index b80f036..ee0dcac 100755 --- a/bin/agent-probe +++ b/bin/agent-probe @@ -1,7 +1,7 @@ #!/usr/bin/env zsh -# agent-probe — OFFICE_AGENTS: one is invisible, several ask which. +# agent-probe — OFFICE_AGENTS: every entry is on the list, and a pick runs that one. # -# Run it after ANY change to OFFICE_AGENTS, _office_new or _office_agent_menu. +# Run it after ANY change to OFFICE_AGENTS, _office_new or _office_menu. # It builds a throwaway office on its own tmux server and drives `office new` # directly, the same call `bind n` makes. # @@ -9,14 +9,12 @@ # # What it is looking for: # -# - one agent (the default, built from OFFICE_SESSION_CMD/_LABEL): Ctrl-Space -# n opens a desk directly, running that command under that label. No menu, -# ever — this is the case every existing .zshrc is in today, and it must -# stay indistinguishable from before this feature existed. -# - 2+ agents and none named: opens NOTHING. There is no attached client on -# this throwaway server, which is deliberate — display-menu cannot be made -# to draw headless, so this is also the proof that the no-agent path -# really does defer to the menu instead of falling back to agent 1 quietly. +# - one agent (the default, built from OFFICE_SESSION_CMD/_LABEL): a named +# worktree opens that agent, running that command under that label. +# - a bare `office new` opens NOTHING. There is no attached client on this +# throwaway server, which is deliberate — display-menu cannot be made to +# draw headless, so this is also the proof that the bare path really does +# defer to the menu instead of quietly opening agent 1. # - `--agent 2` and `--agent