Repository navigation
fix: keep rapid document workspace placements ordered - #27431
teamleaderleo wants to merge 9 commits into
Conversation
|
Owned by an agent session · took over from an earlier session · session |
Sidebar-Look: no visual change; opt-in native regression captures only
426a61c to
d9d7cbd
Compare
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on ea12ea6 to compare; do not merge until green; see lane-rules |
|
Found 1 test failure on Blacksmith runners: Failure
|
|
Review (codex gpt-6-astra high, next-review): SHIP at de1e4c6 No blocking findings. |
|
Closing: superseded by #28219, a carry of this PR's commits with current feat-cmux-next merged in to clear the fork-point Script tests red. Review and landing continue there. |
|
Review (codex-review-box/gpt-6-astra high, lane-place): SHIP at d1050c1 SHIP
|
…8219) * test: expose document-backed bottom placement burst ordering * fix: refresh document-backed rows between workspace placements * test: keep placement remote fixture compileable * test: observe held placement writes without a scheduling race * test: capture committed workspace document order Sidebar-Look: no visual change; opt-in native regression captures only * test: preserve document mixed order during placement resync * fix: retain document mixed order during sidebar resync * test: isolate the document placement regression with live app suites * fix: derive sidebar grouping from active document * test: use fake python for placement document fixture Agent-Session: https://cmux.com/deeplink/agent?id=aid-4dd8b574224f6367f4ce * test: cover inactive document with cached drag Agent-Session: https://cmux.com/deeplink/agent?id=aid-4dd8b574224f6367f4ce * test: verify legacy drop target after document disconnect Agent-Session: https://cmux.com/deeplink/agent?id=aid-4dd8b574224f6367f4ce * fix: reshow document after local placement Agent-Session: https://cmux.com/deeplink/agent?id=aid-4dd8b574224f6367f4ce
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
Rapid workspace creation can resolve successive
.bottomplacements against the sidebar projection from before the previous document move. The document mirror already applies each move synchronously; this fix refreshes the document-backed projection through the existing rows writer after each accepted placement. The next placement sees the preceding order without adding another optimistic owner.The accepted document path from #25654 remains intact. Resync also preserves document-owned mixed order instead of re-enabling legacy ungrouped-first drop targeting.
Validation
Current head:
de1e4c67e34f813e4c45b5a847d733333f556442, rebased on0b45ce8ec311c0eb5148fe3e8887eda2d8e5b373, including merged parent #26153 and Classic fixture isolation #27421.0b45ce8e); no actionable P0–P2 findings. Sol is an authorized interchangeable Codex reviewer. Primary inspection covered the actual production and test diffs.f5029adce85980c6aa99baa5: compile passed;PlacementDocumentWriteOrderTestscompleted 1/1, 0.333 s. The real Rust client/server mirrors commit and reloadk1,k2,k3,k4; the three moves anchor afterk1,k2,k3.8ea5fc6d352e9265ad094f0dat baseline151eb767: compile passed and completed with four intended ordering assertions. Client, visible and freshly reloaded rows werek1,k4,k3,k2; all three operations anchored afterk1.5a0506c0845e11411ad55aad, baseline6d53e3f6: the same four intended assertions, complete summary in 0.358 s, with actual native rows captured. This baseline adds only a capture-helper no-animation reload to settle its existing committed rows before taking the snapshot; production is unchanged from the base.prepush-gate.py,git diff --check, hosted fast gates, defaults, Release compile, capture and risk evidence pass at the current head.Classicrun is still active at this head on top of the fixture-isolation merge (00f6e1f4f33858685b1e58c9). Its partial results are not a ten-pass acceptance claim. The existing resumed-import caseaRunCutOffMidwayFinishesWithoutDuplicatesis explicitly marked a known ordering issue on base and remains separately tracked.Performance
8ea5fc6d/ exact-headf5029adcThese counts prove the stale-anchor case only. They do not establish zero ordering failures across all Classic simulations.
Overlap
The parent #26153 has merged and this PR targets
feat-cmux-next. The placement path overlaps #21914, #25654 and #23071; either open placement change can rebase on the other. The acceptedSidebarDocMachines.placeand synchronous documentreshowfrom #25654 are preserved.Takes back #25654: deliberately extends its accepted document-placement return path to refresh bridge rows synchronously before the next same-turn placement. It changes when the normal rows reflect the accepted move.
Risk
Projection refresh is O(rows) per document-backed placement and runs only on this existing placement path. It uses
SidebarDocStore.showandSidebarBridge.resync, preserving the single rows writer and existing refusal handling. No timer, observer or animation loop is added. Parent and isolation dependencies have merged; the shared Swift and sidebar dogfood holds are lifted.Captures
After at the exact head: first, second, third, fourth. These are actual native AppKit fixture captures using scripted transport and real Rust client/server mirrors. The transparent sidebar background is preserved.
Before with current-base production: first, fourth, third, second. The fixture-only baseline
6d53e3f6settles native views to their actual committed model before recording; it does not change the order. Both stills passed the shared private-text check.Agent session: agent session