Skip to content

fix(split-pane): open Pane B's live queue after the response, keep the disconnected marker last - #524

Open
timkjr wants to merge 1 commit into
Ark0N:masterfrom
timkjr:fix/split-pane-live-queue-timing
Open

timkjr wants to merge 1 commit into
Ark0N:masterfrom
timkjr:fix/split-pane-live-queue-timing

Conversation

@timkjr

@timkjr timkjr commented Oct 2, 2026

Copy link
Copy Markdown

Follow-ups from the #506 review.

  • The history pull's live-frame queue opened before the fetch, so Pane B stopped painting for the whole round trip. It now opens when the response arrives, beside capturedAt. Frames from before it are replaced by the capture's \x1bc or written unchanged, so the final buffer is the same. The request uses the primary pane's CodemanFetchDeadline budget, and the body read gets 10 s once headers land, since that is the only window that holds live output.
  • A {t:'r'} refresh queued behind a pull ran its clear() after the marker was written and wiped it. A close during a refresh load also wrote the marker above the replay. The marker is now an owed flag (_markerOwed) that each load settles in its own finally, so it is the last thing on screen however the close, the pull and a trailing refresh interleave.

Two related items in one PR because they share the marker/queue state machine; happy to split if preferred.

Testing: unit tests drive each ordering. Checked in real Chrome against a beta instance with a delayed pull, old code vs new:

Scenario Old code New code
Output while the fetch is in flight held painted
Close mid-pull marker last marker last
Close mid-pull with a refresh queued marker wiped marker last

docs/architecture-invariants.md updated.

🤖 Generated with Claude Code

…e disconnected marker last

Follow-ups from the Ark0N#506 review.

The live-frame queue opened before the fetch, freezing Pane B for the
whole round trip. It now opens beside capturedAt; the request uses the
shared terminal fetch deadline and the body read a 10 s one.

A {t:'r'} refresh queued behind a pull ran its clear() after the
disconnected marker was written and wiped it, and a close during a
refresh load wrote the marker above the replay. The marker is now an
owed flag (_markerOwed) that each load settles in its own finally.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

1 participant