Stop destroys canvas extension providers and leaves open iframe on a dead loopback URL
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Short summary
When a canvas sends a prompt using `session.send()`, clicking **Stop** destroys the entire Copilot session and terminates its extension providers. The canvas iframe remains open but still points to the terminated provider's loopback URL. This leaves the canvas permanently disconnected until it is manually reopened.
### Affected version or release
v1.0.69
### Installation context
This happens with a project-scoped canvas extension under .github/extensions/ in a local project session. The canvas uses the documented SDK pattern of serving its UI and API from a per-instance 127.0.0.1 server.
### Steps to reproduce
1. Open a project-scoped extension canvas.
2. Click a canvas control that POSTs to the extension backend, which calls `session.send()`.
3. While Copilot is responding, click **Stop**.
4. Click the canvas control again or load another server-backed section.
### Current behavior
- The second request fails because the loopback server no longer exists.
- Server-backed sections remain at “Reconnecting to canvas…” indefinitely.
- The open iframe is never given a replacement URL.
- The user must close and reopen the canvas to recover.
### Expected behavior
Stopping an active response should abort only the current turn. The session, extension providers, and open canvases should remain usable.
A subsequent `session.send()` from the canvas should work normally.
### Additional context
The Stop operation produces this lifecycle:
```text
2026-07-10T05:15:00.910Z abort
2026-07-10T05:15:00.939Z Received session.destroy request
2026-07-10T05:15:01.730Z Stopping extension: ...foundry-agent-canvas/extension.mjs
2026-07-10T05:15:01.754Z Extension exited: ...foundry-agent-canvas/extension.mjs
(code=null, signal=SIGTERM)
贡献指南
调研方向
Trace the Stop path from the recorded `abort` and `session.destroy` lifecycle, then follow the extension provider shutdown shown for `extension.mjs` and the open canvas iframe. Reproduce with the project-scoped extension under `.github/extensions/` using `session.send()`. Done means Stop aborts only the current turn, the provider and iframe remain usable, and a later canvas request succeeds.
由索引模型根据 Issue 内容生成。
评估
- 领域
- api, desktop
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100