Ignore stale playLoomTurn responses after restarting or switching episodes in LoomPlayPanel
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, react
- 領域
- frontend
調査の方向性
Start in client/src/components/fableloom/LoomPlayPanel.jsx, where runTurn awaits playLoomTurn and then sets scene, playbackPhase and transcript, and where restart() is wired to the useEffect keyed on start. Read how restart() resets state, then add a generation ref that restart() bumps and that runTurn checks after the await. Done when a late playLoomTurn response after Restart or an episode switch leaves scene and transcript untouched, proven by a new test in LoomPlayPanel.test.jsx.
索引モデルが issue の本文から書いたものです。
説明
Slice audited: FableLoom (client/src/pages/FableLoom*.jsx, client/src/components/fableloom, server/routes/fableLoom.js, server/services/fableLoom, server/sockets/fableLoomHosted.js)
Date: 2026-11-26
Scope: small
Problem
In client/src/components/fableloom/LoomPlayPanel.jsx:281-289, 296, 306-334, runTurn awaits playLoomTurn(...) and unconditionally calls setScene(result.node), setPlaybackPhase(...), and setTranscript((prev) => [...prev, ...additions]) without checking whether the session was restarted or switched to another episode while the request was in flight.
This race is directly reachable:
- On an automatic-cut scene, the Restart button (
LoomPlayPanel.jsx:697-703) remains enabled whilesendingistrue, so clicking Restart during an in-flightplayLoomTurnresets the panel to the opening scene and then the late response jumpssceneback to the pre-restart destination and appends stale transcript entries. - Switching episodes (
initialEpisode.idchanging while a slow free-text LLM turn is in flight) triggersrestart()viauseEffect(..., [start])(LoomPlayPanel.jsx:296), and the stale turn response from the previous episode overwrites the new episode's opening scene and transcript.
Impact
Late playLoomTurn responses corrupt the restarted or newly opened episode's scene state and transcript in LoomPlayPanel.
Fix
In client/src/components/fableloom/LoomPlayPanel.jsx:
- Add a
sessionGenerationRef = useRef(0)that increments inrestart(). - Capture
const generation = sessionGenerationRef.currentbeforeawait playLoomTurn(...)inrunTurn, and return early without mutatingscene,playbackPhase,activeHoldIndex,pendingTransition, ortranscriptifsessionGenerationRef.current !== generation. - Add a regression test in
client/src/components/fableloom/LoomPlayPanel.test.jsxverifying that aplayLoomTurnresolving after clicking Restart (or switching episodes) does not overwrite the reset scene or append to the reset transcript.
Acceptance criteria
- Clicking Restart while a
playLoomTurnrequest is in flight ignores the stale response when it resolves. - Switching episodes while a
playLoomTurnrequest is in flight ignores the stale response from the previous episode. - Regression test in
client/src/components/fableloom/LoomPlayPanel.test.jsxcovers this race and passes.
- 主要言語
- JavaScript
- スター
- 38
- フォーク
- 32
- 平均マージ
- 14分
- マージ済み PR(30日)
- 995
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
atomantic/PortOS のほかの issue
-
area:testing bug effort:low model:light plan planner:gpt-6-2-sol tests
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
effort:low model:light performance performance-efficiency plan planner:gemini-4-neon source:performance-efficiency
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
area:media effort:medium model:medium performance performance-efficiency plan planner:gemini-4-neon source:performance-efficiency
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Eliminate O(N×L) live-metadata JSON.stringify and sequential full-archive scans in cosAgentStorageオープンarea:cos-agents effort:medium model:medium performance performance-efficiency plan planner:gemini-4-neon source:performance-efficiency
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
data-integrity-safety data-safety effort:low model:light plan planner:gemini-4-neon source:data-integrity-safety
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
atomantic/PortOS の issue をすべて見る
似ている issue
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Agent360dk/browser-mcp#124 ·
メンテナーはふだん 2 日以内に返信
-
area:site feature good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
pacocartones/free-llm-api-hub#829 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
Jason-Vaughan/TangleClaw#3270 ·
メンテナーはふだん 1 日以内に返信
-
Range with start greater than end crashes the server process (bytes=100-50)対応中かも @draarivpatel-ui が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100