Lunch · today
Alive States · prototype & toolkit
Honest feedback for interfaces.
Alive States keeps track of what is true in an interface: what the server confirmed, what is still in flight and what failed. It never shows a request as saved before the server says so.
Try it
The same save, handled twice.
Change the calories and save. On the left, a skeleton: the number disappears until the server answers. On the right, Alive States: your change shows at once, marked as not yet confirmed, and LavaMorphism shows what is true. Make the network slow, make it fail, go offline, and run it a few times: what it learns changes when it speaks up.
Skeleton
Alive States + LavaMorphism
Lunch · today
Chicken bowl
640 kcal
- Phase
- cached
- Shown
- —
- Last confirmed
- —
- Your input
- —
- Stays quiet
- —
- Slow
- —
- Learned from
- nothing yet
Every card, its own physics
The material is the data.
It is not a spinner. Where the liquid starts is where you touched. How fast it flows is how long this action usually takes, learned and never invented. It is heavier when the action is sensitive. What is confirmed is solid, what is not yet is liquid, and the offline queue is a pool you can see. Each kind of card moves in its own way.
Meal · the rim
Chicken bowl
640 kcal
Latest confirmed data
Water · the level
1250 ml
Confirmed is solid, the rest is liquid
Sets · one drop each
Bench press
- Set 1 · 80 × 8
- Set 2 · 80 × 8
- Set 3 · 80 × 8
Nothing waiting
What it decides
Three things shape the feedback.
The same action can deserve a different response depending on how long it usually takes, whether the device is online, and how much a mistake would cost.
-
Latency
Quiet when it is fast
It learns how long reads and saves usually take, separately for each. An answer that arrives quickly gets no ceremony. A slow one gets visible feedback, then context, then a way to stop waiting.
-
Connection
Offline is a state
It reads online and offline status and slow-connection hints when the browser offers them. Work done offline is kept on the device and marked as waiting. It is not dropped or reported as saved.
-
Risk
Sensitive means explicit
A reversible action may show its new value at once, marked as unconfirmed. A sensitive action waits for explicit confirmation and keeps the last confirmed value until the server answers.
The lifecycle
Alive States decides. LavaMorphism shows it.
Alive States is the single source of truth for data and operations. LavaMorphism never decides an outcome: its surfaces only react to the phase Alive States reports.
| Phase | What it means | LavaMorphism shows |
|---|---|---|
| unavailable | No data yet. Nothing is invented. | Idle. Matte obsidian. |
| cached | The last confirmed data, from an earlier read. | Idle. Obsidian at rest. |
| fresh | Just read from the source. | Settled. Obsidian. |
| optimistic | A save is in flight and the new value is visible, marked unconfirmed. | Pending. Mercury flows out from where you acted. |
| syncing | A save is in flight and the confirmed value stays visible. | Pending. Mercury, with the confirmed value in place. |
| offline | No connection. The work is kept on the device. | Queued. Mercury pools and waits. |
| confirmed | The server confirmed. | Ember sweeps across for about a second, then obsidian. |
| failed | The server refused. The confirmed value returns and the draft is kept. | Failed. Mercury drains away. |
Past the usual time for that action, a pending phase becomes slow and the mercury stalls. If two versions disagree, the front wavers halfway until you choose one.
Where it runs
Used in a real app.
In BetterGains, editing the calories of a logged meal runs on Alive States: the card keeps its identity, the draft stays apart from the confirmed value, and a rejected or stale response cannot overwrite what you typed.
Its loading states run on it too: what is known stays on screen, a fast load draws nothing, and a slow one is measured against how long that screen usually takes. The same engine powers the demo above.
Try the same logic in the labThe engine
One shared engine, no framework
The earlier SDK is now part of one engine: a reducer and an adaptive plan, haptics and sound, device signals, one motion curve, render tiers, and a parity test that fails if two copies drift apart. It is plain JavaScript. The core takes plain events:
let state = initialState(lastConfirmed)
state = aliveReducer(state, {
type: 'WRITE', id, next,
optimistic: risk !== 'high',
})
// only after a validated, successful response:
state = aliveReducer(state, {
type: 'RESOLVE', id, data: serverData,
})
// or let one lifecycle do both, and feel it:
const flow = createWriteFlow({
initial, send, onChange,
onFeel: createFeel().play,
})
Commercial purchases are temporarily locked · Preview the developer licenses →
BetterGains and ClickSort receive the engine as a vendored copy, checked by file hashes and by the parity test. Haptics are on by default and sound is off; both stop under reduced motion. iPhone browsers cannot vibrate, so haptics are felt on Android in the browser and natively in the BetterGains app.