ai-harness: view.dispose() doesn't cancel snapshot, transcript or describe requests
Maintainer thường phản hồi trong vòng 1 ngày
@AlemTuzlak đang làm issue này rồi.
Từ ngày 1/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
What happens
With @tanstack/ai-harness 0.1.1, view.dispose() aborts only the events stream. Requests the view starts on its own (the snapshot it reloads after a turn ends, and transcript() and describe()) keep running after dispose(), and the view can't cancel them.
We see this in tests that open a view against a real Fastify server, ask one question, dispose the view, then close the server. In about half the runs, the snapshot refresh that follows the turn's end is still in flight when app.close() starts. Its keep-alive connection survives the close, and app.close() waits until the keep-alive timeout runs out, so the test times out. The last request the server got before the hang is always GET .../snapshot.
Expected
dispose() cancels every request the view started. A disposed view leaves no request open.
Why
SessionViewSourcepasses asignalonly toevents.snapshot,transcriptanddescribetake no options (src/view/index.ts, around line 195).refreshSnapshot,reloadandreadycallsource.snapshot()/source.transcript()without a signal (around lines 914, 987 and 1184), andrefreshSnapshotruns after events that change the snapshot (line 1101).dispose()setsdisposedand callsreader.abort()(line 1346). Thedisposedchecks drop the results of the other requests, but the requests themselves keep going.- In the client,
read()(src/client.ts, line 691) has no signal to pass on either.
Checked on main at 3ce3085.
Workaround
In our test server's close, we call server.closeAllConnections() right after starting app.close().
- Ngôn ngữ chính
- TypeScript
- Star
- 3.3k
- Fork
- 378
- Merge trung bình
- 1 ngày 1 phút
- Pull request đã merge (30 ngày)
- 208
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/ai
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'Có thể đã có người làm @tombeckenham đã nhận 4 ngày trước. Đang mởhas-pr waiting-on: maintainer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
TanStack/ai#1916 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
openai-base: leaving a Responses stream at `response.completed` aborts its request, so complete calls are logged as client-closed (499)Có thể đã có người làm @AlemTuzlak đã nhận hôm nay. Đang mởhas-pr waiting-on: maintainer
TanStack/ai#1965 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
StreamProcessor folds long text and tool-call streams in quadratic memory and timeCó thể đã có người làm @jherr đã nhận 1 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1963 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-anthropic: 400 on signed thinking blocks after compaction rewrites history (missing block_binding drop_block)Có thể đã có người làm @tombeckenham đã nhận 2 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1959 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Chat UI: a fallback widget for tool calls whose names aren't known when the kit is createdCó thể đã có người làm @AlemTuzlak đã nhận 3 ngày trước. Đang mởwaiting-on: maintainer
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 58/100
TanStack/ai#1953 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Remove unused dependenciesCó thể đã có người làm @alastair-smith đã nhận hôm nay. Đang mởchore other
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alastair-smith/card-games#384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
code-yeongyu/senpi#5571 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nexu-io/open-design#9262 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
friction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kentcdodds/kody#4753 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
lingdojo/kana-dojo#33508 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày