virtual-core: a clamp retry can overwrite a scroll command and ignores _canWriteScroll()
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend, performance
調査の方向性
Start in the virtual-core scroll write path: _retryClampedAdjustment, _canWriteScroll, _startScroll, _writeAwaitingCommand, and the _willUpdate and resizeItem calls that grow the sizer. Reproduce the case where a clamped retry at { target: 4850, maxAtWrite: 4800 } fires after a scrollToIndex write to 550. Done when a command's target is never overwritten by a retry, the retry respects _canWriteScroll(), and tests cover desktop and the iOS 27 tail timer.
索引モデルが issue の本文から書いたものです。
説明
Problem
_retryClampedAdjustment repeats a compensation write that the browser clamped because the sizer was not big enough yet (#1258). It has two problems.
1. The retry can overwrite a scroll command
- A hold flush or a compensation write is clamped. The virtualizer records a retry, for example
{ target: 4850, maxAtWrite: 4800 }. - A scroll command writes. For example,
scrollToIndexwrites 550. _willUpdateorresizeItemruns before the command's read-back. The sizer is now bigger, so the retry writes 4850.
The scroll position is 4850, not the target of the command.
- This occurs on desktop and on iOS.
- On iOS 27 it occurs more often. The tail timer flushes the hold and then writes a queued command in the same task.
- It occurs only with adapters whose
notifydoes not grow the sizer synchronously. The React adapter grows it synchronously. - #1324 fixed this for a queued command:
_writeAwaitingCommandclears the retry. Other commands still have the problem.
2. The retry ignores _canWriteScroll()
The retry can write during the iOS touch tail or under a finger that drags. iOS ignores a write under a finger. On iOS 26 and earlier, a write during the tail stops the momentum.
Possible fix
- Clear
_clampedAdjustmentwhen a command starts (_startScroll), or skip the retry whilescrollState !== null. - In
_retryClampedAdjustment, return early when_canWriteScroll()is false. Keep the record for the next opportunity. - Add tests for desktop and for the iOS 27 tail timer.
Found during the review of #1324. Related: #1258, #1307.
- 主要言語
- TypeScript
- スター
- 7.1k
- フォーク
- 472
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 31
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/virtual のほかの issue
-
anchorTo: 'end' loses the end when the scroll element shrinks対応中かも @langleyd が 9 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
marko-virtual: scrollToEnd during an in-flight prepend strands the view one prepend above the bottom (chat-pretext e2e fails on CI)対応中かも @prayaggaikwad96 が 3 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
TanStack/virtual#1252 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
lit-virtual: VirtualizerController never applies updated options after construction対応中かも @waterWang が 65 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
Dynamic sizes lit demo crashes/ loads very slowly再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
TanStack/virtual#1188 · コメント 11 件 ·
メンテナーはふだん 1 日以内に返信
TanStack/virtual の issue をすべて見る
似ている issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
lingdojo/kana-dojo#32590 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug p2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bastani-inc/atomic#3703 ·
メンテナーはふだん 1 日以内に返信
-
backend bug difficulty: medium priority: medium reliability
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
trustflow-protocol/trustflow-backend#730 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
firecrawl/firecrawl-mcp-server#548 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信