Skip to content

refactor(mux): backend-neutral helper names + operator messages#142

Merged
pbean merged 3 commits into
mainfrom
feat/mux-helper-renames
Jul 14, 2026
Merged

refactor(mux): backend-neutral helper names + operator messages#142
pbean merged 3 commits into
mainfrom
feat/mux-helper-renames

Conversation

@pbean

@pbean pbean commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Important

Base retargeted to main, and this PR now also re-lands #141's commit (a3998f8). #141 was marked merged, but it merged into feat/herdr-tui-surface after #137 had already landed on main — so the seam-canonical-targets commit never actually reached main (git merge-base --is-ancestor a3998f8 origin/main fails). This branch sits directly on commits already in main, so the diff here is exactly the three missing commits: a3998f8 (#141) + fd03601 + 1390cad. No rebase or force-push was needed.

What

Pure naming/wording cleanup, split out of #141 so that PR's "zero existing assertions changed" property stays reviewable. Now that the seam has non-tmux backends, the seam-backed helpers and operator messages stop saying "tmux" when they mean "the selected multiplexer":

Helper renames (internal, no deprecation aliases — none of these are seam surface):

Old New
tui/launch.tmux_available() mux_available()
tui/app._tmux_missing() _mux_missing()
runs.tmux_sessions() mux_sessions()

Operator-facing strings (all verbatim copies moved together, including the tui-guide troubleshooting table):

  • LaunchError: tmux new-session/new-window failed: …multiplexer new-session/new-window failed: …; tmux not found on PATHmultiplexer backend unavailable (binary not on PATH)
  • TUI notify: tmux not found on PATH — launch/attach disabledmultiplexer backend unavailable — launch/attach disabled; launched (tmux session bmad-loop-ctl)launched (control session bmad-loop-ctl) (×4)
  • The two attach to tmux session bmad-loop-ctl hints (launch-progress widget, dashboard) → attach to control session bmad-loop-ctl
  • cli.py's bmad-loop mux fallback label keeps "tmux" — that IS the registry's documented bottom-fallback — now with a comment saying so.

Test churn is mechanical: the monkeypatch.setattr(launch, "tmux_available", …) lines (~36 in test_tui_app.py) and runs.tmux_sessions patches (~7 in test_runs.py) follow the rename; the two message-pin assertions (test_tui_launch.py, test_tui_app.py) pin the new wording; two test names updated to match (test_launch_without_mux_raises, test_attach_without_mux_notifies).

No behavior change beyond the message text.

Docs (second commit)

docs(mux): the operator-facing docs catch up with the seam having two backends.

  • New docs/multiplexer-backends.md — backend selection from the user's seat plus "what to expect on herdr": the one genuine gap (herdr detach is a keybinding with no CLI verb, so the mid-process return-detach hand-back stays attached until the parked window closes — press ctrl+b q; the post-exit return path is full fidelity) and a symptom / what-to-do table for the by-design degradations (polled logs, JSON-sidecar state, no last-client fallback, advisory geometry, lazy server autostart, duplicate labels).
  • README, setup guide, TUI guide, and FEATURES stop claiming tmux is the only backend and link the page; the TUI guide's three hard-coded ctrl-b d chords gain the herdr caveat; porting guide / adapter authoring guide / ROADMAP cross-link the operator view of the degradation ledger; CHANGELOG entry under Unreleased → Changed.

Heads-up for reviewers: the herdr-specific doc sections land here as-is, then move out-of-tree in the upcoming herdr-extraction PR (the backend is being extracted to a standalone adapter repo per core-team direction). Landing first keeps main consistent — herdr is still bundled at merge time.

Verification

  • Full suite green twice — with TMUX in the env and with env -u TMUX.
  • grep -rn "tmux_available\|_tmux_missing\|tmux_sessions" src/ tests/ docs/ → zero hits.
  • grep -rn "tmux not found\|tmux session bmad-loop-ctl\|(tmux session" src/ tests/ docs/ → only the herdr docstring's factual tmux-vs-herdr comparison remains.
  • Full trunk check clean.
  • Docs commit: grep -rn "only backend|only registered|one bundled|Once a second" README.md docs/ → no stale claims; all 9 files link the new page; full trunk check clean (prettier re-padded the FEATURES capability table).

Refs: #141 (re-lands its stranded a3998f8), #140.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@pbean, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2abb223-4df2-439f-9a4b-90f52ee630c4

📥 Commits

Reviewing files that changed from the base of the PR and between a3998f8 and 1390cad.

📒 Files selected for processing (19)
  • CHANGELOG.md
  • README.md
  • docs/FEATURES.md
  • docs/README.md
  • docs/ROADMAP.md
  • docs/adapter-authoring-guide.md
  • docs/multiplexer-backends.md
  • docs/porting-to-a-new-os.md
  • docs/setup-guide.md
  • docs/tui-guide.md
  • src/bmad_loop/cli.py
  • src/bmad_loop/runs.py
  • src/bmad_loop/tui/app.py
  • src/bmad_loop/tui/launch.py
  • src/bmad_loop/tui/screens/dashboard.py
  • src/bmad_loop/tui/widgets.py
  • tests/test_runs.py
  • tests/test_tui_app.py
  • tests/test_tui_launch.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/mux-helper-renames

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

pbean added 3 commits July 14, 2026 09:57
Core hand-assembled tmux-shaped =session[:window] strings in 10 places,
forcing every non-tmux backend to reverse-engineer tmux target syntax.
The grammar is now owned by the seam: a concrete, overridable
TerminalMultiplexer.target() encoder (default emits the same grammar,
byte-identical), a module-level parse_target() decoder for native-id
backends, and core formats every target via runs.session_target /
launch.ctl_target. herdr's _parse_target delegates its grammar split;
tmux backends keep passing tokens straight through. Zero existing test
assertions changed.
The seam has non-tmux backends now: launch.tmux_available ->
mux_available, app._tmux_missing -> _mux_missing, runs.tmux_sessions ->
mux_sessions (internal, no aliases), and the operator-facing strings
stop naming tmux when they mean the selected backend (LaunchError
wording, the TUI unavailable/launched notifications, the two
attach-to-bmad-loop-ctl hints, tui-guide troubleshooting table).
cli.py's mux fallback label keeps "tmux" — that IS the registry's
documented bottom-fallback — with a comment saying so. No behavior
change beyond message text.
New docs/multiplexer-backends.md — the user-facing view of the backend
seam: how selection works, and what changes from the operator's seat on
herdr. Chiefly: herdr has no CLI detach (keybinding only), so the
mid-process return-detach hand-back after answering an attached sweep
decision becomes a manual ctrl+b q; the post-exit return path is full
fidelity. The by-design degradations (polled logs, JSON-sidecar state,
no last-client fallback, advisory geometry, lazy server autostart,
duplicate labels) get a symptom/what-to-do table.

README, setup guide, TUI guide, and FEATURES stop claiming tmux is the
only backend and link the page; the TUI guide's three hard-coded
ctrl-b d chords gain the herdr caveat; the porter docs (porting guide,
adapter authoring guide, roadmap) cross-link the operator view of the
degradation ledger.
@pbean

pbean commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pbean pbean changed the base branch from feat/mux-target-contract to main July 14, 2026 19:43
@pbean pbean merged commit 25c221d into main Jul 14, 2026
9 of 17 checks passed
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.

1 participant