github / github/app

Stop destroys canvas extension providers and leaves open iframe on a dead loopback URL

Đang mở
#1,844 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Bugs
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
api, desktop
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.