Skip to content

Floated panel: the first render after a float has no conversation column and the docked margin tier (layout-transfer :461 intermittent) #760

Closed

Description

@SSFSKIM

What fails

e2e/layout-transfer.spec.ts:461, "the document margin’s tier at 1280 × 820: in the floated panel, alone in main, with the panel closed, after Expand pane and after Restore split". It fails intermittently on the Mac mini's guest lane, at line 550 ("floated: margin tier follows its measured body and page side space": expected icons, received off). It fails on master too, so it is not caused by the UX wave's batch 3.

Readings (the scene's own 'margin readings' annotation, reading floated)

Seven runs, each the scene run alone on the guest, alternating master 77af813a4 and batch 3's tip ad62546da:

run tree result panel host body scrollBox page conversation tier
1 master pass 1040 1028 608 608 608 420 off
2 tip FAIL 1040 1028 1028 1028 816 0 off
3 master pass 1040 1028 608 608 608 420 off
4 tip FAIL 1040 1028 1028 1028 816 0 off
5 master pass 1040 1028 608 608 608 420 off
6 tip FAIL 1040 1028 1028 1028 816 0 off
7 master FAIL 1040 1028 1028 1028 816 0 off

Master failed 1 of 4 runs and the tip 3 of 3. Every failing run has the same shape: no conversation column (0, not WR #12's 420), so the body is the whole host (1028), and the tier is still off, the docked panel's tier. Every passing run has the 420 column and a 608 body. Earlier, a bisect over the batch's link heads was not monotonic (master pass, U1b pass, U4b fail, U1c pass, tip fail).

Diagnosis (read from the code; the race itself is not yet measured)

  • floatPanel in src/renderer/src/shell/floating.ts ends in one layout().setPanel({ ...patch, floating: true }) write.
  • src/renderer/src/shell/DocumentSessionSpace.tsx measures its width only at mount and from a ResizeObserver; its effect's dependencies are []. In the render that floats the panel, its width is still the docked width (360), so no conversation column is reserved. The column appears only once the observer fires, after the next frame.
  • MarginThreads.tsx derives its tier the same way, so in that render the tier is still the docked off.
  • The scene reads a fresh layout synchronously after the float. That read can land before the next frame, which gives the docked readings above. Whether it does depends on timing, which is why the failures are intermittent and their rate can vary with the build.

The person can see this as well: for one frame after a float, the document fills the panel with no conversation column.

The fix (ruled by the architect)

  1. Product: DocumentSessionSpace also measures in a layout effect keyed on [requested, enabled], so the render that floats the panel already has the floated width. Add a red unit case first: a ResizeObserver stub that never fires, a floated panel with a 1028 host, and expect a 420 px column. Use flushSync in MarginThreads' observer only if the layout effect alone does not fix the tier.
  2. Test: no waits for frames. The space and the margin expose the width and tier they last drew as a data attribute, and the spec's settled() waits until the app's own reading agrees with the measured geometry.
  3. A small PR off master, after batch 3 lands and before batch 4. Until it lands, a :461 failure in the default group cites this ticket.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P2
    on Nov 17, 2026
  2. added a commit that references this issue on Nov 18, 2026
  3. removed
    status:ready-for-implementer
    on Nov 19, 2026
  4. SSFSKIM commented on Nov 19, 2026

    @SSFSKIM
    OwnerAuthor

    [board] done: landed on master as 1de16dc (PR 763)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions