Skip to content

feat(session): support unfocused agent windows - #54

Closed
alectimison-maker wants to merge 1 commit into
Tencent:mainfrom
alectimison-maker:feat/session-no-focus
Closed

feat(session): support unfocused agent windows#54
alectimison-maker wants to merge 1 commit into
Tencent:mainfrom
alectimison-maker:feat/session-no-focus

Conversation

@alectimison-maker

Copy link
Copy Markdown
Contributor

Summary

  • add bsk session start --no-focus so Agent Windows can open without stealing focus
  • carry an optional focused value through the CLI, daemon, protocol, and extension
  • preserve the existing focused default when the field is omitted
  • document the flag and cover both default and unfocused behavior at each boundary

Closes #26.

Why

bsk session start currently hardcodes focused: true at the Chrome window boundary. That interrupts users who want an agent session to start while they continue working in another window.

The new flag is opt-in. Existing callers omit focused, and the extension continues to default it to true.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --locked
  • corepack pnpm lint
  • corepack pnpm --filter @browser-skill/extension compile
  • corepack pnpm --filter @browser-skill/extension test (44 files, 497 tests)
  • corepack pnpm --filter @browser-skill/extension build
  • node --test scripts/*.test.mjs

Compatibility

The protocol field is optional and omitted by default. Older clients therefore keep the current focused behavior, while --no-focus explicitly sends focused: false.

@BB-fat

BB-fat commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Closing as merged via #87 — we took over your design and reworked it onto current main so it composes with #52's window sizing: the focused flag now rides an options object (create(url, { size, focused }) / start(sessionId, { size, focused })) instead of the colliding positional slot. Everything else (flag name, default-true semantics, four-layer plumbing, docs) follows your original approach. Thank you @alectimison-maker! 🙏

本 PR 的内容已通过 #87(按新 main 重做、与 #52 窗口尺寸共存)合并进主干,故关闭。感谢贡献!

@BB-fat BB-fat closed this Aug 12, 2026
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.

Feature Request: Add --no-focus / --minimized flag to bsk session start to prevent Agent Window from stealing focus

2 participants