Skip to content

fix(email): keep a thread's row and cursor when it moves to another date - #8246

Closed
synoet wants to merge 1 commit into
synoet/email-scroll-anchorfrom
synoet/email-stable-row-ids
Closed

synoet wants to merge 1 commit into
synoet/email-scroll-anchorfrom
synoet/email-stable-row-ids

Conversation

@synoet

@synoet synoet commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Stacked on #8245 (email list stability).

Why

Email rows were identified by thread and date group. When a reply arrived on a thread from yesterday, or its reminder returned, it moved to Today under a new row id: the row remounted, the keyboard cursor on it vanished and fell back to a neighbouring thread, and with the reading pane open the pane followed that fallback and switched away from the thread being read.

What

  • features/soup/collection/rows.ts: buildGroupedSoupRows(groups, { keyByEntity: true }) leaves the group out of entity row ids, for lists where each entity sits in one group; an entity listed in two groups still gets two rows.
  • The email list's date buckets use it.

Verified by injecting a reply on the thread under the cursor with the reading pane open: the thread moves to Today, keeps its DOM element and the cursor, and the pane stays on it.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: macro-inc/macro/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a088d195-38ff-42b7-b355-d92853a28a9e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

@synoet
synoet force-pushed the synoet/email-scroll-anchor branch from 4b1d31d to be0f7f1 Compare October 17, 2026 12:43
@synoet
synoet force-pushed the synoet/email-stable-row-ids branch from c35a65b to 40103cd Compare October 17, 2026 12:43
Why: email rows were identified by thread and date group. When a reply
arrived on a thread from yesterday, or its reminder returned, it moved
to Today under a new row id: the row remounted, the keyboard cursor on
it vanished and fell back to a neighbouring thread, and with the reading
pane open the pane followed that fallback and switched away from the
thread being read.

What: grouped soup rows can be keyed by entity alone, for lists where
each entity sits in one group; the email list's date buckets use it. A
thread changing group keeps its row, its DOM and the cursor. An entity
listed in two groups still gets two rows.
@synoet
synoet force-pushed the synoet/email-stable-row-ids branch from 40103cd to 69e446e Compare October 17, 2026 12:56
@synoet
synoet force-pushed the synoet/email-scroll-anchor branch from be0f7f1 to 47575b3 Compare October 17, 2026 12:56
@synoet

synoet commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #8247 with the other list stability fixes.

@synoet synoet closed this Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant