Technology

Engineering record

Screens and nativeIn use

Managing screen transitions in one place

To show the departing screen briefly, we kept adding timers and conditions. Before fixing the motion, we first looked at how many places were deciding the same screen.

When we close a screen, the engine's state has already changed, but the screen has to disappear briefly in its previous form. So we held on to the previous value, made timers and added conditions. When the motion was off, we fixed it up with yet another value. But the more we fixed the animation, the harder it became to tell what the screen should be showing.

The problem wasn't only the motion. The engine, the whole screen and the small components each judged the same screen separately. One place can see it as already closed while another sees it as still open. Matching the motion better can't make different judgments into one.

In October too, we reduced the places that decide screen transitions to three. In between, we reverted an attempt to change the screen the instant a button was pressed, and the reason isn't recorded. Back then we looked at who starts the motion. This time we divide up, together, who decides a screen's composition and who shows the departing screen.

Facts and presentation have different lifespans

The engine owns only the product's facts, and the screen decides how to show them. A screen's composition is decided in only one place. When a screen disappears, the part in charge of the transition holds its last appearance unchanged. We can't delay the time at which a product fact changes just because a screen needs time to disappear.

We also looked at Google's app architecture, Slack Circuit and React's state management. We took the principles as reference but didn't bring in a new framework. Moving the engine's screen state to TypeScript wasn't the answer either. State we don't need should be deleted, not moved. If we gathered every query into one big Presenter, the scattered judgments would just pile up in one big place. We also deleted all 28 places of code that held on to departing screens.

In the release build on an iPhone 18 Pro simulator (120Hz), all 13 regression items were resolved. When we switched the workout mode, the first change on the new home appeared 45 to 87 ms later. We can't measure the moment of the tap directly, so this is measured with the first frame that changed after the tap as 0. So we can't call it the time from when the finger touched.

Some parts aren't finished. The haptics settings screen still has animations moving on different timings. We couldn't get to the in-workout screen this time, and we checked only on the iOS simulator. Setting up one principle doesn't make every screen follow it on its own.

Written from that day’s point of view, using the documents and change history of the time. Published 2026.12.01.