Skip to content

feat: configurable session shortcut keys for sidebar#10

Merged
aguil merged 9 commits into
mainfrom
feat/session-shortcut-keys
Jul 11, 2026
Merged

feat: configurable session shortcut keys for sidebar#10
aguil merged 9 commits into
mainfrom
feat/session-shortcut-keys

Conversation

@aguil

@aguil aguil commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #8 (session shortcut keys portion; VCS cache/throttle was addressed in #9).

  • Add session-shortcut-keys config (default stock tmux alphabet) with optional @work-session-shortcut-keys tmux global override
  • Add session-shortcut-index config (id default, or choose-order for choose-tree list position) with optional @work-session-shortcut-index tmux global
  • Sidebar session labels now respect custom alphabets and choose-order when session ids have gaps

Configuration

work config set session-shortcut-keys '0123456789abcdegiopu'
work config set session-shortcut-index choose-order

Or via tmux globals alongside bind-key s choose-tree -sZ -K …:

set-option -g @work-session-shortcut-keys "0123456789abcdegiopu"
set-option -g @work-session-shortcut-index choose-order

Test plan

  • npm run typecheck
  • npm run lint
  • npm run test:unit (15 tests)
  • Manual: set custom alphabet + choose-order, confirm sidebar labels match prefix + s picker with gapped session ids

Made with Cursor

aguil added 7 commits July 11, 2026 15:33
Default to stock tmux choose-session alphabet; configurable via work config get/set.
Read alphabet from @work-session-shortcut-keys global option, falling back to
work config session-shortcut-keys.
Support id ($N-1, default) and choose-order (choose-tree -s list position).
Resolve shortcut index from choose-tree -s list position when
session-shortcut-index is choose-order. Optional @work-session-shortcut-index
tmux global overrides work config.
Explain how sidebar labels relate to choose-tree -K, stock tmux key
assignment, and work/tmux configuration options.
@aguil aguil force-pushed the feat/session-shortcut-keys branch 4 times, most recently from 3b95314 to aa40398 Compare July 11, 2026 21:49
compliance-session-shortcut-index-unsettable: add parseConfigValue case for
session-shortcut-index so `work config set` matches README.

performance-choose-order-repeated-sort: precompute SessionShortcutContext once
per sidebar render instead of re-sorting sessions per row.

quality-unit-tests-read-ambient-config: isolate unit tests from host work
config and tmux globals via XDG_CONFIG_HOME and index-source override.
@aguil aguil force-pushed the feat/session-shortcut-keys branch from aa40398 to ef8f0c7 Compare July 11, 2026 21:52
@aguil aguil marked this pull request as ready for review July 11, 2026 21:56
@aguil aguil force-pushed the feat/session-shortcut-keys branch from ef8f0c7 to 313f571 Compare July 11, 2026 22:05
compliance-readme-workd-cache-lifetime: document that tmux globals are cached
for the work sidebar client process, not workd.

compliance-tmux-client-config-coupling: resolve session-shortcut-keys and
session-shortcut-index from src/sidebar/session-shortcut.ts; keep src/tmux/
as a thin CLI wrapper without config imports.

Includes prettier table alignment in README for pre-commit.
@aguil aguil force-pushed the feat/session-shortcut-keys branch from 313f571 to 9eb1681 Compare July 11, 2026 22:05
@aguil aguil merged commit 4002c9b into main Jul 11, 2026
2 checks passed
@aguil aguil deleted the feat/session-shortcut-keys branch July 11, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar follow-ups: configurable session keys and daemon VCS cache

1 participant