From 4336b0bf88d7ec45e374f2c6f242e08e095500c4 Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 13 Nov 2026 18:13:43 +0100 Subject: [PATCH] =?UTF-8?q?chore(memory):=20journal=20=E2=80=94=20tmux=20b?= =?UTF-8?q?ell=20highlight=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/memory/journal.md | 1 + .../2026-11-13-tmux-bell-highlight-1720.md | 24 ++++++++++++++++ .../2026-11-13-tmux-bell-highlight-1720.md | 28 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 .claude/tasks/contracts/2026-11-13-tmux-bell-highlight-1720.md create mode 100644 .claude/tasks/plans/2026-11-13-tmux-bell-highlight-1720.md diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index bba3485..ba95def 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -162,3 +162,4 @@ Done: feature merged in develop but ~/.bashrc predated it (only install.sh write ## 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. +- tmux multi-tab highlight fixed (702f4a2, bugfix/tmux-bell-highlight): bell-action none dropped bells, monitor-bell still flagged bg tabs reverse. Now bell-action any + window-status-bell-style default. Live server patched via tmux set; deployed copy needs install.sh + prefix R. diff --git a/.claude/tasks/contracts/2026-11-13-tmux-bell-highlight-1720.md b/.claude/tasks/contracts/2026-11-13-tmux-bell-highlight-1720.md new file mode 100644 index 0000000..c4cc3b5 --- /dev/null +++ b/.claude/tasks/contracts/2026-11-13-tmux-bell-highlight-1720.md @@ -0,0 +1,24 @@ +# CONTRACT — tmux-bell-highlight +- date: 2026-11-13 | flow: hotfix | branch: bugfix/tmux-bell-highlight + +## REQUEST (verbatim — IMMUTABLE) +il y a un petit probleme dans les onglet tmux, sur le highlight des onlget, il y a souvent plusieurs onglet qui sont highlight plutot que juste l'onglet courant +→ "j'ai plus de bells depuis que je suis passe a tmux" + +## CLARIFICATIONS +Q: bell behaviour? / A: sound back, no tab highlight ("Son, sans highlight") [gated 2026-11-13] +Q: dirty .githooks/pre-commit? / A: leave it, targeted commit of tmux.conf only [gated 2026-11-13] +Note: bell-action `any` (tmux default, all windows ring = pre-tmux behaviour) instead of +`other` offered in the question: `other` would silence the current tab. Deviation reported to user. + +## ACCEPTANCE CRITERIA +1. tmux.conf loads clean; bell-action any; window-status-bell-style default + CHECK: bare scratch server (no tpm/continuum restore), only the bell lines applied: + tmux -L bellchk -f /dev/null new-session -d -s t; grep -E '^set(w)? .*bell' tmux.conf | sed 's/ *#.*//' | while read -r l; do eval "tmux -L bellchk $l"; done; tmux -L bellchk show -gv bell-action; tmux -L bellchk show -gwv window-status-bell-style; tmux -L bellchk kill-server + EXPECT: any / default +2. Only tmux.conf changed by this fix (.githooks/pre-commit pre-existing, untouched) + +3. A why-comment above the pair says monitor-bell must stay on + +## FILE SCOPE +tmux.conf diff --git a/.claude/tasks/plans/2026-11-13-tmux-bell-highlight-1720.md b/.claude/tasks/plans/2026-11-13-tmux-bell-highlight-1720.md new file mode 100644 index 0000000..9555ee2 --- /dev/null +++ b/.claude/tasks/plans/2026-11-13-tmux-bell-highlight-1720.md @@ -0,0 +1,28 @@ +# PLAN — tmux-bell-highlight (hotfix) + +## Root cause +tmux.conf:15 `set -g bell-action none`. bell-action only decides whether a bell is +forwarded to the client terminal → user hears no bell since tmux. The tab flag is +governed by monitor-bell (default on): a bell in a non-current window sets +WINLINK_BELL, drawn with window-status-bell-style (default `reverse`) until the +window is visited → several tabs highlighted at once. + +## Fix (tmux.conf, line 15 area, 2 lines) +- `set -g bell-action none # make it Shut up!` → `set -g bell-action any` + (forward bells from every window of the attached session, tmux default; + sessions with no attached client stay silent). +- add `setw -g window-status-bell-style default` (flag kept, no visual: only the + current tab stands out). Status formats use #I #W, not #F, so no `!` either. + +- one why-comment above the pair (bell sent to terminal; tab flag kept but + unstyled; monitor-bell must stay on or no bell is sent). [challenge simplicity#1] + +## After merge (not in repo diff) [challenge correctness#1, robustness#1] +Live server: main loop runs `tmux set -g bell-action any; tmux set -wg monitor-bell on; +tmux set -wg window-status-bell-style default`. Deployed copy ~/.config/tmux/tmux.conf +is a cp (install.sh:569): user redeploys (./install.sh or cp) on each host, then prefix R. +Rollback: revert, `setw -gu window-status-bell-style`, prefix R. [robustness#2] + +## Not changed +monitor-bell stays on (default): alerts_check_bell() returns early when it is off, +so no bell would reach the terminal. monitor-activity already off.