Skip to content

fix(threads): bring the composer closer to the bottom edge - #497

Merged
nixuuu merged 1 commit into
devfrom
fix/composer-bottom-gap
Nov 10, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/composer-bottom-gap

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 10, 2026

Copy link
Copy Markdown
Member

Change

The thread composer reserved an empty delivery-status row below its metadata, leaving a measured 40 px gap at the bottom. Delivery feedback now shares the computer-name slot without moving the controls; an always-mounted live region preserves announcements when the composer folds.

Use a shared max(--spacing(2), env(safe-area-inset-bottom)) bottom inset for thread, bot and group composers, and the new-thread and new-side-thread screens. The latter retain their centered layout with compact bottom clearance when their content needs scrolling. Timeline reserves, fades and jump controls include the measured wrapper height.

Bot and group chats now follow changes to the measured composer height when already at the latest message. Growing the editor no longer hides that message, and readers looking at history keep their scroll position. The React Native app is unchanged.

Verification

  • Passed bun install, bun run gen:check, bun run typecheck, bun run lint, bun run format:check, and bun run --filter @canopy/web build.
  • Inspected the real web app in light and dark at desktop (1280 px), narrow (768 px) and phone (390 px) widths using a disposable seeded stack. Checked a 1000-turn thread at the bottom, an expanded composer with an attachment and quote, the queue/steer tray, long computer names, new-thread and side-thread screens, and bot/group chat fixtures. Screenshots remain outside the repository.
  • Measured 8 px below thread metadata, no horizontal page overflow, the latest row above the composer, and jump controls 12 px above their wrapper. Group composer growth reserves its full measured height and stays at the end; resizing it while reading history preserved scrollTop at 497 px.
  • Copy audit: no UI strings changed. No UI tests added or run. The integration suite (check:tmp) was not run under the task's verification restriction; CI remains the gate.
  • Native macOS/Windows window chrome and devices reporting a nonzero safe-area inset were not available for direct verification. The shared CSS retains the safe-area maximum at every breakpoint.

@nixuuu
nixuuu merged commit b429528 into dev Nov 10, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/composer-bottom-gap branch November 10, 2026 13:21
nixuuu added a commit that referenced this pull request Nov 12, 2026
Focusing the collapsed thread composer fed every intermediate footer
height into the timeline spacer and scroll anchoring. Expansion,
collapse and draft growth now stay in the bottom overlay, with a fixed
reserve for the collapsed input and safe gap.

- Observe the fixed footer rail instead of the animated composer.
Preserve row measurements, reader intent, streaming follow-end and turn
navigation.
- Animate one bottom-aligned, clipped composer height using existing
motion tokens. Its internal folds switch immediately; reduced motion
switches the outer height immediately too. Keep the opaque backing and
fade attached to the overlay.
- Anchor “Jump to latest” above the collapsed edge and fade it while
covered by the expanded composer.
- Native thread folding already preserved its reserve, but multiline
drafts and attachments still enlarged it. Give thread feeds a fixed
collapsed reserve and latest-button anchor, while keeping measured
keyboard geometry separate. Mobile changes are JS only.
- Update the related Polish layout and performance documentation.

Validation passed: `bun install --frozen-lockfile`, `bun run gen:check`,
`bun run typecheck`, `bun run lint`, `bun run format:check`, the web
build and `git diff --check`. Svelte reported zero errors and warnings.
CI's four test shards, generated-code checks, static checks and builds
passed on this head. No web UI test suite was added or run; browser
automation was disposable diagnostic tooling.

The real seeded thread was reviewed in Chromium 155.0.8059.84 on Linux
x86_64 with Bun 1.4.4. Coverage included light/dark, widths 1440/820/390
at height 900, normal/reduced motion, latest/scrolled-up,
expansion/collapse, multiline drafts and eight uploaded attachments with
long names. All 60 sampled scenarios reported **0 px scroll-position
drift, 0 px scroll-height change and 0 px visible-message anchor
drift**. The latest button retained its coordinates and became inert
while covered. Screenshot review found no horizontal overflow or
see-through seams. A focused reduced-motion pass recorded only endpoint
heights, with no interpolation. No browser JavaScript errors were
observed.

The focused Performance trace maps the timeline's 1,734 DOM nodes to CDP
backend node IDs and checks `Layout` roots and invalidations during
three real expansion/collapse cycles. Marks begin at the composer's
state change; collapse follows a real 100 px reader wheel gesture.

| Trace interval | Timeline layout events |
| --- | ---: |
| Expansion 1 / 2 / 3 | **0 / 0 / 0** |
| Collapse 1 / 2 / 3 | **0 / 0 / 1** |
| Positive control: change a timeline border by 1 px | **1** |

Each interval lasted 503–507 ms. Expansion had zero timeline layout
invalidations. Each collapse had two timeline invalidations during the
reader scroll/range update; the third included one timeline layout.
There was no repeated timeline layout during the animation.
Composer/global layout continued during its height transition: 18–22
events and 3.986–5.578 ms total per interval. These global events are
not counted as timeline layout. The positive control confirms that an
actual timeline layout is detected. This is a focused layout result, not
a broad CPU or frame-rate benchmark.

EAS CLI 27.4.1 fingerprints with the production build profile match the
pre-change baseline on both platforms:

| Platform | Before = after |
| --- | --- |
| iOS | `6ddec9ef559ee0095ac33e94ff9418a942053b17` |
| Android | `5f6eae3ab278f1cd543e9ed763f923a319b65ec9` |

Screenshots, raw trace and diagnostic summaries are retained outside the
repository. No native device runtime was exercised. The expanded overlay
deliberately leaves the timeline fixed and can cover its bottom rows.

UI copy is unchanged; the copy audit for changed strings does not apply.
History places the animated-reserve coupling before the recent PRs
below; these links provide context rather than identifying a new
regression introducer.

Related: #497, #551, #554, #568
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