Skip to content

fix: a withdrawn resolve reopens its thread in the press that takes it - #4327

Merged
max-sixty merged 3 commits into
mainfrom
undo-returns-to-place
Oct 27, 2026
Merged

max-sixty merged 3 commits into
mainfrom
undo-returns-to-place

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Undoing a resolve left the thread closed until the server's reading arrived. The browser's thread fold (foldThreads) dropped withdrawn messages but kept a closure whose event was being withdrawn, and a margin draws no card for a closed thread. So z's return to the thread (#4303) had to wait for the log's answer; returning sooner fell back to the floating panel.

The fold now treats a thread whose closing event the tab is withdrawing as open, as localTodos already does for a to-do whose Done is withdrawn; the log's answer restores any earlier closure. Undo's return no longer waits for the answer: it shows the thread once the page presents the withdrawal.

Behavior change: after z on a resolve, the thread stands open (its margin card, the panel's Open list) before the server answers.

Evidence: a leaf-dev probe journey holding the undo POST: with the change, the margin card opens and takes focus while the request is pending; without the fold change, the same return opens the floating panel. Panel, margin and refusal journeys from #4303 still land on the thread in Chromium and Firefox. The new assertion in tests/runtime/thread-workflow.test.mjs fails without the fix. pnpm run check, pnpm run test:runtime (668) and 71 targeted undo/resolve browser tests pass.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 26, 2026 20:00
Undoing a resolve left the thread closed until the server's reading arrived,
because the thread fold dropped withdrawn messages but kept a closure whose
event was withdrawn. A margin draws no card for a closed thread, so undo's
return to the thread waited for the log's answer, and returning sooner fell
back to the floating panel.

The fold now treats a thread whose closing event the tab is withdrawing as open,
as `localTodos` already does for a to-do whose Done is withdrawn; the log's
answer restores any earlier closure. Undo's return no longer waits for the
answer: it shows the thread once the page presents the withdrawal.

Behavior change: after `z` on a resolve, the thread stands open (its margin
card, the panel's Open list) before the server answers. Probed with the undo
POST held: the margin card opens and takes focus while the request is pending;
without the fold change the same return opens the floating panel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 27, 2026
@max-sixty
max-sixty merged commit a5e9be1 into main Oct 27, 2026
4 checks passed
@max-sixty
max-sixty deleted the undo-returns-to-place branch October 27, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants