Skip to content

fix(web): ease the composer into its scroll position - #1414

Merged
nixuuu merged 1 commit into
devfrom
fix/composer-settle-motion
Nov 28, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/composer-settle-motion

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 28, 2026

Copy link
Copy Markdown
Member

The thread composer previously travelled at a fixed speed and stopped abruptly when it reached the scroll position. Toolbar labels stayed visible while their row was being clipped.

The composer now eases into the target using the shared surface motion curve. The duration scales with the distance left to travel, so small scroll deltas track the gesture. Reversing starts at the last painted height. The toolbar, metadata and shortcut hint dissolve in place with a 2 px blur and sharpen as the composer reopens. The editor and primary action stay sharp throughout.

Fixes: #1411

Verification

  • Exercised slow scrolling, a pause inside the end zone, full wheel flicks and rapid reversals on the actual thread page in Chromium at 1200 and 390 px. Sampled heights decelerated towards the endpoint. The toolbar stayed within the surface and the feed reserve stayed constant.
  • At half height, the toolbar was at 3% opacity and 1.94 px blur in both viewport sizes. Reduced motion switched directly between endpoint heights without blur.
  • Verified that scrolling, focusing and jumping to latest preserve a multiline draft. Local web typecheck, targeted lint, formatting and diff checks passed. Full repository checks run in CI.

@nixuuu
nixuuu enabled auto-merge (squash) November 28, 2026 09:23
@nixuuu
nixuuu merged commit 27a4c41 into dev Nov 28, 2026
24 checks passed
@nixuuu
nixuuu deleted the fix/composer-settle-motion branch November 28, 2026 09:29
nixuuu added a commit that referenced this pull request Nov 28, 2026
Slow wheel input could leave the composer at its previous height for the
first frame of each short tween. Updating the footer edge also
invalidated inherited styles throughout the virtual feed. The composer
now applies travel that fits in one 120 Hz frame on its first paint, and
only the backdrop, scrollbar gutter fade and footer actions inherit the
moving edge.

Fixes: #1414

## Frame measurements

Sampled production builds in Electron 45.4.1 on Linux with a local
gateway, a 14-turn thread, a 1200 × 820 viewport and software offscreen
rendering. Counted offscreen paint deliveries, native scroll events and
composer surface size changes independently. Each workload ran twice at
each refresh setting with 3.5 s of measured movement per run after
warm-up.

| Setting and gesture | Paints/s before | Paints/s after | Composer
height changes/s before | Composer height changes/s after |
| --- | ---: | ---: | ---: | ---: |
| 60 Hz, slow wheel | 52.7–59.8 | 60.0 | 26.5–29.7 | 57.4–58.0 |
| 60 Hz, rapid reversals | 59.8–60.1 | 59.5–60.1 | 58.8–60.0 | 59.3–59.8
|
| 120 Hz, slow wheel | 83.5–92.3 | 110.7–111.7 | 45.8–49.7 | 103.5–107.2
|
| 120 Hz, rapid reversals | 113.2–113.4 | 117.5 | 96.8–104.8 |
116.6–117.1 |

The continuous wheel delivered 104–108 scroll events/s at 120 Hz after
the change. The 95th-percentile paint interval was 14.4–14.8 ms for slow
input and 11.4–11.7 ms for reversals, with an isolated 64.5 ms gap.
These runs measured software output on the worker. Physical display
presentation was unavailable.

In separate matched slow-scroll traces at 120 Hz, the largest style
update visited 14 elements, down from 1,035.

## Other verification

- Chromium at 1200 and 390 px checked slow scrolling, reversals, reduced
motion, focus, draft retention, Jump to latest and its 8 px clearance.
Checked both backdrop gradients, their bottom alignment and the
scrollbar gutter width.
- Production web build, web typecheck, targeted lint, formatting and
diff checks passed locally. Repository-wide verification runs in CI.
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.

1 participant