Have the app stay fast and responsive
Anyone using the app wants it to open at once and never freeze, whatever the size of their documents, vault or conversations.

As a reader, I want the app to open at once and never freeze, so that I can scroll, type and go back at any moment, even while it is working.

Situation

I open the app many times a day. Some of what I have is large: a vault with dozens of identities, an agent conversation that has run for hours.

What I do

    Tap the app's icon.

    Scroll, tap and switch tabs while a page is still loading.

    Create or import an identity, or connect a vault with many identities.

    Open a long agent conversation.

What I should see

    The first screen is drawn straight away with its title and tab bar, then the content arrives.

    While a page loads I can still scroll, go back and switch tabs. Nothing blocks the screen.

    A loaded page stays on screen while it refreshes.

    Creating or importing an identity does not freeze the phone. Its button reads "Importing…" until it is done.

    Connecting or syncing a vault with dozens of identities finishes, and I can keep using the app while it runs.

    A long agent conversation opens and scrolls like a short one.

    My own message appears in the conversation the moment I send it.

    Activity and Agents only fetch while their tab is showing, and the vault only syncs while the app is on screen.

    A request that gets no answer gives up with a message instead of waiting for ever: reading a page stops after 15 seconds.

    An answer that arrives after I have moved on is discarded. It never replaces what I am looking at now.

When something goes wrong

    A server is slow: the spinner or the loading line stays for up to the time limit, then I see the failure line with "Retry". I tap it, or pull down.

    A piece of work would take the phone too long in one go: the app refuses it and the screen shows a failure, never a frozen screen. I retry. The team treats this as a defect, see Trust that a change is safe.

Not included

    The limit on one piece of work exists only on iOS. Browser and command line tests cannot see it, so a change must be tried at real size on iOS. See The 100 ms turn budget.

    Requests to the agent server have no time limit of their own. See Current limits and known gaps.

    The inbox loads at most 400 notifications and query lists 50 results, with no paging.

    No start-up or scrolling measurements are recorded.

Trace

Story US-APP-08, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.

Design

Page

Part it plays

How the framework shaped the design

Pure screens and the limits of the framework that the design absorbed

Honest state: loading, failure and empty

Never stale, never someone else's

Refresh, haptics and progress

Old content stays during refresh; the optimistic message

Loading, failure and empty states

A running request never blocks the screen

The four tabs

Activity and Agents load only when shown

list and section

The native list behind the reading column and the transcript

progress

The spinner shown on a first load

Chat messages and the streaming reply

The optimistic bubble and the streaming reply

Session timeline

The long transcript

Connect vault sheet

The connection that must finish at real size

Implementation

Page

Part it plays

The 100 ms turn budget

The rule that refuses a turn over 100 ms on device, and guidance for new code

Where the app yields for the turn budget

Every place the app yields, and the vault connect failure

The data module runtime (Hermes)

Where the data module runs and how the code adapts

The Exact framework

Constant data baked into the plan so the first frame needs no JavaScript

Architecture at a glance

Build time, run time and the life of one request

The data module (app.ts)

The answer dispatcher every request goes through

State, refresh and stale-reply patterns

Stale replies discarded, clocks kept out of sources, visibility-gated polling

Crypto: primitives and key derivation

Key derivation that yields every 64 rounds

Crypto: vault envelope and state codec

Account ids derived one per turn and cached

Vault: connect ceremony

Connect split into phases, each its own turn

Vault: API and sync

Sync split into the same phases

Vault: the store and on-device format

One yield per account while publishing keys

Agents: chat rows and run cards

Linear joining of tool calls to results

Profile: editing name and summary

A yield between reading history and signing

Read: loading pages, caches and embeds

Caches and the 15 second deadline

Real vault compatibility suite

The race harness on real platform time

Simulators and devices

Real-time checks on a simulator

Current limits and known gaps

The turn budget, the missing agents deadline and list caps

Code

File

What

src/crypto/primitives.ts L41-77

keyPairFromMnemonicAsync and yieldCryptoTurn

src/crypto/state-codec.ts L47-72

warmAccountIds and the reason for it

src/vault/connect.ts L235-260

connect phases, each its own turn

src/vault/sync.ts L86-123

sync phases with yields

src/read/client.ts L10-18

15 second deadline and the failure sentence

app.contract L85-85

readSiteReplyCurrent: a late reply is ignored

app.contract L132-146

Activity asks only while its tab is active

app.contract L178-178

agentsVisibleOptimistic: the optimistic bubble

app.contract L261-268

vault polling and sync gated on visibility

app.contract L88-91

the minute clock for relative dates

app.contract L103-105

resources that keep the previous answer while asking again

Tests

File

What it checks

src/agents/__tests__/review.test.ts

"joining tool results stays linear for long sessions (Hermes 100 ms turn budget)"

crypto.test.contract

"crypto vectors run inside the host runtime"

open-site.test.contract

"a submitted revision cannot apply to an edited or reopened form with identical text"

activity.test.contract

"activity: a minute on the inbox signs one request"

agents.test.contract

"read clocks advance on an idle session without reopening any stream"

discuss.test.contract

"discuss: comment times are relative and follow the clock"

src/discuss/__tests__/load.test.ts

refresh discards late results

src/me/__tests__/sources.test.ts

request deadlines and concurrent imports

.tests/real-vault/race.ts

the built app completes a real approval on real platform time

Delivery

Delivered by #1470.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime