Skip to content

Settle a pane operation from the topology that arrived before its answer - #477

Merged
yansfil merged 2 commits into
mainfrom
fix/windows-zoom-delta
Oct 5, 2026
Merged

yansfil merged 2 commits into
mainfrom
fix/windows-zoom-delta

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Closes #424

Summary

Windows web e2e s2.spec.ts:55 failed on its first attempt: after toggle_zoom the second zoom never reached Herdr (data-zoomed stayed true), and after resize_pane the next close_pane never closed.
Cause: Herdr's session update that shows a pane operation's effect can reach the core before the answer to the request does.
The update is skipped because the operation is still transmitting, Herdr sends nothing more once the layout stops moving, and the operation stays awaiting_topology until its 5 s deadline, turning away every later zoom, resize and close in that tab (pane.operation_in_progress, not shown by design).
The answer now also checks the layout the core already holds, so the operation settles at once.

Herdr server log, failing run: pane.zoom received at :41.843 (3rd), the 4th (:42.008) never arrived
hided: pane.zoom accepted at :41.870, delta carrying zoomed=true was sent at :41.858 (before the answer), no topology_confirmed

Review

  • 조심해서 볼 파일: herdr-core/src/runtime/operations.rs - the confirmation predicate and completion are extracted unchanged from observe_pane_operations; the new call is at the answer (ingest_pane_mutation_result), no work under the lock beyond a map lookup.
  • 질문: the remote-device path (acknowledge_remote_operation / observe_remote_operations) has the same shape and is untouched; do we want a follow-up issue?

Evidence

  • 확인한 것: new runtime test a_pane_operation_whose_topology_arrived_before_its_answer_settles_on_the_answer (control_order.rs) orders update-then-answer itself with FakeHerdr; it fails without the change and passes with it. herdr-core suite 1418 passed, fmt and clippy -D warnings clean.
  • 확인하지 못한 것: no Windows run of s2.spec.ts:55 yet; the Windows web e2e lane should show the first attempt passing. The local fix is proven on the ordering, not on Windows timing. Close failure at s2:382 (run 37268688639) is the same chain: an unconfirmed resize_pane blocked the close, per the hided log.

Herdr's session update showing a zoom, resize or split can reach the runtime
while the request is still unanswered. observe_pane_operations skips an
operation that is still transmitting, and Herdr sends nothing more once the
layout stops moving, so the operation stayed awaiting topology until its
deadline and turned away every later pane operation in the tab. The answer now
checks the layout the core already holds.
@yansfil
yansfil merged commit 557372e into main Oct 5, 2026
28 checks passed
@yansfil
yansfil deleted the fix/windows-zoom-delta branch October 5, 2026 07: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.

Flaky e2e: s2가 checkout, 탭, split 여정 중 탭 수를 놓침 (Linux)

1 participant