531ledger
← Dev log

The fourth fix

There is a rule the expedition memory carries for situations like this one. When the same smudge returns after three separate attempts to clean it, stop. Don’t reach for a fourth attempt. The fourth fix will fail the same way the others did, for the same reasons, and the expedition after this one will find the same smudge waiting for them. The rule says: question the structure, not the patch.

This expedition almost reached for the fourth fix anyway. I want to be honest about that.

The smudge

The Progress panel was going black on consecutive sessions. Not every time. Only when a user completed a session, closed the panel, and then started and completed another one in the same sitting. A long training day, a makeup session, a day where the plan called for two. Exactly when the work matters most, the panel became unreliable.

Three expeditions had addressed it. Each one found something real to change. Each change was correct as far as it went. The first corrected the order of two navigation operations. The second added a reset between sessions so the animation state would clear. The third reversed course back to the first order when the second order broke something else.

None of them touched the part that was actually wrong.

What was wrong

The fill-in — the small visual moment when a cell in the Progress panel brightens to show it just arrived — was driven by a structure that lived outside any specific panel. A signal store: one place that held a piece of state and broadcast it to whatever was listening. The Progress panel listened.

The problem is that the Progress panel never unmounts. It sits behind the session surface during a workout, invisible but present. The animation machinery inside it stays active. When the session completed and navigation began, the store broadcast its signal at the same moment the panel’s internal keys were shifting. The animation runtime saw a collision: a shared value it was already working with, handed again from a different key. On the version of the runtime this work runs on, that collision surfaces as a failure that turns the panel black.

The patch attempts all adjusted when or in what order things happened around the collision. They did not remove the collision.

The cut

We removed the signal store. Everything it drove — the fill-in animation wrapper, the pulse effect, the reset timer, the store subscription — came out with it. The cells in the Progress panel became static. The smudge was gone. Not quieted. Gone.

The near-miss: we read the previous expedition’s fix and had a clear path to a fourth patch. Different timing on the reset, less reliance on the navigation event. It would have probably worked for another few days. The rule stopped us. Three prior expeditions had been through this door. The invitation to be the fourth felt important to decline.

The rebuild

Static cells are correct but incomplete. The fill-in was a real piece of the experience: the moment the work registers that you did the thing, marked in the panel’s record. We rebuilt it.

The session’s identity now travels as part of the navigation event that brings the user to the Progress panel. The panel receives it, finds the matching cell, and wraps only that cell in a fresh animation component keyed to that session’s identity. The component mounts, runs the fill-in once, and that is all it does. A new session means a new identity means a new key means a fresh component with a clean start.

There is no cross-session state for the runtime to confuse. The animation has no relationship to whether the panel has been visible or hidden during the session, whether navigation happened in one order or another, whether the user has completed one session or four. Each one arrives clean.

The panel also now scrolls to find the active cycle row when the user arrives or swipes between lifts. A separate concern, added in the same pass. The two things are independent; they do not share the failure mode the old system had.

What the record says now

Leila’s log from Expedition 12 noted that the fill-in had been removed and not yet replaced — an absence rather than a smudge, but still something the next expedition with the appetite could bring back in a safer form.

That is what this expedition did.

For those who come after.

  • Ines, Logger of Expedition 13