Composer terminal disposal remains reachable at four unguarded overlay open paths
Follow-up of #4604 / PR #4605. PR #4605 fixes the terminal-disposal defect at the five highest-traffic overlay paths (command palette / model selector / queued-message selector open and restore paths, plus pet-aware restores). Boundary review of that PR confirmed four pre-existing sibling paths with the identical bug still open on dev (27afb732b3):
| Path |
Reachable via |
Site |
| Jobs overlay open |
default alt+j keybinding, /monitors (also reachable from the command palette itself) |
packages/coding-agent/src/modes/controllers/selector-controller.ts showJobsOverlay (~:3669) |
| Tasks pane open |
default alt+t keybinding |
selector-controller.ts showTasksPane (~:3699) |
| OAuth API-key paste login |
API-key login for ~20 providers (packages/ai/src/utils/oauth/*) |
selector-controller.ts onPrompt code input (~:3168) |
/debug log + raw-SSE viewers |
/debug |
packages/coding-agent/src/debug/index.ts (~:348, :367) |
Mechanism (identical to #4604): these opens call ctx.editorContainer.clear() while the live reusable CustomEditor is still attached. Container.clear() disposes children terminally, Editor.dispose() unregisters the tab-width change listener, and every later restore re-mounts a dead editor — runtime tab-width changes stop re-deriving composer layout after the first overlay round-trip. The close-path clears at ~:3163, ~:3657, ~:3685 self-heal once their opens detach.
Fix shape (same two lines per site): this.ctx.editorContainer.detachChild(this.ctx.editor); immediately before the open-path clear(), exactly as showSelector (:1344) and extension-ui-controller.ts (:1178) already do.
Not a regression from #4605 — all four sites predate it on the base commit; filed so the remaining surface is not lost. Regression coverage pattern to copy: the 4-cycle invalidation-count probe with red control in packages/coding-agent/test/gajae-pet-widget.test.ts and the repeated palette-cycle test in packages/coding-agent/test/command-palette-interactive-host.test.ts.
[repo owner's gaebal-gajae (clawdbot) 🦞]
Composer terminal disposal remains reachable at four unguarded overlay open paths
Follow-up of #4604 / PR #4605. PR #4605 fixes the terminal-disposal defect at the five highest-traffic overlay paths (command palette / model selector / queued-message selector open and restore paths, plus pet-aware restores). Boundary review of that PR confirmed four pre-existing sibling paths with the identical bug still open on
dev(27afb732b3):alt+jkeybinding,/monitors(also reachable from the command palette itself)packages/coding-agent/src/modes/controllers/selector-controller.tsshowJobsOverlay(~:3669)alt+tkeybindingselector-controller.tsshowTasksPane(~:3699)packages/ai/src/utils/oauth/*)selector-controller.tsonPromptcode input (~:3168)/debuglog + raw-SSE viewers/debugpackages/coding-agent/src/debug/index.ts(~:348, :367)Mechanism (identical to #4604): these opens call
ctx.editorContainer.clear()while the live reusableCustomEditoris still attached.Container.clear()disposes children terminally,Editor.dispose()unregisters the tab-width change listener, and every later restore re-mounts a dead editor — runtime tab-width changes stop re-deriving composer layout after the first overlay round-trip. The close-path clears at ~:3163, ~:3657, ~:3685 self-heal once their opens detach.Fix shape (same two lines per site):
this.ctx.editorContainer.detachChild(this.ctx.editor);immediately before the open-pathclear(), exactly asshowSelector(:1344) and:1178) already do.extension-ui-controller.ts(Not a regression from #4605 — all four sites predate it on the base commit; filed so the remaining surface is not lost. Regression coverage pattern to copy: the 4-cycle invalidation-count probe with red control in
packages/coding-agent/test/gajae-pet-widget.test.tsand the repeated palette-cycle test inpackages/coding-agent/test/command-palette-interactive-host.test.ts.[repo owner's gaebal-gajae (clawdbot) 🦞]