Repository navigation
#760: a floated panel draws its conversation column and margin tier in the first frame - #763
Merged
Merged
Conversation
DocumentSessionSpace measures its width at mount and from a ResizeObserver only, so the render that floats the panel still holds the docked width and reserves no conversation column until the observer reports, a frame later. This case mounts the space in the docked panel, floats the panel at a 1028 px host with an observer stub that never fires, and expects the 420 px column at once. It fails on master: no column is reserved. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
…n the first frame DocumentSessionSpace measured its width only at mount and from a ResizeObserver, so the render that floats the panel kept the docked width and reserved no conversation column until the observer reported a frame later: for that frame the document filled the panel, and a reading taken then saw no column and the docked margin tier. It now also measures in a layout effect keyed on the requested column and `enabled`, so the float's render is laid out at the floated width and reserves the 420 px column. MarginThreads derives its tier from its own observer only; the space's re-measure does not reach it. At 1280 the floated tier equals the docked one (off), so #760's failure needs nothing more, but where a float changes the tier (the scene's 1512 width) the observer's setState was only scheduled and committed after that frame's paint. Its observer now commits inside the callback (flushSync), as the new margin case shows: with the observer fired outside act, the tier was still `off` when the callback returned and is `cards` with flushSync. A tier changes none of the boxes it reads (the column never narrows the page), so the commit queues no further resize in the frame. Both expose what they last drew from: the space its width (`data-document-session-width`, rendered with the column) and the margin the body, scroll box and page widths its tier was read from (`data-margin-measured`, written beside the commit), so a reader can tell a drawing made from the layout now from one a resize has not reached yet. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
… layout settled() took a reading once two consecutive polls agreed. A stale drawing holds as still as a settled one when the next frame is late, which is how the float's docked readings (no column, body 1028, tier off) passed as settled. Each margin reading now carries `current`: in the same evaluate, the session space's `data-document-session-width` against its clientWidth and the margin's `data-margin-measured` against the body, scroll box and page widths read as MarginThreads reads them. settled() polls until it holds, with no frame waits, and reports the last reading if it never does. It waits only for the app to have read the layout, never for what it drew, so the tier and column assertions keep their meaning. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…d does not read as a colour tokens-guard.test.ts reads '#760' as a hex colour in src/renderer (DocumentSessionSpace.tsx and its test), so unit 3/4 failed in run 44215363138. Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
Owner
Author
|
Landed on master as 1de16dc, master-first. The merged tree (80c0792e3) passed class 1a in run 44448621884; the Mac half ran at the PR head 6450154, and the two default-group reds there passed alone at this head and at master (flake row 46). Sminos-Session: master-landing-architect#37052769 (MAWS on macbook) |
SSFSKIM
added a commit
that referenced
this pull request
Nov 19, 2026
…e and DL163, #782 stopped rows, #779, #763, #765, #768) Conflicts, each kept both sides: - src/renderer/src/shell/DocumentSessionSpace.tsx: U10b's bar room (useBarRoom, --float-bar-room on the root) and ticket 760's measure on [requested, enabled] with data-document-session-width; the root carries both the attribute and the style. - src/renderer/src/shell/DocumentSessionSpace.test.tsx: U10b's bar-room case, then ticket 760's column-in-the-floating-render case. - docs/tech-debt-tracker.md: the union's rows, then master's two of 2026-11-19 (master's removal of the anchoring row kept). The wire is unchanged on master: WIRE_MINOR stays 57. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #760, as ruled in the issue.
Product.
DocumentSessionSpacemeasured its width only at mount and from a ResizeObserver, so the render that floats the panel still had the docked width and reserved no conversation column for a frame. It now also measures in a layout effect keyed on[requested, enabled], and rendersdata-document-session-width.MarginThreads' observer commits its tier withflushSync: the space's effect alone does not reach the margin (its effect is keyed on[view]and the space's re-render bails out of its children), so at 1512 × 982, where floating changes the tier fromoff, the tier landed a frame late without it. The margin writesdata-margin-measured(body, scroll, page widths) beside its tier.Test. Red unit case first: a ResizeObserver stub that never fires, a panel floated onto a 1028 px host, a 420 px column expected (fails on master, passes here). A margin case fires the observer outside act and expects the tier committed at once (fails without
flushSync). Ine2e/layout-transfer.spec.ts,settled()no longer waits on two agreeing polls: it polls until the app's own readings (data-document-session-width,data-margin-measured) equal the measured geometry, with no frame waits; the tier, column and width assertions are unchanged.Checks so far.
DocumentSessionSpace.test.tsx4/4 (red before the fix),margin.dom.test.tsx80/80, the comments folder plus provisional 244/244,tsc --noEmiton web and e2e, ESLint on the changed files. To come: the Linux half on Actions, the :461 scene alone on the mini's guest six times, then e2e:default once, and a reviewer-medium on the range.Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)