Skip to content

thread fixes#29244

Merged
chrisnojima merged 7 commits into
nojima/HOTPOT-next-670-clean-2from
nojima/HOTPOT-thread-fixes
May 26, 2026
Merged

thread fixes#29244
chrisnojima merged 7 commits into
nojima/HOTPOT-next-670-clean-2from
nojima/HOTPOT-thread-fixes

Conversation

@chrisnojima
Copy link
Copy Markdown
Contributor

@chrisnojima chrisnojima commented May 26, 2026

Changes

  • Switch to onStartReached for loading older messages: Replaces the onViewableItemsChanged + debounced callback approach with LegendList's built-in onStartReached / onStartReachedThreshold={2} props — simpler and more reliable.

  • Remove opacity hack for initial load: Drops the didFirstLoad state that was toggling opacity: 0 → 1 to hide the list until ready. Now relies on LegendList's built-in readyToRender behavior instead.

  • Fix maintainScrollAtEnd for reactions: Adds itemLayout: true to the maintainScrollAtEnd config (was only dataChange: true). This ensures the list scrolls to the end when item heights change, e.g. when a reaction is added to the bottom message.

  • Remove LegendList resize patch: Removes the patch that prevented LegendList from firing resize events immediately; no longer needed.

  • Add scrollIndicatorInsets for iOS: Passes scrollIndicatorInsets={{top: insets.bottom}} to the iOS scroll view wrapper.

  • Min height for top-of-thread container (desktop): Adds minHeight: 100 on Electron for the special-top-message container to prevent layout jank.

  • Hide cards until thread has loaded: Cards (HelloBot, MakeTeam, etc.) in the top message are now gated on hasLoadedEver to avoid flashing them before messages arrive.

  • Local prettier config: Adds .prettierrc and .prettierignore for consistent local formatting.

…ToRender

LegendList already hides content (opacity 0) while bootstrapping the initial
scroll position and reveals it once settled. Our outer opacity/didFirstLoad
gate was redundant and introduced a race where onLoad could be missed
(e.g. on first inbox load in Electron), leaving the list permanently hidden.

Drop didFirstLoad state and the style-opacity override entirely; keep onLoad
only for markInitiallyLoadedThreadAsRead.
buttonBar: {padding: Kb.Styles.globalMargins.small},
container: Kb.Styles.platformStyles({
isElectron: {
minHeight: 100,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dont have top item collapse all the time

</Kb.Box2>
)}
{loadMoreType === 'moreToLoad' && pendingState === 'done' && (
{hasLoadedEver && loadMoreType === 'moreToLoad' && pendingState === 'done' && (
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

don't show this if we haven't figured out our state yet, else it flashes

inverted={true}
offset={insets.bottom}
{...props}
scrollIndicatorInsets={{top: insets.bottom}}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fix ios scrollbars

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on improving chat thread scrolling/loading behavior (especially around loading older messages and keeping the view pinned to the end), reducing initial-render hacks, and adding local formatting configuration for consistent developer workflows.

Changes:

  • Desktop thread list: switch older-message loading to onStartReached, remove the initial opacity gating, and adjust maintainScrollAtEnd to better handle item height changes (e.g. reactions).
  • Top-of-thread UI: gate “cards”/notices on hasLoadedEver to reduce pre-load flashing, and add a minimum height for the desktop container to reduce layout jank.
  • Tooling: add repository-level .prettierrc / .prettierignore.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
shared/chat/conversation/messages/special-top-message.tsx Gates top-of-thread UI on hasLoadedEver and adds an Electron-only min height to reduce layout jank.
shared/chat/conversation/list-area/index.tsx Updates desktop thread list scrolling/loading mechanics and tweaks native scroll wrapper props.
.prettierrc Introduces a repo-level Prettier configuration with overrides for generated files and specific extensions.
.prettierignore Introduces ignore rules intended to prevent formatting churn on generated/artifact-like files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .prettierignore
@@ -0,0 +1,7 @@
shared/common-adapters/markdown/emoji-gen.tsx
shared/common-adapters/icon.constants.tsx
shared/markdown/parser.js
Comment thread .prettierignore
Comment on lines +4 to +7
shared/desktop/build/
shared/coverage/
shared/flow-typed/
shared/libs/
@chrisnojima chrisnojima merged commit bca1cbd into nojima/HOTPOT-next-670-clean-2 May 26, 2026
1 of 2 checks passed
@chrisnojima chrisnojima deleted the nojima/HOTPOT-thread-fixes branch May 26, 2026 17:26
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.

2 participants