Repository navigation
Conversation
CachedRow sent its kept node in full every frame, so with EDGE's subtree reuse on, a list whose rows are kept still went out whole whenever any row changed. It now builds a row against no hashes, so the kept node is always whole, and sends it the way EDGE's own walk sends a node: a reuse marker for any part the phone holds by id and hash, the rest in full. Nothing changes while a screen sets $forceFullFrames, because the hashes start empty every frame there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Log sent every frame in full because EDGE's subtree reuse could refer to rows the phone never got, which drew the list blank after a pull to refresh. That is fixed in nativephp/mobile by NativePHP/mobile-air#699: the reader parses every frame instead of dropping some, a row's id is part of its hash, and a reader that still can't build a frame asks PHP for a full one. With that, a star on a 60 commit Log sends about 9 KB instead of 530 KB. This needs that fix. On mobile-air 4.8.0 without it, the Log goes blank again, so the new test skips itself there. The test replays every frame the way the phone's reader does and checks the result against a full frame after each step: a star, a thread, the next page, new commits on top, back to the top, a delete from the middle, the pill, the image viewer and a swipe to another log and back. The other screens that set the flag no longer point at the Log's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A profile went in full so that a tab tapped again, which puts the same rows in a list with a new key, still reached the phone. With a row's id in its hash (NativePHP/mobile-air#699), the new list no longer matches the old one, so it is sent as it should be. The test covers a star, a thread, the tab tapped again, and a swipe to Replies and back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An organization's page is built like a profile's and went in full for the same reason: a tab tapped again puts the same rows in a list with a new key. That reaches the phone now (NativePHP/mobile-air#699). The test covers a star, a thread, the tab tapped again, and a swipe to Mentions and back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tap into the reply field mounts the thread's scroll view again under a new key, and subtree reuse then pointed at rows the phone had dropped, so the thread went blank as you started typing. The new key now changes the scroll view's hash (NativePHP/mobile-air#699), so it goes out whole, and each letter typed after that sends only the reply bar. The test opens the earlier commits and the replies, taps into the field twice, and types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starred went in full because rows leave its list from the middle. The rows are keyed, so the frame after an unstar refers to the rows that stay by id, and with the reader parsing every frame (NativePHP/mobile-air#699) the phone has all of them. The test unstars rows from the middle and the top, with a thread open under one of them, and pulls to refresh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Notifications went in full for the same reason as the Log: subtree reuse could refer to rows the phone never got and draw the list blank. Those were frames the phone's reader dropped, which it no longer does (NativePHP/mobile-air#699). The test opens a group, brings two new notifications in on top, loads the next page, closes the group and turns every kind back on, which puts the list under a new key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remotes went in full because a conversation with a new message moves to the top. Its rows are keyed, so the move refers to them by id, and the tab tapped again now reaches the phone as a new list (NativePHP/mobile-air#699). The test moves two conversations to the top from the middle and lower down, taps the tab again, swipes to Fetched and back, and checks the order the phone ends up with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Search went in full because a new term replaces every row. New rows are new ids, which go out in full anyway, and rows a term shares with the last one are referred to by id, which the phone now always holds (NativePHP/mobile-air#699). The test picks a term, types more of it, switches to a term with the same commits in another order, goes back, and clears the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A thread went in full because messages come in at the bottom and their reactions change in place. Both are ordinary changes to keyed rows, and the frames that carried them are no longer dropped by the phone's reader (NativePHP/mobile-air#699). The test polls in a message and a reaction, types, hearts a message, replies and sends, loads older messages above, and polls again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #178's HEAD@{last visit} band. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every timeline screen set
$forceFullFrames, so each frame went to the phone whole: about 200 KB on a Log of 20 commits and 530 KB with 60, even for a star. This turns that off, one commit per screen, so any one can be reverted on its own.This needs NativePHP/mobile-air#699 and NativePHP/mobile-air#730. On mobile-air 4.8.0 as this app locks it (
c0da5d7), partial frames bring the blank Log back. In a scripted session on an iOS 27 simulator the reader met 261 reuse markers for nodes it never got: the Log went blank on Following and on Latest, and the commit page's thread went blank as soon as typing started. On an Android 15 emulator there were 266, and the Log went blank. With both PRs in vendor there were none on either. Merge this once composer.lock has a mobile-air with both. Until then the new tests skip themselves, so CI stays green on 4.8.0.What changed
CachedRowsent a kept row in full every frame. It now builds the row against no hashes, so the kept node is always whole, and sends it the way EDGE's own walk does: a reuse marker for any part the phone holds by id and hash, the rest in full. Nothing changes while a screen keeps$forceFullFrames.tests/Feature/Screens/PartialFramesTest.phpreplays every frame a screen publishes the way the phone's reader does, fails on a marker for a node the phone doesn't hold, and after each step checks the phone's tree against a full frame. Each screen's case walks through what used to draw it blank. Run against 4.8.0's PHP with the skip taken out, the Log, profile, organization, commit page and Remotes cases fail at their re-key steps (back to the top, a tab tapped again, the reply field). Starred, Notifications, Search and the thread pass there too: their blank lists came from the reader dropping frames, which only a phone shows.Numbers
Same data and same build, before being
$forceFullFramesswitched back on at run time. Size is what the phone's reader got, and shadow thread is its parse and diff.iOS 27 simulator, devnull's timing script, medians of 3 runs:
A star is two frames, the star at once and then devnull's answer.
Mac, PHP only, the timeline bench from #187 (medians of 11 repetitions). KB is JSON of the frames published, and full is nodes sent in full rather than as markers:
On the Android 15 emulator, a star on the Log went from 7,568 nodes to 304 and its shadow thread time from 28 ms to 5, and a star with 60 commits from 2,763 nodes to 96 and 10 ms to 1 (logcat only gives whole milliseconds).
PHP time per frame doesn't change much: the rows were already kept (#187), and a marker costs about what a kept node did. The win is on the wire and on the phone's shadow thread, which drops from 16 to 32 ms a frame to 1 to 3 ms with the mobile-air PR's diff change. The main thread time didn't change measurably on the simulator.
Worth checking
TestableComponent::tap()andassertSee()read the frame PHP built, which now has markers for unchanged rows. OnlyPartialFramesTestturns reuse on, so the rest of the suite is unaffected, but a future test that does needscall()to reach a row.Screenshots
The screens draw the same. The torture runs above were checked in light and dark mode on both platforms.
🤖 Generated with Claude Code