diff --git a/app/NativeComponents/CommitDetail.php b/app/NativeComponents/CommitDetail.php index 2cb4102e..63ea32cf 100644 --- a/app/NativeComponents/CommitDetail.php +++ b/app/NativeComponents/CommitDetail.php @@ -102,6 +102,15 @@ class CommitDetail extends NativeComponent */ public int $scrollKey = 0; + /** + * Every frame goes in full, as on the Log (see Log::$forceFullFrames). A + * tap on the reply field mounts the thread's scroll view again under a new + * key, and EDGE's subtree reuse sent its unchanged rows as references to + * nodes the phone dropped with the old one, so the thread went blank as + * you started typing. + */ + protected bool $forceFullFrames = true; + public function mount(): void { $this->focusReply = $this->data('reply', false) === true; diff --git a/tests/Feature/Screens/LogsTest.php b/tests/Feature/Screens/LogsTest.php index 57f87a33..7bf41645 100644 --- a/tests/Feature/Screens/LogsTest.php +++ b/tests/Feature/Screens/LogsTest.php @@ -2,6 +2,7 @@ use App\Devnull\Client; use App\Devnull\Timeline; +use App\NativeComponents\CommitDetail; use App\NativeComponents\Log; use App\NativeComponents\Notifications; use App\NativeComponents\Profile; @@ -311,10 +312,10 @@ function ada(): array ->and(nodeByRef($screen, 'commit-c1')['id'])->toBe($row); }); -it('sends the Log, Notifications and profiles in full every frame, as EDGE advises for lists that change often', function () { +it('sends the Log, Notifications, profiles and commit pages in full every frame, as EDGE advises for lists that change often', function () { Http::fake(['devnull.test/*' => Http::response(pageJson([]))]); - foreach ([Log::class, Notifications::class, Profile::class] as $screen) { + foreach ([Log::class, Notifications::class, Profile::class, CommitDetail::class] as $screen) { $instance = Native::test($screen)->instance(); expect((fn (): bool => $this->forceFullFrames)->call($instance))->toBeTrue();