Add MRU sort for session tree #10

Open
ldraney wants to merge 1 commit from feature/session-reorder into main
Owner

Summary

  • Rebinds Ctrl+b s to choose-tree -sO time so most recently used sessions appear first
  • Updates session management docs to reflect new sort behavior

Changes

  • .tmux.conf: added bind-key s choose-tree -sO time
  • docs/session-management.md: updated switching table and custom bindings section

Test Plan

  • Ctrl+b s shows sessions sorted by most recently used
  • Switching between sessions updates sort order
  • No regressions in other session keybindings

Review Checklist

  • Passed automated review-fix loop
  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • Feature flag needed? No -- config binding change
  • ldraney/tmux-custom #9 -- the Forgejo issue this PR implements
  • Closes #9
## Summary - Rebinds `Ctrl+b s` to `choose-tree -sO time` so most recently used sessions appear first - Updates session management docs to reflect new sort behavior ## Changes - `.tmux.conf`: added `bind-key s choose-tree -sO time` - `docs/session-management.md`: updated switching table and custom bindings section ## Test Plan - [ ] `Ctrl+b s` shows sessions sorted by most recently used - [ ] Switching between sessions updates sort order - [ ] No regressions in other session keybindings ## Review Checklist - [ ] Passed automated review-fix loop - [ ] No secrets committed - [ ] No unnecessary file changes - [ ] Commit messages are descriptive - [ ] Feature flag needed? No -- config binding change ## Related Notes - `ldraney/tmux-custom #9` -- the Forgejo issue this PR implements - Closes #9
Rebinds prefix+s to choose-tree -sO time so most recently used
sessions appear at the top. Updates session management docs.

Closes #9

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

PR #10 Review

DOMAIN REVIEW

Tech stack: tmux configuration (shell/dotfiles), Markdown documentation.

.tmux.conf binding analysis:

  • bind-key s choose-tree -sO time overrides tmux's default s binding (choose-tree -s) with MRU sort. This is the intended behavior.
  • No conflict with any other binding in the config. All other bindings use different keys (", %, c, <, >) or different key tables (copy-mode-vi, root).
  • Placement is correct -- grouped with other session-related bindings near MouseDown1StatusLeft (line 13), before the window-reorder binding.
  • The -s flag collapses windows (session-only view) and -O time sorts by last-used timestamp. Flags are correct per tmux(1).

Documentation analysis:

  • Switching table updated accurately: "Open session tree sorted by most recently used" matches the actual behavior.
  • Custom bindings section updated from "one" to "two" conveniences, with the MRU binding listed first -- reads well since it is the more impactful of the two.
  • Removed stale line reference ("See .tmux.conf line 13") -- good practice since line numbers drift with every edit.
  • Net change is +3/-4 in docs, tighter and more accurate.

BLOCKERS

None.

NITS

  1. The comment in .tmux.conf says "active sessions float to top" -- this is accurate but could note that the default sort (alphabetical) is overridden, for anyone reading the config without the docs. Very minor; the comment is already clear enough.

SOP COMPLIANCE

  • PR body has Summary, Changes, Test Plan, Related
  • No secrets or credentials committed
  • No unnecessary file changes (2 files, both directly relevant to issue #9)
  • Commit messages are descriptive
  • Scope is tight -- one binding + matching doc update, nothing extraneous

PROCESS OBSERVATIONS

Clean, minimal PR. Config change is a single line with an immediately verifiable test plan (open session tree, confirm sort order). Documentation updates match the code change 1:1. Low change-failure risk -- worst case is reverting one bind-key line.

VERDICT: APPROVED

## PR #10 Review ### DOMAIN REVIEW **Tech stack:** tmux configuration (shell/dotfiles), Markdown documentation. **`.tmux.conf` binding analysis:** - `bind-key s choose-tree -sO time` overrides tmux's default `s` binding (`choose-tree -s`) with MRU sort. This is the intended behavior. - No conflict with any other binding in the config. All other bindings use different keys (`"`, `%`, `c`, `<`, `>`) or different key tables (`copy-mode-vi`, `root`). - Placement is correct -- grouped with other session-related bindings near `MouseDown1StatusLeft` (line 13), before the window-reorder binding. - The `-s` flag collapses windows (session-only view) and `-O time` sorts by last-used timestamp. Flags are correct per `tmux(1)`. **Documentation analysis:** - Switching table updated accurately: "Open session tree sorted by most recently used" matches the actual behavior. - Custom bindings section updated from "one" to "two" conveniences, with the MRU binding listed first -- reads well since it is the more impactful of the two. - Removed stale line reference ("See `.tmux.conf` line 13") -- good practice since line numbers drift with every edit. - Net change is +3/-4 in docs, tighter and more accurate. ### BLOCKERS None. ### NITS 1. The comment in `.tmux.conf` says "active sessions float to top" -- this is accurate but could note that the default sort (alphabetical) is overridden, for anyone reading the config without the docs. Very minor; the comment is already clear enough. ### SOP COMPLIANCE - [x] PR body has Summary, Changes, Test Plan, Related - [x] No secrets or credentials committed - [x] No unnecessary file changes (2 files, both directly relevant to issue #9) - [x] Commit messages are descriptive - [x] Scope is tight -- one binding + matching doc update, nothing extraneous ### PROCESS OBSERVATIONS Clean, minimal PR. Config change is a single line with an immediately verifiable test plan (open session tree, confirm sort order). Documentation updates match the code change 1:1. Low change-failure risk -- worst case is reverting one `bind-key` line. ### VERDICT: APPROVED
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/session-reorder:feature/session-reorder
git switch feature/session-reorder

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature/session-reorder
git switch feature/session-reorder
git rebase main
git switch main
git merge --ff-only feature/session-reorder
git switch feature/session-reorder
git rebase main
git switch main
git merge --no-ff feature/session-reorder
git switch main
git merge --squash feature/session-reorder
git switch main
git merge --ff-only feature/session-reorder
git switch main
git merge feature/session-reorder
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/tmux-custom!10
No description provided.