Workspace(feat[runtime]): Add pane title and synchronization keys#1047
Workspace(feat[runtime]): Add pane title and synchronization keys#1047tony wants to merge 14 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1047 +/- ##
==========================================
+ Coverage 81.98% 82.50% +0.51%
==========================================
Files 28 28
Lines 2548 2652 +104
Branches 485 516 +31
==========================================
+ Hits 2089 2188 +99
- Misses 328 330 +2
- Partials 131 134 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f031d96 to
99fbb1b
Compare
why: Expose the core tmux runtime primitives needed for parity before layering importer translations on top. what: - Normalize synchronize, shell_command_after, clear, and pane title config keys in the loader - Apply after-commands and clear before options_after so synchronized panes do not duplicate commands
why: Pin the loader desugaring and builder behavior for the new runtime config keys. what: - Builder integration tests for synchronize, shell_command_after, clear, and pane titles - Loader expand tests for key normalization and defaults
why: Give users working references for the new runtime config keys. what: - Top-level configuration sections for pane titles, synchronize, shell_command_after, and clear - Example workspace files for pane titles and synchronize shorthand
why: Preserve tmuxp's default shell history suppression for post-build window commands. what: - Pass the window suppress_history setting to shell_command_after and clear send_keys calls
why: Pin default and explicit shell history suppression for shell_command_after and clear. what: - Parametrized builder coverage for default-on, explicit-off, and explicit-on suppress_history with post-build commands
99fbb1b to
61a6df4
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
…ion warning why: The warning carried no structured fields, forcing the test to match message substrings against the logging standards. what: - Add tmux_session extra to the invalid pane_title_position warning - Assert the warning via schema fields instead of message text
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
why: Document the runtime config deliverables for the upcoming release: native pane labeling and the synchronize, shell_command_after, and clear window keys. what: - Add What's new deliverable entries below the unreleased placeholder - Cross-reference the top-level configuration docs
…fter why: expand_cmd normalizes after-commands into the same mappings as shell_command, but the post-build fan-out sent only the command text — enter: false and sleep_before/sleep_after were silently dropped, unlike regular pane commands using identical syntax. what: - Read enter and sleep options per command in config_after_window; sleeps run once per command wave, not once per pane - Spy-based tests pinning enter propagation and per-wave sleep counts - Document the mapping form in the shell_command_after section
why: An explicit title: "" was silently dropped by a truthiness check, and forwarding it would no-op anyway — tmux discards select-pane -T "" entirely. Users blanking a label deserve a signal instead of silence. what: - Warn with pane context when title is explicitly empty; non-empty titles apply as before - Cover the warning via schema-field assertions in the pane title test - Document the tmux limitation and the single-space workaround
… synchronized why: With synchronize-panes already on (synchronize: before/true or an explicit option), the fan-out sent to every pane while tmux also mirrored each send — shell_command_after and clear ran once per pane per send. The options_after ordering only protects synchronize: after. what: - Read the live synchronize-panes state and send to a single pane when on, letting tmux broadcast - Generalize the once-per-pane test across after, before, true, and explicit-option modes
why: synchronize-panes broadcasts tmux input whenever it is active, so applying it before tmuxp sends setup or post-build commands can duplicate commands across panes. what: - Normalize synchronize as a final window state instead of an active setup mode - Keep synchronize-panes disabled while tmuxp sends pane setup, clear, and shell_command_after keys - Restore explicit, inherited, and plugin-set final synchronization states after command fan-out - Cover shorthand, raw option, inherited global, plugin, and invalid-value cases
why: Lower-level callers can use iter_create_windows() directly and expect raw window options to apply immediately. Deferring synchronize-panes unconditionally made that option a no-op outside the high-level build flow. what: - Apply synchronize-panes in direct iter_create_windows() calls by default - Let build() opt into deferring synchronize-panes until the safe restore phase - Add iterator-level coverage for raw synchronize-panes on/off options
why: synchronize-panes was replayed from parsed config after on_window_create, unlike ordinary window options. That erased plugin changes on configured windows and made the temporary synchronization guard own final state. what: - Apply initial synchronize settings as live window state before on_window_create - Restore captured live sync state after tmuxp-owned key fan-out unless options_after supplies the late value - Cover on_window_create, options_after, and after_window_finished precedence for synchronize-panes
why: Window setup temporarily disables tmux pane synchronization so pane setup commands do not broadcast across panes. If pane creation or layout application fails, that temporary state must still be restored so partial windows and existing/global tmux state are not left with an unintended local override. what: - Restore synchronize-panes from a build-level finally block when pane setup aborts - Preserve and restore pane-local synchronize-panes overrides while setup is isolated - Cover raw options, inherited global state, options_after, and plugin-set synchronization state in regression tests
|
Is this generated by/with the help of AI? |
|
@piotr-dobrogost Yes, and it's split off of #1025. |
|
There is an AGENTS.md, claude config, and comments in here will shout when Claude reviews. I'm steering it with claude and codex ATM. This particular PR may just need to have |
Well, looking at #1025 I do not see information that was generated by AI either. I see |
|
I'm all aboard to note AI usage in tmuxp (or any of my projects). It's somewhat obvious from the root of the project, we have AGENTS.md and serveral other configuration files. To give Anthropic / OpenAI / Cursor / etc. free marketing in commit messages, not so much. Will continue to monitor the norms / best practices around ettiquete regarding gen ai in open source projects. If you find any, link them up. |
Tagging something with the name of AI that generated changes seems like such an obvious thing to do, I have taken it for granted without even reading up on it. I'm surprised by the idea that it might be treated as "free marketing." Also, you are OK with code reviews tagged by the name of AI but not the pull itself – that's even more bizarre. Take a look at tomerfiliba/plumbum#812, which is clearly tagged |
Summary
Split from the parity recut work to keep the runtime config surface reviewable.
synchronize,shell_command_after,clear, and pane title config handlingshell_command_afterandclearrun beforeoptions_after, sosynchronize: afterdoes not duplicate commandsVerification
Ran before commit:
$ rm -rf docs/_build; uv run ruff check . --fix --show-fixes; uv run ruff format .; uv run mypy; uv run py.test --reruns 0 -vvv; just build-docs;Result: ruff clean, format unchanged, mypy clean, pytest
815 passed, 2 skipped, docs built successfully.Stack: base PR for lifecycle hooks and importer fallback follow-ups.