agileflow 4.0.0-alpha.12 → 4.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agileflow",
3
- "version": "4.0.0-alpha.12",
3
+ "version": "4.0.0-alpha.14",
4
4
  "description": "AI-driven agile development toolkit for Claude Code — skills-first architecture with opt-in plugins (v4)",
5
5
  "keywords": [
6
6
  "agile",
@@ -273,19 +273,18 @@ const TAB_KEYBINDS = [
273
273
  hint: "Alt+, → rename current tab",
274
274
  },
275
275
  {
276
- // confirm-before runs the command on `y` and does nothing on `n`.
277
- // We pass session+index as positional args so the callback targets
278
- // the exact window the user pressed Alt+w on — without this, the
279
- // callback would re-probe display-message and could close the
280
- // wrong tab if focus moved during the confirmation prompt.
276
+ // Direct close no confirm-before. The earlier confirm-before
277
+ // path was brittle under tmux's bind-key parsing (deferred-command
278
+ // quoting issues caused the keybind to silently no-op on some
279
+ // tmux builds). Alt+Shift+T (Alt+T) restores the last closed
280
+ // tab in the same cwd, so the close is effectively reversible —
281
+ // matches Chrome's instant-close + Ctrl+Shift+T undo.
281
282
  key: "M-w",
282
283
  action: [
283
- "confirm-before",
284
- "-p",
285
- "kill tab #W? (y/n)",
286
- "run-shell '%AGILEFLOW% launch __close-window #{session_name} #{window_index}'",
284
+ "run-shell",
285
+ "%AGILEFLOW% launch __close-window #{session_name} #{window_index}",
287
286
  ],
288
- hint: "Alt+w → close current tab (with confirm)",
287
+ hint: "Alt+w → close current tab (Alt+Shift+T to undo)",
289
288
  },
290
289
  {
291
290
  // tmux's built-in window picker. -Z zooms (full-screen the picker),
@@ -311,6 +310,26 @@ const TAB_KEYBINDS = [
311
310
  action: ["select-window", "-t", `:${n}`],
312
311
  hint: `Alt+${n} → switch to tab ${n}`,
313
312
  })),
313
+ // Browser-style cycling. Bind M-S-Tab AND M-BTab — terminals split
314
+ // on which escape sequence they emit for Shift+Tab, so binding both
315
+ // covers either path. Note: some window managers (GNOME, KDE)
316
+ // intercept Alt+Tab before it reaches tmux; works fine in fullscreen
317
+ // terminals on macOS and most tiling WMs.
318
+ {
319
+ key: "M-Tab",
320
+ action: ["next-window"],
321
+ hint: "Alt+Tab → next tab",
322
+ },
323
+ {
324
+ key: "M-S-Tab",
325
+ action: ["previous-window"],
326
+ hint: "Alt+Shift+Tab → previous tab",
327
+ },
328
+ {
329
+ key: "M-BTab",
330
+ action: ["previous-window"],
331
+ hint: "Alt+Shift+Tab → previous tab (alt encoding)",
332
+ },
314
333
  ];
315
334
 
316
335
  module.exports = {
@@ -198,14 +198,19 @@ function detectTmuxVersion(runner) {
198
198
  */
199
199
  function applyTabFormat(sessionName, runner, opts = {}) {
200
200
  const theme = { ...tabs.DEFAULT_TAB_THEME, ...(opts.theme || {}) };
201
- const format = tabs.buildTabFormat({
202
- tmuxVersion: opts.tmuxVersion,
203
- theme: opts.theme,
204
- });
205
- // Override tmux's default green status-style so the strip's dark
206
- // background isn't broken up by tmux's stock green bar. Also clear
207
- // status-left / status-right — they default to session info + clock
208
- // on green; the tab strip already shows what the user needs.
201
+ // Use the standard per-window formats instead of overriding the full
202
+ // status-format[0] — broader tmux compatibility, and tmux silently
203
+ // ignores invalid status-format expressions on some versions, which
204
+ // makes overrides hard to debug. window-status-format works on every
205
+ // tmux 2.0+.
206
+ const inactiveFormat = `#[fg=${theme.inactiveFg} bg=${theme.stripBg}] #I:#W `;
207
+ const activeFormat =
208
+ `#[fg=${theme.activeFg} bg=${theme.activeBg} bold] #I ` +
209
+ `#[fg=${theme.activeBg} bg=${theme.activeNameBg}]` +
210
+ `#[fg=${theme.activeNameFg} bg=${theme.activeNameBg}] #W ` +
211
+ `#[fg=${theme.activeNameBg} bg=${theme.stripBg}]`;
212
+ // status-style sets the row's base background so empty space between
213
+ // chips matches the strip color (no green leak from tmux's default).
209
214
  runner.runSync([
210
215
  "set-option",
211
216
  "-t",
@@ -215,12 +220,26 @@ function applyTabFormat(sessionName, runner, opts = {}) {
215
220
  ]);
216
221
  runner.runSync(["set-option", "-t", sessionName, "status-left", ""]);
217
222
  runner.runSync(["set-option", "-t", sessionName, "status-right", ""]);
223
+ runner.runSync([
224
+ "set-option",
225
+ "-t",
226
+ sessionName,
227
+ "window-status-separator",
228
+ "",
229
+ ]);
230
+ runner.runSync([
231
+ "set-option",
232
+ "-t",
233
+ sessionName,
234
+ "window-status-format",
235
+ inactiveFormat,
236
+ ]);
218
237
  const result = runner.runSync([
219
238
  "set-option",
220
239
  "-t",
221
240
  sessionName,
222
- "status-format[0]",
223
- format,
241
+ "window-status-current-format",
242
+ activeFormat,
224
243
  ]);
225
244
  return {
226
245
  applied: result.status === 0,