ai-harness: view.dispose() doesn't cancel snapshot, transcript or describe requests
メンテナーはふだん 1 日以内に返信
@AlemTuzlak がすでに取り組んでいます。
2026年11月1日 から。
評価
この issue はまだ評価されていません。
説明
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().
- 主要言語
- TypeScript
- スター
- 3.3k
- フォーク
- 378
- 平均マージ
- 1日 1分
- マージ済み PR(30日)
- 208
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/ai のほかの issue
-
openai-base: a Responses max_output_tokens cutoff ends as RUN_ERROR without usage instead of finishReason 'length'対応中かも @tombeckenham が 4 日前に担当しました。 オープンhas-pr waiting-on: maintainer
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
TanStack/ai#1916 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
openai-base: leaving a Responses stream at `response.completed` aborts its request, so complete calls are logged as client-closed (499)対応中かも @AlemTuzlak が 1 日前に担当しました。 オープンhas-pr waiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
StreamProcessor folds long text and tool-call streams in quadratic memory and time対応中かも @jherr が 1 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
ai-anthropic: 400 on signed thinking blocks after compaction rewrites history (missing block_binding drop_block)対応中かも @tombeckenham が 2 日前に担当しました。 オープンwaiting-on: maintainer
メンテナーはふだん 1 日以内に返信
-
Chat UI: a fallback widget for tool calls whose names aren't known when the kit is created対応中かも @AlemTuzlak が 3 日前に担当しました。 オープンwaiting-on: maintainer
難易度 4/5 1〜2日 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
LucasSantana-Dev/Lucky#2951 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2567 ·
メンテナーはふだん 9 日以内に返信
-
refactor(react-pi): classify base64 images with core's parseBase64対応中かも @jimmyallinai が今日担当しました。 オープンmaintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
assistant-ui/assistant-ui#10293 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
brijeshb42/monaco-vim#175 ·