fix: prevent browser target and focus surprises
- Respect the globally selected browser when renaming client aliases. - Pass the resolved local profile into sync and async local transports so BROWSER_CLI_PROFILE is honored consistently. - Stop tabs.active from explicitly focusing the OS browser window, avoiding virtual-desktop jumps during tab activation. - Make window merging skip audible, unmuted windows so video playback windows are not selected as merge targets. - Bump the Python package and extension manifest versions to 0.12.2. - Add regression coverage for browser selection and focus-stealing behavior.
This commit is contained in:
@@ -159,11 +159,14 @@ def _print_clients(all_clients: list) -> None:
|
||||
help="Browser profile alias to rename. Overrides the global --browser option for this command.",
|
||||
)
|
||||
@click.argument("alias")
|
||||
def cmd_clients_rename(target_browser, alias):
|
||||
@click.pass_context
|
||||
def cmd_clients_rename(ctx, target_browser, alias):
|
||||
"""Set the profile alias used to identify this browser instance."""
|
||||
root_obj = ctx.find_root().obj or {}
|
||||
selected_browser = target_browser or root_obj.get("browser")
|
||||
try:
|
||||
_ensure_unique_browser_alias(alias, target_browser)
|
||||
send_command("clients.rename_profile", {"alias": alias}, profile=target_browser)
|
||||
_ensure_unique_browser_alias(alias, selected_browser)
|
||||
send_command("clients.rename_profile", {"alias": alias}, profile=selected_browser)
|
||||
except BrowserNotConnected as e:
|
||||
console.print(f"[red]Error:[/red] {e}")
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user