Brennan Benson
80246238fc
fix(mobile): reset recycled paragraph layout before reuse ( #16692 )
...
* fix(mobile): quantize chat pinch font scale so a zoom stops re-measuring the list every frame
A user bubble on a 390pt iPhone painted five lines inside a frame that
reserved six, with the last painted line cut through a glyph at the content
edge and "no longer needed." gone.
The paint is React Native's: a `<Text>` with no `numberOfLines` gets a text
container whose `lineBreakMode` is `NSLineBreakByClipping`
(RCTTextLayoutManager.mm). Measure lays out into `{width, CGFLOAT_MAX}`, paint
lays out into the mounted content frame — so a frame one line short does not
re-wrap, it dumps the remainder onto the last fitting line and clips it, with
no ellipsis. Reproduced on-device against the real component with the message
text held constant, so five painted lines can only be truncation.
Two conditions are each necessary, and removing either makes it vanish over
~6000 measured bubble renders: a pooled `RCTParagraphComponentView` carrying a
shorter row's content frame (`prepareForRecycle` clears `state` but not
`_textView.layoutMetrics`), and whole-list re-measure churn while rows enter
and leave that pool.
The churn was ours. `renderItem` closes over `fontScale`, and the pinch handler
committed a new scale on every gesture frame, so one zoom drove hundreds of
full-list re-measures. The pinch is composed `Simultaneous` with the list's own
scroll, so a stray second finger during a scroll started that storm at scales
the user cannot see — matching the report, whose glyph metrics are `fontScale`
1.0 exactly.
`quantizeFontScale` snaps commits to a 5% grid. React bails out of a same-value
`setState`, so gesture noise now commits nothing and a full-range pinch commits
at most ~20 times. Under the churn that produced 67 defects in 6636 bubble
renders, the quantized build measured 0 in 6064 — with a forced-defect control
bubble flagged in 100% of frames of both runs to prove the detector was live.
This removes the trigger we own; it does not close the RN recycling window
itself. That needs a one-line reset in `prepareForRecycle`, which cannot land
here without refreshing the `patchedDependencies` hash under `mobile/`.
* fix(mobile): reset recycled paragraph layout before reuse
2026-08-26 19:17:31 -07:00
..
2026-08-17 18:26:52 -07:00
2026-08-17 18:26:52 -07:00
2026-08-23 02:26:52 -07:00
2026-08-14 10:22:55 -07:00
2026-08-13 03:01:45 -07:00
2026-07-28 15:18:07 -07:00
2026-07-20 21:05:40 -07:00
2026-07-20 21:05:40 -07:00
2026-08-13 22:48:24 -07:00
2026-07-20 18:55:45 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-05 11:31:11 -07:00
2026-08-13 22:48:24 -07:00
2026-07-31 14:03:35 -07:00
2026-08-13 22:48:24 -07:00
2026-07-30 12:58:24 -07:00
2026-07-30 12:58:24 -07:00
2026-08-11 13:08:50 -07:00
2026-08-11 13:08:50 -07:00
2026-06-15 22:02:51 -07:00
2026-06-15 22:02:51 -07:00
2026-08-22 09:51:23 -07:00
2026-07-31 01:54:09 -07:00
2026-07-31 01:54:09 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-06-13 14:24:26 -07:00
2026-06-13 14:24:26 -07:00
2026-05-31 03:14:29 -07:00
2026-05-31 03:14:29 -07:00
2026-08-14 00:24:57 -07:00
2026-08-14 00:24:57 -07:00
2026-06-29 22:30:46 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-06-17 22:52:12 -07:00
2026-06-13 14:24:26 -07:00
2026-08-13 22:48:24 -07:00
2026-06-13 14:24:26 -07:00
2026-08-13 22:48:24 -07:00
2026-07-30 13:30:07 -07:00
2026-07-30 13:30:07 -07:00
2026-06-08 17:41:27 -07:00
2026-08-04 18:46:36 -07:00
2026-08-13 01:12:19 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-07-31 01:54:09 -07:00
2026-07-31 01:54:09 -07:00
2026-08-05 13:23:29 -07:00
2026-08-05 13:23:29 -07:00
2026-06-16 14:39:25 -07:00
2026-06-16 14:39:25 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-08-09 19:25:28 -07:00
2026-08-04 19:34:17 -07:00
2026-08-04 19:34:17 -07:00
2026-08-26 12:38:59 -07:00
2026-08-09 19:25:28 -07:00
2026-08-09 19:25:28 -07:00
2026-08-13 01:18:08 -07:00
2026-08-13 01:18:08 -07:00
2026-08-07 00:58:29 -07:00
2026-08-07 00:58:29 -07:00
2026-08-05 13:23:29 -07:00
2026-08-05 13:23:29 -07:00
2026-07-23 13:25:50 -07:00
2026-07-23 13:25:50 -07:00
2026-08-05 13:23:29 -07:00
2026-07-30 11:08:56 -07:00
2026-08-13 01:18:08 -07:00
2026-08-09 19:25:28 -07:00
2026-08-09 19:25:28 -07:00
2026-08-10 16:09:17 -07:00
2026-07-16 13:26:15 -07:00
2026-08-26 19:17:31 -07:00
2026-08-09 19:25:28 -07:00
2026-08-13 01:12:19 -07:00
2026-08-04 15:46:08 -07:00
2026-08-17 01:11:24 -07:00
2026-08-17 01:11:24 -07:00
2026-08-25 15:47:40 -07:00
2026-08-25 15:47:40 -07:00
2026-08-25 15:47:40 -07:00
2026-08-17 01:11:24 -07:00
2026-08-09 18:31:00 -07:00
2026-08-04 13:01:39 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-08-26 17:02:09 -07:00
2026-08-26 17:02:09 -07:00
2026-07-23 13:25:50 -07:00
2026-08-04 19:34:17 -07:00
2026-08-10 16:09:17 -07:00
2026-08-25 15:47:40 -07:00
2026-08-25 15:47:40 -07:00
2026-08-04 19:34:17 -07:00
2026-07-24 23:10:13 -07:00
2026-07-26 22:08:38 -07:00
2026-08-25 15:06:47 -07:00
2026-08-25 15:06:47 -07:00
2026-08-04 12:36:07 -07:00
2026-08-04 12:36:07 -07:00
2026-08-13 00:07:28 -07:00
2026-08-13 00:07:28 -07:00
2026-08-04 13:01:39 -07:00
2026-08-04 13:01:39 -07:00
2026-07-17 00:34:46 -07:00
2026-08-09 19:25:28 -07:00
2026-07-16 13:26:15 -07:00
2026-07-20 21:05:40 -07:00
2026-07-20 21:05:40 -07:00
2026-05-29 22:13:27 -04:00
2026-08-13 22:48:24 -07:00
2026-06-17 22:52:12 -07:00
2026-06-17 22:52:12 -07:00
2026-08-13 22:48:24 -07:00
2026-08-02 15:53:06 -07:00
2026-05-31 03:11:53 -07:00
2026-05-31 03:11:53 -07:00
2026-08-02 15:53:06 -07:00
2026-07-31 00:39:44 -07:00
2026-08-02 15:53:06 -07:00
2026-08-11 13:08:50 -07:00
2026-07-30 13:59:50 -07:00
2026-07-30 13:59:50 -07:00
2026-08-17 18:26:52 -07:00
2026-08-24 23:50:10 -07:00
2026-08-04 16:06:37 -07:00
2026-08-16 17:00:49 -07:00
2026-08-02 15:53:06 -07:00
2026-08-05 01:28:07 -07:00
2026-08-05 01:28:07 -07:00
2026-07-23 19:01:04 -07:00
2026-07-23 19:01:04 -07:00
2026-08-16 17:00:49 -07:00
2026-08-16 17:00:49 -07:00
2026-08-22 09:51:23 -07:00
2026-08-22 09:51:23 -07:00
2026-07-30 12:59:16 -07:00
2026-07-30 12:59:16 -07:00
2026-07-23 18:35:31 -07:00
2026-08-03 17:55:30 -07:00
2026-07-26 22:08:38 -07:00
2026-07-26 22:08:38 -07:00
2026-07-30 11:08:56 -07:00
2026-07-30 11:08:56 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-03 17:55:30 -07:00
2026-08-03 17:55:30 -07:00
2026-07-16 13:26:15 -07:00
2026-08-02 15:53:06 -07:00
2026-08-11 13:08:50 -07:00
2026-08-11 13:08:50 -07:00
2026-08-09 19:25:28 -07:00
2026-08-17 01:11:24 -07:00
2026-08-17 01:11:24 -07:00
2026-08-04 19:34:17 -07:00
2026-08-09 19:25:28 -07:00
2026-08-10 16:09:17 -07:00
2026-08-09 18:31:00 -07:00
2026-08-05 13:23:29 -07:00
2026-08-09 18:31:00 -07:00
2026-07-16 13:26:15 -07:00
2026-07-16 13:26:15 -07:00
2026-08-09 18:31:00 -07:00
2026-08-04 19:34:17 -07:00
2026-08-04 19:34:17 -07:00
2026-08-10 16:09:17 -07:00
2026-08-26 17:02:09 -07:00
2026-08-02 15:53:06 -07:00
2026-07-10 13:48:10 -07:00
2026-06-28 01:20:00 -07:00
2026-08-08 19:06:50 -07:00
2026-06-29 22:30:46 -07:00
2026-06-29 22:30:46 -07:00
2026-06-17 22:52:12 -07:00
2026-06-17 22:52:12 -07:00
2026-08-16 17:00:49 -07:00
2026-08-16 17:00:49 -07:00
2026-08-16 17:00:49 -07:00
2026-08-16 17:00:49 -07:00
2026-08-13 22:48:24 -07:00
2026-07-23 18:35:31 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 03:01:45 -07:00
2026-08-13 03:01:45 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-06-17 22:52:12 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-07-22 14:18:59 -07:00
2026-07-19 23:42:31 -07:00
2026-08-13 22:48:24 -07:00
2026-08-11 01:06:03 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-02 15:53:06 -07:00
2026-07-10 13:48:10 -07:00
2026-07-10 13:48:10 -07:00
2026-07-14 19:36:47 -07:00
2026-07-14 19:36:47 -07:00
2026-07-20 11:11:23 -07:00
2026-07-20 11:11:23 -07:00
2026-07-09 19:23:36 -07:00
2026-08-04 19:47:39 -07:00
2026-06-12 11:09:08 -07:00
2026-06-12 11:09:08 -07:00
2026-07-11 02:13:15 -07:00
2026-08-09 18:31:00 -07:00
2026-07-30 12:58:24 -07:00
2026-08-09 18:31:00 -07:00
2026-08-13 20:44:16 -07:00
2026-08-09 18:31:00 -07:00
2026-08-04 19:47:39 -07:00
2026-08-09 18:31:00 -07:00
2026-07-16 13:26:15 -07:00
2026-08-09 18:31:00 -07:00
2026-07-17 00:34:46 -07:00
2026-08-13 22:48:24 -07:00
2026-08-09 18:31:00 -07:00
2026-08-13 22:48:24 -07:00
2026-08-09 18:31:00 -07:00
2026-08-04 19:47:39 -07:00
2026-06-13 14:24:26 -07:00
2026-06-13 14:24:26 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-06-17 22:52:12 -07:00
2026-08-13 01:12:19 -07:00
2026-08-13 01:12:19 -07:00
2026-07-02 02:31:19 -07:00
2026-08-09 19:25:28 -07:00
2026-08-09 19:25:28 -07:00
2026-08-09 19:25:28 -07:00
2026-08-09 19:25:28 -07:00
2026-07-26 22:08:38 -07:00
2026-08-25 15:47:40 -07:00
2026-08-24 15:24:32 -07:00
2026-08-26 17:02:09 -07:00
2026-08-17 01:11:24 -07:00
2026-08-17 01:11:24 -07:00
2026-08-17 01:11:24 -07:00
2026-08-09 18:31:00 -07:00
2026-07-23 18:35:31 -07:00
2026-08-09 18:31:00 -07:00
2026-08-05 13:23:29 -07:00
2026-08-09 18:31:00 -07:00
2026-07-26 22:08:38 -07:00
2026-07-30 11:08:56 -07:00
2026-08-25 15:47:40 -07:00
2026-08-25 15:47:40 -07:00
2026-08-26 19:17:31 -07:00
2026-08-26 19:17:31 -07:00
2026-08-05 18:06:36 -07:00
2026-08-09 19:25:28 -07:00
2026-08-09 18:31:00 -07:00
2026-07-20 21:05:40 -07:00
2026-08-09 18:31:00 -07:00
2026-07-26 22:08:38 -07:00
2026-08-10 20:03:48 -07:00
2026-08-10 20:03:48 -07:00
2026-08-25 15:06:47 -07:00
2026-08-25 15:06:47 -07:00
2026-08-09 18:31:00 -07:00
2026-07-26 22:08:38 -07:00
2026-08-04 12:36:07 -07:00
2026-08-13 00:07:28 -07:00
2026-08-13 00:07:28 -07:00
2026-07-20 18:55:45 -07:00
2026-06-17 22:52:12 -07:00
2026-06-17 22:52:12 -07:00
2026-06-27 18:34:58 -07:00
2026-07-09 19:23:36 -07:00
2026-08-13 22:48:24 -07:00
2026-07-09 19:23:36 -07:00
2026-08-13 22:48:24 -07:00
2026-07-20 03:18:35 -07:00
2026-06-17 22:52:12 -07:00
2026-07-30 11:08:56 -07:00
2026-07-26 22:08:38 -07:00
2026-08-09 18:31:00 -07:00
2026-08-16 17:00:49 -07:00
2026-08-09 18:31:00 -07:00
2026-07-17 00:34:46 -07:00
2026-07-10 20:22:16 -07:00
2026-08-09 18:30:44 -07:00
2026-08-04 16:06:37 -07:00
2026-07-27 20:54:02 -07:00
2026-08-13 22:48:24 -07:00
2026-08-13 22:48:24 -07:00
2026-08-09 18:31:00 -07:00
2026-07-02 23:22:30 -07:00
2026-08-09 18:31:00 -07:00
2026-07-16 13:26:15 -07:00
2026-06-20 16:40:34 -07:00
2026-06-20 16:40:34 -07:00
2026-06-09 17:55:20 -07:00