refactor(mux): backend-neutral helper names + operator messages#142
Conversation
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
5c197e7 to
a3998f8
Compare
0ba6089 to
1390cad
Compare
|
@CodeRabbit review |
✅ Action performedReview finished.
|
Important
Base retargeted to
main, and this PR now also re-lands #141's commit (a3998f8). #141 was marked merged, but it merged intofeat/herdr-tui-surfaceafter #137 had already landed on main — so the seam-canonical-targets commit never actually reachedmain(git merge-base --is-ancestor a3998f8 origin/mainfails). 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):
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 PATH→multiplexer backend unavailable (binary not on PATH)tmux not found on PATH — launch/attach disabled→multiplexer backend unavailable — launch/attach disabled;launched (tmux session bmad-loop-ctl)→launched (control session bmad-loop-ctl)(×4)attach to tmux session bmad-loop-ctlhints (launch-progress widget, dashboard) →attach to control session bmad-loop-ctlcli.py'sbmad-loop muxfallback 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 intest_tui_app.py) andruns.tmux_sessionspatches (~7 intest_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.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 — pressctrl+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).ctrl-b dchords 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
TMUXin the env and withenv -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.trunk checkclean.grep -rn "only backend|only registered|one bundled|Once a second" README.md docs/→ no stale claims; all 9 files link the new page; fulltrunk checkclean (prettier re-padded the FEATURES capability table).Refs: #141 (re-lands its stranded
a3998f8), #140.