Skip to content

feat: auto-close adapter windows, add OPENCLI_WINDOW_FOCUSED, document config#915

Merged
jackwener merged 2 commits intomainfrom
feat/window-management-improvements
Apr 9, 2026
Merged

feat: auto-close adapter windows, add OPENCLI_WINDOW_FOCUSED, document config#915
jackwener merged 2 commits intomainfrom
feat/window-management-improvements

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

  • Adapter commands now close the automation window immediately on completion instead of waiting 30s idle timeout
  • Added OPENCLI_WINDOW_FOCUSED env var — set to 1 to open automation windows in the foreground (debug mode)
  • Added Configuration section to README (EN/ZH) and opencli-usage skill listing all stable env vars

Changes

  • src/execution.ts: Call page.closeWindow() after adapter command succeeds
  • src/daemon.ts: Read OPENCLI_WINDOW_FOCUSED and inject into command payloads
  • extension/src/protocol.ts: Add windowFocused field to Command interface
  • extension/src/background.ts: Use windowFocused flag for chrome.windows.create({ focused })
  • README.md, README.zh-CN.md, skills/opencli-usage/SKILL.md: Add Configuration table

Test plan

  • npm run typecheck passes
  • npm test passes (581 passed, 2 skipped)
  • Verify adapter command closes window immediately after completion
  • Verify OPENCLI_WINDOW_FOCUSED=1 opens window in foreground

…t config

1. Adapter commands now close the automation window immediately after
   completion instead of waiting for the 30s idle timeout.

2. OPENCLI_WINDOW_FOCUSED=1 opens automation windows in the foreground
   (useful for debugging). Default remains background.

3. Add Configuration section to README (EN/ZH) and opencli-usage skill
   listing all stable user-facing environment variables.
…artup

Move env var read from daemon (startup-time constant) to CLI side
(sendCommandRaw), so it works correctly with the persistent daemon model.
Each request now reads the env var fresh and includes windowFocused in
the command payload.
@jackwener jackwener merged commit 2ddf571 into main Apr 9, 2026
14 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