Repository navigation
fix(workspace): the rail column is a width, so it moves with the canvas (#2676) - #2677
Conversation
…ts box (#2640) Two defects, one report. **The layout jumped.** `Portal.vue` toggled `<main>` between `flex-1` and `sm:flex-[2_1_0%]` on `voiceCall.active` and swapped `PortalRail` for `PortalVoiceCanvas` in the same frame. Nothing transitioned, so both columns landed at their new shares in one paint, and End call jumped back. `flex-grow` is a `<number>` and therefore animatable, so the share now transitions — 300 ms ease-out on `<main>`, and the canvas column ramps its own grow 0 → 3 over the same curve. The ramp is expressed as Vue enter/leave classes rather than a class toggle because a newly inserted element has no value to transition FROM. Opacity rides the same transition so the canvas's content is not re-wrapping in view while the column is still moving. `motion-reduce:transition-none` on every transitioning element. The shares stay shares: reverting to `w-[40%]` / `w-[60%]` would animate just as well and re-open #2581, where those summed to 100% + an 18rem sidebar and the shell clipped the canvas column off the right edge. Two consequences, both deliberate: * The `v-if` / `v-else-if` chain is gone — a `<Transition>` wrapper breaks the adjacency a chain needs. The exclusivity it guaranteed by construction is now a named computed both arms read, so they cannot drift into both claiming the column. * The rail waits for the canvas to finish leaving. Vue keeps a leaving element in the DOM for its transition; without the gate the rail would mount at full fixed width beside a canvas that is still shrinking — three columns in a row sized for two, `<main>` squeezed by flex for 300 ms, a worse jump than the one being fixed. **The orb rendered squashed.** `VoiceOverlay.vue::resizeCanvas` sized the bitmap ONCE, from the `watch(canvasEl)` that fires on mount — no ResizeObserver, no window listener, no per-frame check — while the canvas is `absolute inset-0 w-full h-full`. Every later width change left CSS stretching a stale bitmap into an ellipse, and the overlay mounts in the same tick the call re-lays out the columns, so the single measurement could capture the pre-call width on its own. It now observes both: a ResizeObserver for the box moving under a stable window (the column swap, a rail drag), and a window `resize` for a devicePixelRatio change, which resizes no box and so fires no observer. The bitmap is sized at `css × dpr` (capped at 2) and the render loop draws in CSS pixels via `ctx.setTransform`, so the 45px core and the particles' fixed radii keep meaning what they meant. Resizing re-scales and never re-seeds — the particle field is seeded once and lives in a fixed space around (0,0), so the orb does not restart when the column moves. A zero-sized box is ignored rather than throwing the last good size away, and a same-size measurement does not touch the bitmap, because assigning to `canvas.width` clears the canvas. Tests: `portalVoiceLayoutMotion.spec.js` (17) — the resize contract EXECUTED against a stub canvas whose box changes (DPR scaling, the cap, a missing DPR, the zero-box and same-size guards), mutation-checked by pinning the bitmap to its first measurement, which fails exactly the "FOLLOWS a changed box" case; plus the transition classes, the reduced-motion fallback counted over every transitioning element, and the leave gate. Two existing guards in `portalVoiceMode.spec.js` / `portalRail.spec.js` were rewritten to read the shared condition instead of the retired chain — the property they protect is exclusivity, not which construct expresses it. Frontend suite: 113 files, 2532 tests, all passing; both ratchets green; vite build clean. Related to #2640 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bd71qsYbFodvofba8P69eP
… step (#2640) Two review findings. 1. **Reduced motion was not instant.** Tailwind's `transition-none` emits only `transition-property: none` — the `duration-300` beside it still applies, so `transitionDuration` stays `.3s`. That is the exact property Vue's `getTransitionInfo` reads to size the fallback timer it resolves `@after-leave` on, so under `prefers-reduced-motion` nothing animated and every leave was still gated for 300ms: the canvas vanished, the right column sat empty, then the rail popped in. `motion-reduce:duration-0` on every transitioning element drives that timeout to 0. Verified against Tailwind's own output — the variant emits `transition-duration: 0s` inside the media query and after `duration-300`, so it wins. The comment on `voiceCanvasLeaving` claimed "`after-leave` fires immediately and this is never observably true", which was false as written; it now says what makes it true. Same correction in the feature flow. 2. **The rail column still steps** — accepted here, tracked at #2676. Its `<aside>` carries no width transition and it is a `shrink-0` flex sibling of `<main>`, so on call end it mounts at full width in one frame: 48px collapsed, 384px open, or the dragged `--ws-rail`, which on a wide rail is a bigger step than the 211px snap this PR removes. The honest fix is an explicitly animatable width for that column — CSS cannot transition to `auto` — and that width is owned by ent#492, not by the voice-call code. Doing it from here means either a wrapper element in the row or holding the rail mounted through a call, both of which want a browser to verify rather than the node-env source scan this suite is limited to. Recorded as a Known Limitation in the feature flow, with a test that fails if the limitation is deleted from the record or if the rail starts animating. Tests: the class-counting case now requires BOTH reduced-motion classes and asserts the ordering relation, since asserting the class string rather than the behaviour is exactly why (1) shipped green. 113 files / 2534 tests green. Fixes #2640 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RSjVEjay9ztC1oDXXkh9uN
…as (#2676) #2640 animated two of the three columns. The rail was the third and it still stepped: a bare `v-if` on a `shrink-0` flex sibling whose `<aside>` carries no width transition, so on call end it appeared at full size in one frame — 48px collapsed, 384px open, or whatever `--ws-rail` had been dragged to, which on a wide rail is a LARGER step than the 211px snap #2640 removed. The width now lives on a wrapper this view owns rather than on `PortalRail`'s own `<aside>` — the same shape the sidebar column three columns to the left already has (`shrink-0 overflow-hidden` plus an explicit `--ws-` width). `--ws-rail` is the RENDERED width (48px collapsed, the dragged width open), so one binding covers both states and agrees with the inner aside at rest. **Vue enter/leave classes, not an always-on `transition-[width]`** — the load-bearing decision. That same variable is rewritten on every `pointermove` of a rail drag, so a permanently-transitioned width would make dragging rubber-band by 300ms. Vue adds the active class only for the enter/leave window and removes it afterwards, so a drag stays instant. `!w-0` is `!`-marked for the reason the canvas's `!grow-0` is: both are single-class selectors setting the same property, so without it Tailwind's output order would pick the winner. **This retires `voiceCanvasLeaving`.** The flag existed because a rail mounting at full width beside a still-shrinking canvas put three columns in a row sized for two. A rail entering from zero width is complementary to a canvas leaving towards zero grow — the row's total is conserved at every frame — so the hazard is gone by construction rather than held off by a flag, and the two motions now overlap instead of running back to back. The reduced-motion reasoning its comment carried is not lost: it belongs to the transition classes, and the class-counting test requires both `motion-reduce` classes on every transitioning element, including the two added here. `railHasColumn` is the one shared condition, and it reads `railTabs.length` because `PortalRail`'s own root carries `v-if="tabs.length"` — with the width on a wrapper, a tabless rail would otherwise leave a full-width empty column. Measured in headless Chromium against the real built stylesheet rather than argued from the classes: mid-transition the column is at 322px of its 384 (interpolating, not stepping), it settles at 384, under `prefers-reduced-motion` it is at 384 immediately, and a drag issued after the active classes are removed lands in the same frame. The three Tailwind utilities involved are confirmed present in the built CSS — `.\!w-0{width:0!important}`, `.transition-\[width\]{transition-property:width}` and `.w-\[var\(--ws-rail\,24rem\)\]` — since an arbitrary-value miss would have made the whole thing silently inert. Accepted discontinuity: `thirdColumnResizable` is gated on `!voiceCall.active`, so the 8px resize handle still appears and disappears in one frame. It is 8px against a column that moves 384, and animating it would mean a second animated element whose only content is a 1px line. Tests: the transition scan now reads CLASS ATTRIBUTES rather than the whole file — this change's own comments name `transition-[width]` while explaining it, and a file-wide match reports the prose as an un-guarded transitioning element. Three source guards updated where the `v-if` moved (they assert the shared computed, which is the property; which element carries the condition is not), and four new cases: the ramp's classes, the static class carrying no `transition-`, the retirement of `voiceCanvasLeaving`, and the tabless-rail gate. Removing the `<Transition>` reds the first of those. 113 files / 2536 tests green; raw-colour ratchet unchanged. Fixes #2676 Related to #2640 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RSjVEjay9ztC1oDXXkh9uN
|
Self re-review. Nothing further from me — two things I went back to check specifically, since both were places this could have quietly broken something adjacent.
The measurement is the part I would keep in the record: mid-transition 322 of 384, instant under Merge after #2647 — this deletes the |
|
Deeper self re-review. No defect, but one widening I introduced without saying so, and it should be on the record rather than discovered later. The leave transition is not scoped to the voice call. That was not in #2676's scope, and I did not consider it when I moved the width. Two things follow:
I have not scoped the transition to the voice cause, deliberately: doing so means reintroducing a flag that says why the column is leaving, which is precisely the kind of flag this PR deletes ( Everything else re-read clean: the mobile sheet is outside the wrapper and outside the |
#2647 (the parent this branch was stacked on) squash-merged to dev an hour ago, so its content arrived here from two directions at once: as the branch's own commits and as dev's squashed form. All five conflicts are that, and the resolution is the same in each — keep the branch, which already carries #2647's work plus #2676's changes on top. Portal.vue, three hunks: #2676 RETIRES `voiceCanvasLeaving` (a rail entering from zero width is complementary to a canvas leaving toward zero grow, so the row's total is conserved and the flag has nothing left to sequence). dev still has the flag, its two transition handlers and the old `v-if` on `PortalRail`. The branch's side is the intended end state. The three spec files are the same shape one level along: each conflict is #2676's updated assertion against the pre-#2676 one dev still holds (`v-if="railHasColumn"` on the wrapper vs `v-if="railVisible && …"` on `PortalRail`). Resolved HUNK-WISE, not file-wise. `git checkout --ours` was the first attempt and was WRONG: it takes the whole file from HEAD and so would have discarded dev's ent#556 `PortalBrand` block from the signed-out shell — #2653's work, untouched by this branch and present only in dev. Caught by diffing the resolution against dev before committing. The merged file now carries both. Frontend suite green on the result: 118 files / 2613 tests. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01RSjVEjay9ztC1oDXXkh9uN
|
merge-train 2026-09-10 (evening run): riding. Merged tree with #2649's viewport-derived rail max checked for coherence: the wrapper's One assertion left as is rather than patched, so you know it is known: |
Closes the deferred half of #2640. Filed as #2676 during that PR's review, claimed and handled here.
The defect
#2640 animated two of the three columns. The rail was the third and it still stepped.
PortalRail's<aside>carries no width transition in either state, and it was a barev-ifon ashrink-0flex sibling of<main>. On call end it appeared at full size in one frame:--ws-railhad been dragged to.On a wide, open rail that single-frame jump is larger than the 211px snap #2640 set out to remove.
The fix
The width moves onto a wrapper this view owns, not onto
PortalRail's own<aside>— the same shape the sidebar column three columns to the left already has (shrink-0 overflow-hidden+ an explicit--ws-width).--ws-railis the rendered width (48px collapsed, the dragged width open), so one binding covers both states and agrees with the inner aside at rest.Vue enter/leave classes, not an always-on
transition-[width]. This is the load-bearing decision: that same variable is rewritten on everypointermoveof a rail drag, so a permanently-transitioned width would make dragging the rail rubber-band by 300ms. Vue adds the active class only for the enter/leave window and removes it afterwards, so a drag stays instant.!w-0is!-marked for the reason the canvas's!grow-0is.It retires
voiceCanvasLeaving. That flag held the rail out of the row for the whole of the canvas's leave, because a rail mounting at full width beside a still-shrinking canvas put three columns in a row sized for two. A rail entering from zero width is complementary to a canvas leaving towards zero grow — the row's total is conserved at every frame — so the hazard is gone by construction, and the two motions now overlap instead of running back to back.railHasColumnis the one shared condition. It readsrailTabs.lengthbecausePortalRail's own root carriesv-if="tabs.length"— with the width on a wrapper, a tabless rail would otherwise leave a full-width empty column behind.Verification — measured, not argued
Headless Chromium against the real built stylesheet:
Mid-transition the column is at 322 of its 384, so it interpolates rather than stepping; a drag issued once the active classes are gone lands in the same frame; and
prefers-reduced-motionis instant (themotion-reduce:duration-0finding from #2647's review carries through to the two classes added here).The three Tailwind utilities are confirmed present in the built CSS — an arbitrary-value miss would have made the whole thing silently inert:
Acceptance criteria
--ws-railprefers-reduced-motionstays instant, both classes on every transitioning elementAccepted discontinuity
thirdColumnResizableis gated on!voiceCall.active, so the 8px resize handle still appears and disappears in one frame. It is 8px against a column that moves 384, and animating it would mean a second animated element whose only content is a 1px line. Recorded in the feature flow.Tests
The transition scan now reads class attributes rather than the whole file: this change's own comments name
transition-[width]while explaining it, and a file-wide match reports the prose as an unguarded transitioning element.Three source guards updated where the
v-ifmoved — each asserts the shared computed, which is the property; which element carries the condition is not. Four new cases: the ramp's classes, the static class carrying notransition-, the retirement ofvoiceCanvasLeaving, and the tabless-rail gate. Removing the<Transition>reds the first.113 files / 2536 testsgreen. Raw-colour ratchet unchanged.Fixes #2676
🤖 Generated with Claude Code
https://claude.ai/code/session_01RSjVEjay9ztC1oDXXkh9uN