refactor(env): remove OPENCLI_KEEP_TAB#1509
Merged
Merged
Conversation
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drop the
OPENCLI_KEEP_TABenv override. It was a debugging shortcut, not a config dimension —--keep-tab true|falsecovers the ad-hoc case andsiteSession: '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.ts—resolveKeepTab()drops the env fallback.--keep-tabis the only user override.src/execution.test.ts— two regression tests rewritten to useexecuteCommand(cmd, {}, false, { keepTab: 'true' })signature instead of env.README.md/README.zh-CN.md/skills/opencli-usage/SKILL.md— drop env table row.--keep-tabdocs preserved.CHANGELOG.md— BREAKING entry under Unreleased.Historical 1.7.15 changelog references stay (not retroactively edited).
Test plan
npx tsc --noEmitpassnpx vitest run --project unit --project extension→ 1144/1145 pass (1 unrelated skip)npm run check:typed-error-lintbaseline 189npm run check:silent-column-dropbaseline 103OPENCLI_KEEP_TABzero outside historical 1.7.15 changelog