Always know what is happening
Anyone using the app wants every screen to say whether it is loading, failed, empty or busy, and what to do next.

As a reader, I want every screen to tell me whether it is loading, has failed, is empty or is busy, so that I am never left looking at a blank page wondering what to do.

Situation

I use the app on trains, where the connection comes and goes. Some days I have no identity, no notifications and no agents.

What I do

    Open each tab.

    Pull down to refresh.

    Send a comment, a profile change or a server address.

    When a screen says something failed, tap "Retry".

What I should see

    A document that is loading shows a spinner. Lists in the other tabs show one quiet line: "Loading activity…", "Loading agents…", "Opening your vault…".

    A failed document shows the reason, such as "Couldn't reach the server.", with a "Retry" button on the same line.

    Agents shows a failure in red with "Retry". The inbox shows it with a "Retry" row.

    An empty place names the next step: Me says "No identity yet" and "Create one to comment and talk to agents, or import one you already have.", followed by "Create identity" and "Import identity".

    Activity with no identity says "No identity selected" with an "Open Me" button. An empty inbox says "Nothing yet" and "Replies and mentions for your identities show up here."

    Agents with nothing set up says "No agents yet" and "Configure a model provider, then create an agent to start a conversation."

    Pulling down refreshes and keeps the old content on screen while it reloads.

    While something is being sent, its button is disabled and names the work: "Posting…", "Saving…", "Checking…", "Importing…", "Opening…", "Syncing…".

    A light tap confirms a posted comment, a saved profile, a copied account ID and a change of identity or server.

    I never see another account's or another server's data presented as mine while the right data loads.

When something goes wrong

    The connection drops while I open a document: I see "Couldn't reach the server." and "Check your connection, then try again." I tap "Retry" when I am back online and the document appears.

    The discussion fails while its document loaded: the page stays readable, the section says "Couldn't reach the server." and I pull down to try again.

Not included

Trace

Story US-APP-05, 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

Honest state: loading, failure and empty

The principle: every piece of data has loading, failure and empty, and is never someone else's

The five principles

Principle 4, Honest state, quoted

Loading, failure and empty states

The five treatments and where the app is uneven

States for every screen

Loading, failure, empty and no identity strings for every screen

Refresh, haptics and progress

Pull to refresh, progress, haptics and optimistic UI

Badges, countdowns and connection status

Badges, countdowns and connection status

Shared components

Section parent: the two components every feature may use

StatusLine

The failure line with Retry used by Read and Discuss

Platform parts from exact:content

Section parent: parts taken from the framework

EmptyState

The whole-screen empty state and the rule against using it in a list

Badge

The status capsule on a run card

AgentError

The red failure line with Retry used by Agents

progress

The system spinner and the three ways the app says loading

scroll

The scroller that holds Activity's whole-screen empty states

DocDiscussionSlot

A discussion that fails while the page stays readable

Chat messages and the streaming reply

The streaming reply and its status row

Document and site home

Spinner, failure line and the empty page sentence

Activity inbox

No identity, nothing yet, loading and Retry

Agents list

Choose an identity, loading and no agents yet

Me

The empty row followed by its two actions

Implementation

Page

Part it plays

State, refresh and stale-reply patterns

Epoch counters, owner and visit checks, optimistic sends and tasks

The root contract (app.contract)

pending and failure are passed from root resources into every screen

Root declarations: Read and Discuss

readEpoch, discussEpoch and the post reply

Root declarations: Activity and Agents

activityReady, agentsReady and the error derives

Root declarations: Me, Profile, Crypto and Vault

Error derives for create, import, server, profile and vault

Shared components and visual design

StatusLine and the exact:content parts

Read: loading pages, caches and embeds

Failures become a page with an error message, never the default home

Read: sources and the refresh epoch

The refresh epoch that drops caches

Activity: sources, the ask stamp and the committed snapshot

The ask stamp and the committed snapshot

Agents: WebSocket streams as resources

Connection state reported by the streams

Discuss: loading and posting

Refresh discards late results

Contract views and built-in calls

refresh, refreshing, haptic and progress

Contract UI tests

fail fetch and pass fetch drive the failure and recovery tests

Mock notify service

Scenarios for a failing and an empty inbox

Mock agents server

Scripted failures and dropped streams

Code

File

What

ui.contract L23-31

StatusLine: message and Retry

agents.contract L139-152

AgentError: red message and Retry

read.contract L312-319

refreshing while loaded, failure line, hint and spinner

read.contract L340-342

This page is empty.

activity.contract L62-86

no identity, nothing yet, error with Retry and Loading activity…

agents.contract L192-227

Choose an identity, Loading agents…, AgentError and No agents yet

me.contract L69-77

identities failed with Retry, and the No identity yet row

app.contract L135-138

activityReady and error derives: never another account's inbox

app.contract L306-315

readRetry, readRefresh and the directory and author retries

app.contract L345-357

discussAfterPost with the success haptic

app.contract L600-604

meSwitch with the selection haptic

src/read/client.ts L12-25

getJson: Couldn't reach the server. and The server answered N.

Tests

File

What it checks

read.test.contract

"a failed load shows Retry and recovers"

open-site.test.contract

"failed site loading exposes retry and never substitutes the default home"

activity.test.contract

"activity: no identity offers Me"

activity.test.contract

"activity: service errors retry to an empty inbox"

activity.test.contract

"activity: switching identities scopes the inbox and email draft"

me.test.contract

"me: empty state offers create and import"

agents.test.contract

"failed sends keep the draft and recover without duplicate user bubbles"

agents.test.contract

"a dropped stream reconnects and recovers the offline message once"

src/read/__tests__/load.test.ts

refresh epochs per server, redirects and retryable failures

src/activity/__tests__/activity.test.ts

"malformed snapshots are failures, not empty inboxes"

src/discuss/__tests__/load.test.ts

refresh discards late results

Delivery

Delivered by #1470.

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

Unsubscribe anytime

Connections0
Linked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkLinked document · Outgoing linkAlways know what is happeningAlways know what is happe…
Citations 0Children & links 44

Loading child documents…

Connections show where other documents or comments link to this document.

Related documents

Loading connections…