Skip to content

fix(app): keep Home's date headers visible while scrolling - #64665

Merged
arvsrn merged 2 commits into
devfrom
home-header-fix
Nov 18, 2026
Merged

arvsrn merged 2 commits into
devfrom
home-header-fix

Conversation

@arvsrn

@arvsrn arvsrn commented Nov 18, 2026

Copy link
Copy Markdown
Member

Summary

Home's "Today" header could stay invisible: the header fade measured each group header from the wrong frame, and headers reused in place stayed registered under the group they were created for.

 updatePositionCache
-  headerOffsets[group] = header.offsetTop            // relative to the list below the sticky search
+  listTop = list top in the scroll content's frame
+  headerOffsets[group] = listTop + (rows.offsetTop - header.offsetHeight)   // resting place, ignores sticky shift

 setHeader(id, element)
+  drop element's registration under any other group

 <HomeSessionGroupHeader>
-  ref={props.onSetRef}                               // once, for the group it was created for
+  createEffect(() => props.onSetRef(element))        // again whenever Index hands it another group

No feature flag: bug fix.

Evidence

  • Before: on Home, the first date header ("Today") rendered with opacity 0 above the first session.
    After: "Today" shows, sticks while scrolling, and hands off to "Yesterday"; checked by hand in the desktop app.

Merge Danger

Door: two-way

Blast Radius: Home's date-header fade only.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend merging this as is. On the base, the Home story filtered to a project with a single session today shows its "Today" header at opacity 0. With this change the header is visible, stays stuck while scrolling, and fades out as "Yesterday" reaches the sticky position. I checked this in headless Chromium against the Home story on both checkouts. The src/home unit tests and tsc -b pass.

The public API is unchanged: only Home's internal scroll controller and session view are touched.

No concerns.

Before

After

@arvsrn
arvsrn merged commit bb01d3e into dev Nov 18, 2026
10 checks passed
@arvsrn
arvsrn deleted the home-header-fix branch November 18, 2026 13:56
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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