Skip to content

trunk-merge/pr-3583/74772323-c75e-4521-8860-522de5103c9d#3588

Closed
trunk-io[bot] wants to merge 7 commits into
mainfrom
trunk-merge/pr-3583/74772323-c75e-4521-8860-522de5103c9d
Closed

trunk-merge/pr-3583/74772323-c75e-4521-8860-522de5103c9d#3588
trunk-io[bot] wants to merge 7 commits into
mainfrom
trunk-merge/pr-3583/74772323-c75e-4521-8860-522de5103c9d

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Jul 20, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the main branch at SHA d55d24e69d7478a4aee65ef8e9eecd22ba733c09.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 3583.

adboio and others added 7 commits July 20, 2026 09:37
…the latest message

The channel scroller's one-shot initial end-scroll fired against partial
content (the synthesized "joined" opener renders as soon as the backend
channel resolves, before the task cards arrive), and the engine never
re-scrolls for late rows unless autoScroll forces it. Fold the feed-messages
loading state into the gate and hold the spinner while any feed data is
still loading, so the scroller mounts once with complete data and lands at
the most recent message.

Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad1
Channel-to-channel navigation swaps the feed content without a route
remount, so the scroller provider persisted and its one-shot
defaultScrollPosition never re-applied — a revisited channel kept the
previous channel's scroll offset (often the top). Keying the provider by
channelId fresh-mounts it per channel, re-firing the initial end-scroll.

Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad1
Keying the provider by channelId re-fired the initial end-scroll but
rebuilt the entire feed subtree (rows, observers, reply polling) on every
switch, making channel changes feel sluggish. Replace the key with a
headless LandAtLatestOnChannelChange component that imperatively calls
scrollToEnd in a layout effect when the channel id changes — same commit
as the swapped rows, before paint, no remount.

Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad1
Drop the LandAtLatestOnChannelChange headless component. The same behavior
is a ref on the scroller viewport plus one layout effect keyed on channelId
that sets scrollTop = scrollHeight — the engine composes external viewport
refs, and first mounts are still covered by defaultScrollPosition.

Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad1
CI's biome ci errored on the scroll effect's [channelId] dependency (not
referenced in the body — it's the re-run trigger). Suppress with the repo's
biome-ignore idiom and cut the added comments down to the essentials.

Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad1
…ckoff

Greptile P1: submitting a kickoff mid-load mounts the scroller around
partial content via the pending escape hatch, consuming the one-shot end
scroll; the remaining rows then arrive with no re-scroll. Extend the
scroll effect to also fire when isLoading settles, so the feed lands at
the latest message in that path too.

Generated-By: PostHog Code
Task-Id: d887d524-7d87-4d7a-b38c-b20289937ad1
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 746c844.

@trunk-io trunk-io Bot closed this Jul 20, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-3583/74772323-c75e-4521-8860-522de5103c9d branch July 20, 2026 15:15
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