fix: make revert boundaries chronological - #42461
Conversation
|
Good catch — comparing message IDs lexically ( One behavior change worth a closer look:
LGTM modulo the not-found edge case above. |
|
|
I tested the missing-message case mentioned above. It still causes problems on current OpenCode loads long conversations a page at a time. If the message selected for undo is on an older page that has not loaded yet, the App and TUI can keep showing messages that the undo should hide. Pressing undo again can also fail when the selected message is the first message on the current page. OpenCode needs the message before it, but that message is still on the previous page. I added tests and fixes on Would you prefer that I separate this message-loading fix and add it to |
(cherry picked from commit 1c583da)
Serialize per-session revert and admission changes, commit staged reverts atomically with their replacement admission, preserve queued work across reverts, and compare undo boundaries chronologically instead of by message ID. Plugin activation completes before session changes are blocked so plugin setup can still admit its own input. Includes the anomalyco#42461 boundary fix; supersedes that PR. Closes anomalyco#37751. Continues the approach from anomalyco#37752.
|
Replaced by #46974. That PR is based on current |
Serialize per-session revert and admission changes, commit staged reverts atomically with their replacement admission, preserve queued work across reverts, and compare undo boundaries chronologically instead of by message ID. Plugin activation completes before session changes are blocked so plugin setup can still admit its own input. Includes the anomalyco#42461 boundary fix; supersedes that PR. Closes anomalyco#37751. Continues the approach from anomalyco#37752.
Summary
Checks
bun test src/context/server-session.test.ts(packages/app)bun test test/cli/tui/data.test.tsx test/cli/tui/session-rows.test.ts(packages/tui)bun typecheck(packages/app)bun typecheck(packages/tui)bun test ./e2e/performance/unit(packages/app; 45 pass before/after)Requested by: @thdxr (Dax via Slack)