Open the app to my site's home
A reader opens the app and lands on the home document of their Seed server, ready to read, with nothing to set up first.

As a reader, I want to open the app and land on my site's home document, so that I can start reading at once, without setting anything up.

Situation

I have installed Seed on my iPhone. I may never have chosen a server, in which case the app reads from hyper.media, or I chose one earlier in Me. I do not need an identity to read.

What I do

    Open Seed from the home screen.

    Wait a moment for the home document to load.

    Read, scroll, or tap anything on the page to go further.

    Tap Read in the tab bar whenever I want to come back to where I was reading.

What I should see

    The app opens on the Read tab, on the home document of my server. On a new install that is the home of hyper.media, titled "Hypermedia".

    The document's name is shown as a large title at the top and moves into the bar when I scroll.

    The home has no Back button: it is the bottom of the Read tab.

    Until the page arrives the title reads "Seed", a spinner shows in the middle, and the bar offers only "Open site".

    Once loaded, the bar offers "Open site", Directory, Discussion and Share.

    Under the title come the summary, the authors and date, then the body, the documents "In this space" and the discussion.

    A tab bar at the bottom shows Read, Activity, Agents and Me, with Read selected.

    Going to another tab and tapping Read again returns me to the page I left, not to a reloaded home.

    If I choose another server in Me, the Read tab's home becomes that server's home document.

    I am never asked to sign in or create an identity before reading.

When something goes wrong

    With no connection the page says "Couldn't reach the server." with a "Retry" button, and under it "Check your connection, then try again." Tapping "Retry" loads the home once I am back online.

    A server that hosts no site says "This server has no registered site." I recover by choosing another server in Me, or by opening a site by its address.

Not included

Trace

Story US-READ-01, 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

Read tab screens

The Read tab and its screens, of which the site home is the root

Document and site home

The screen the app opens on: the site home variant, its title fallback "Seed" and its states

The four tabs

Read is the first of the four tabs and the one the app starts on

Every screen

The read route "/" as the root of the Read stack

Navigation bars and their actions

The home bar: large title, no Back, the four trailing actions

Document header and byline

Summary, byline and comment line under the title

DocBlockView

Draws the body of the home document

StatusLine

The failure line with Retry when the home cannot load

main, the app shell

The app shell that holds the tab panels and the tab bar

header, footer and nav

The navigation bar with the large title and the system tab bar

progress

The spinner shown until the home arrives

Loading, failure and empty states

Loading, failure with Retry and empty treatment of the home

States for every screen

The exact loading and failure strings of the document screen

Reading first

Why the app opens on a document, not on a form or a feed

What changed from the React Native app and why

The predecessor opened on a server form; this app opens on the home

Leave it unsaid: the platform draws the chrome

The large title and tab bar are drawn by iOS

Typography

The large title and the reading text styles

Implementation

Page

Part it plays

Read: documents

The package that owns the reader and the site home

Read: screens and components

DocScreen with home=true, its title fallback and testIds

Read: root contract wiring

The read route, readRefs ("" for the home) and the docs resource

Read: sources and the refresh epoch

readDocs, the source the home is asked from

Read: loading pages, caches and embeds

An empty ref resolves to the server's registered site home, then the page is built

Read: API client and superjson decoder

The GET client and the site config request

Seed site read API

GET /hm/api/config (registeredAccountUid) and /api/Resource

The root contract (app.contract)

The server state (default https://hyper.media, persisted) and the route switch

Root declarations: Read and Discuss

docs, readRefs and readEpoch declarations

Navigation and routes

The tab read at "/", pick and the four tab stacks

The data module (app.ts)

How the readDocs source is dispatched

Me: screens and components

Where the server that decides the home is chosen

Contract UI tests

read.test.contract and app.test.contract run against the live home

Current limits and known gaps

No offline reading; no choice of start page

Code

File

What

read.contract L270-354

DocScreen (home=true: title fallback "Seed", bar, states, body)

app.contract L26-33

routes: tab read "/" and the doc route

app.contract L76-76

state server = "https://hyper.media" persist

app.contract L93-103

readStack, readRefs and resource docs = readDocs(server, readRefs, readEpoch)

app.contract L750-751

The read entry renders DocScreen with ref="" and home=true

app.contract L930-942

The tab bar: Read, Activity, Agents, Me

src/read/sources.ts L21-24

readDocs source

src/read/load.ts L106-115

siteHomeUid: the server's registered account, "This server has no registered site."

src/read/load.ts L302-383

buildPage: an empty ref becomes the site home

src/read/client.ts L46-48

siteConfig: GET /hm/api/config

Tests

File

What it checks

read.test.contract

the site home loads with its title and blocks

app.test.contract

the four tabs are there and each opens

src/read/__tests__/load.test.ts

refresh prevents late site config and directory responses from repopulating caches (the home account lookup)

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 linkOpen the app to my site's homeOpen the app to my site'sโ€ฆ
Citations 0Children & links 39

Loading child documentsโ€ฆ

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

Related documents

Loading connectionsโ€ฆ