A late poll answer no longer overwrites a newer one on a session page (#932) #933
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/session-stale-poll"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #932.
J5 failed on #926's CI: after Withdraw, The recording still read "Approved" (desktop,
j5-after-the-session.spec.js:402). The phone and keyboard failures after it were a cascade, because the projects share one database.Cause.
useAsync.runkeeps an overtaken answer out of its own state but still returns it, anduseSessionDatadrew whatever came back. The review page polls the session every 15 s while the wiki run is going, and that run starts at approval. So a poll that left before the withdrawal and landed after the page's refresh put the approved session back until the next poll. This is a real bug: any GM action during a poll could be visually undone for up to 15 s.Fix.
useSessionDatacounts its reads, and only the newest may draw the page.Tests
useSessionData.test.jsxreproduces the race. It fails without the fix ("expected true to be false") and passes with it.src/pages/session: 455 pass; eslint is clean.Changelog:
changelog.d/932-session-stale-poll.fixed.md.🤖 Generated with Claude Code