Skip to content

refactor(env): remove OPENCLI_KEEP_TAB#1509

Merged
jackwener merged 1 commit into
mainfrom
refactor/drop-opencli-keep-tab-env
May 12, 2026
Merged

refactor(env): remove OPENCLI_KEEP_TAB#1509
jackwener merged 1 commit into
mainfrom
refactor/drop-opencli-keep-tab-env

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

Drop the OPENCLI_KEEP_TAB env override. It was a debugging shortcut, not a config dimension — --keep-tab true|false covers the ad-hoc case and siteSession: 'persistent' is the proper hard-constraint mechanism for persistent site tabs. The env leaked process state across every browser command in the shell.

Changes

  • src/execution.tsresolveKeepTab() drops the env fallback. --keep-tab is the only user override.
  • src/execution.test.ts — two regression tests rewritten to use executeCommand(cmd, {}, false, { keepTab: 'true' }) signature instead of env.
  • README.md / README.zh-CN.md / skills/opencli-usage/SKILL.md — drop env table row. --keep-tab docs preserved.
  • CHANGELOG.md — BREAKING entry under Unreleased.

Historical 1.7.15 changelog references stay (not retroactively edited).

Test plan

  • npx tsc --noEmit pass
  • npx vitest run --project unit --project extension → 1144/1145 pass (1 unrelated skip)
  • npm run check:typed-error-lint baseline 189
  • npm run check:silent-column-drop baseline 103
  • grep OPENCLI_KEEP_TAB zero outside historical 1.7.15 changelog

`OPENCLI_KEEP_TAB` was a debugging shortcut, not a config dimension. It
let users override `--keep-tab` globally via the shell environment,
which contradicts the per-command lifecycle model: `siteSession:'persistent'`
already pins persistent site tabs as a hard adapter-metadata constraint,
and `--keep-tab true|false` covers the ad-hoc override case. The env
just leaked process state across every browser command in the shell.

Changes:
  - src/execution.ts: `resolveKeepTab()` drops the
    `normalizeBooleanOption('OPENCLI_KEEP_TAB', process.env.OPENCLI_KEEP_TAB)`
    fallback. `--keep-tab` is now the single user override.
  - src/execution.test.ts: two regression tests rewritten to use the
    `executeCommand(cmd, {}, false, { keepTab: 'true' })` signature
    instead of the env. Logic and assertions unchanged.
  - README.md / README.zh-CN.md / skills/opencli-usage/SKILL.md:
    drop the env table row. `--keep-tab` documentation stays.
  - CHANGELOG.md: BREAKING entry under Unreleased.

Note: the 1.7.15 CHANGELOG entry still references the env historically;
that's intentional, historical entries are not retroactively edited.

Verification:
  - npx tsc --noEmit pass
  - npx vitest run --project unit --project extension → 1144/1145 pass
    (1 unrelated skip)
  - typed-error-lint baseline 189
  - silent-column-drop baseline 103
@jackwener jackwener merged commit 587750c into main May 12, 2026
13 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