Skip to content

fix: release launcher listeners per launch and cut 0.1.9 - #15

Merged
TheStreamCode merged 2 commits into
mainfrom
fix/launch-session-lifecycle
Aug 2, 2026
Merged

TheStreamCode merged 2 commits into
mainfrom
fix/launch-session-lifecycle

Conversation

@TheStreamCode

Copy link
Copy Markdown
Owner

Summary

  • Fixes an unbounded growth of context.subscriptions: every launch pushed its shell-integration listener, its fallback timer, and its shell-execution listener onto the extension subscription list, which VS Code only drains on deactivation. Each launch now owns a disposal scope (createLaunchSession) that ends when the command finishes, when the sendText fallback runs, or when its terminal closes. deactivate drains whatever is left, and only activate registers on context.subscriptions.
  • Fixes a leaked onDidEndTerminalShellExecution listener: it was never disposed when a terminal closed before its command finished, so it stayed live for the rest of the session.
  • Stops reading terminal shell output for custom CLI commands. Output was buffered on every launch even though only the Codex missing-CLI check consumes it, which did not match the trust boundary documented in docs/architecture.md or the 0.1.8 changelog entry.
  • Removes the unused scripts/generate-icon.js placeholder generator and its generate:icon script. Nothing referenced it, and running it overwrote the published media/icon.png (23,173 bytes, hand-authored) with a different 1,955-byte placeholder. Verified by running the script against a scratch directory and comparing hashes; the published artwork is untouched by this PR.
  • Releases 0.1.9 and rewrites AGENTS.md with the stack, real commands, launch lifecycle, protected assets, compatibility rules, and validation criteria.

No behavior visible to users changes: the same terminal is created, the same command is sent, and the missing-Codex documentation prompt still fires on the same conditions.

Related Issue

No linked issue.

Validation

  • npm run check — 39 unit tests pass, VS Code 1.103.0 integration smoke test exits 0, vsce ls lists 12 files
  • npm run audit — 0 vulnerabilities
  • Packaged VSIX inspected — vscode-codex-cli-launcher-0.1.9.vsix, 14 entries, 63.25 KB; no sources, tests, AGENTS.md, workflows, lockfile, or source maps
  • Installed the VSIX into an isolated --extensions-dir / --user-data-dir profile; --list-extensions --show-versions reports mikesoft.vscode-codex-cli-launcher@0.1.9

Checklist

  • Tests cover new or changed behavior — 4 unit tests for the disposal scope plus 3 source-level lifecycle invariants in test/extension-lifecycle.test.js
  • User-facing behavior is documented — no user-facing behavior changed; docs/architecture.md gains a launch lifecycle section
  • CHANGELOG.md is updated
  • Workspace trust, command scope, telemetry, and installer restrictions remain intact
  • No generated files, secrets, or unrelated changes are included

Screenshots or Notes

No UI change, so no screenshots apply.

Known issues left untouched:

  • media/launcher-mark.svg is 51.7 KB and embeds two base64 PNGs at 256 px, which is 82% of the VSIX payload for an icon that renders at toolbar size. Not changed here because it is published artwork; worth a separate design pass.
  • The repository has no GitHub Actions secret and no local VSCE_PAT / OVSX_PAT, so publishing to the Marketplace and Open VSX remains a manual maintainer step after this merges.

🤖 Generated with Claude Code

TheStreamCode and others added 2 commits August 1, 2026 22:21
Every launch pushed its shell-integration listener, its fallback timer, and
its shell-execution listener onto context.subscriptions. VS Code only drains
that array on deactivation, so repeated launches grew it without bound and
the shell-execution listener stayed registered whenever a terminal closed
before its command finished.

Each launch now owns a disposal scope created by createLaunchSession. The
scope ends when the command finishes, when the fallback sendText path runs,
or when its terminal closes, and deactivate drains whatever is left. Only
activate registers on context.subscriptions.

Terminal output is no longer read for custom CLI commands. It was buffered
on every launch even though only the Codex missing-CLI check consumes it,
which did not match the documented trust boundary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drops the unused scripts/generate-icon.js placeholder generator and its
generate:icon script. Nothing referenced it and running it overwrote the
published media/icon.png with a different placeholder image. The published
artwork itself is unchanged.

Synchronizes the version across package.json, package-lock.json,
CITATION.cff, README.md, and the metadata test, and records the release in
CHANGELOG.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@TheStreamCode
TheStreamCode merged commit cbba94b into main Aug 2, 2026
6 checks passed
@TheStreamCode
TheStreamCode deleted the fix/launch-session-lifecycle branch August 2, 2026 09:54
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