chore(memory): LRN-020 + journal — hotfix tmux window move

This commit is contained in:
bchanot committed 2026-11-13 16:53:57 +01:00
1 parent 35fe5c2842
commit e7b5fb0a2e
4 files changed
+53

No files matched your search

+3
View File
@@ -159,3 +159,6 @@ Done: feature merged in develop but ~/.bashrc predated it (only install.sh write
## 2026-10-30
- Memory registries → v2 (`memory.sh upgrade`, claude-config BDR-129 phase 4a): `check` green, open blockers unchanged.
## 2026-11-13
- tmux prefix < > move window left/right (f92b026, feature/tmux-move-window). v1 swap-only reverted: focus stayed on slot; v2 adds select-window. CHANGELOG entry.
+3
View File
@@ -169,3 +169,6 @@ path must survive inactive unit. Stub `systemctl`/`sudo`/`sshd` on PATH in scrat
Context: tmux-before-router merged in develop, SSH still showed dtach menu first. ~/.bashrc written only by install.sh (rendered template), predated merge.
Pattern: after any bash/ or zsh/ edit, redeploy (install.sh, or render template and copy), then diff template vs deployed.
Apply: "fix not working" after merge → diff deployed rc vs template first.
## LRN-020 — tmux swap-window focus stays on slot, not moved window (2026-11-13)
2026-11-13, tmux 3.6. `swap-window -t -1` without `-d` keeps focus on current INDEX: window swapped into that slot becomes current, moved window loses focus. Man "new window becomes current" misread as "moved window". Move-window binding needs `swap-window -t -1 \; select-window -t -1` (same for +1). Relative offsets wrap at list ends (first window + `<` swaps with last). Verify headless: scratch socket `-L`, `new-window -t t:` (bare `-t t` → "index 0 in use"), compare `#{window_index} #{window_id} #{window_active}` before/after; names unreliable (plugin renames). See LRN-017 for key tests.
@@ -0,0 +1,25 @@
# CONTRACT — tmux-move-window
- date: 2026-11-13 | flow: hotfix | branch: feature/tmux-move-window
- status: abandoned (smoke 2 failed: focus stays on slot; superseded)
## REQUEST (verbatim — IMMUTABLE)
comment deplacer un onglet de gauche a droite dnas la liste des onglet sur tmux ?
→ (after proposal of prefix < / > bindings) "oui ajoute le"
## CLARIFICATIONS
Q: keys? / A: prefix < and > (proposed, accepted) [gated 2026-11-13]
Q: focus? / A: focus follows moved window (no -d, no extra select-window) [gated 2026-11-13]
## ACCEPTANCE CRITERIA
1. tmux.conf loads clean and prefix table binds < / > to swap-window -t -1 / +1
CHECK: tmux -L tmvchk -f tmux.conf new-session -d -s t && tmux -L tmvchk list-keys -T prefix | grep -E 'prefix +[<>] +swap-window -t [-+]1' | wc -l; tmux -L tmvchk kill-server
EXPECT: 2
EVIDENCE: pending
2. swap-window -t -1 on window 3 of 3 moves it to slot 2 and it stays current
CHECK: headless scratch socket, window ids compared before/after
EXPECT: moved id at index 2, active
EVIDENCE: pending
3. shellcheck/bash -n unaffected (tmux.conf not linted); no other file changed
## FILE SCOPE
tmux.conf
@@ -0,0 +1,22 @@
# CONTRACT — tmux-move-window-v2
- date: 2026-11-13 | flow: hotfix | branch: feature/tmux-move-window
- status: active
## REQUEST (verbatim — IMMUTABLE)
comment deplacer un onglet de gauche a droite dnas la liste des onglet sur tmux ?
→ "oui ajoute le" → (after failed v1) "biensur reecris et applique"
## CLARIFICATIONS
Q: keys? / A: prefix < and > [gated 2026-11-13]
Q: focus? / A: follows moved window → swap-window then select-window same offset (swap alone keeps focus on slot, tested tmux 3.6) [gated 2026-11-13]
## ACCEPTANCE CRITERIA
1. prefix table binds < / > to swap-window ±1 + select-window ±1
CHECK: tmux -L tmvchk -f tmux.conf new-session -d -s t && tmux -L tmvchk list-keys -T prefix | grep -cE 'prefix +[<>] +swap-window -t [-+]1 \; select-window -t [-+]1'; tmux -L tmvchk kill-server
EXPECT: 2
EVIDENCE: pending
2. Window 3 of 3, bound command for <: moved id at index 1 and active
3. Only tmux.conf changed
## FILE SCOPE
tmux.conf