Move around the app without losing my place
A reader wants to switch between reading, notifications, agents and settings and find each one where they left it.

As a reader, I want to move between reading, my notifications, my agents and my settings and find each where I left it, so that a quick look elsewhere never costs me my place.

Situation

I am three documents deep in a site when I want to check a notification and change a setting. The app is open on the Read tab.

What I do

    Read a document, then follow a link to another one.

    Tap another tab and look around.

    Tap "Read" to come back.

    In Activity, tap a notification.

    Go back from where the notification took me.

What I should see

    Each of the four tabs opens its own first screen: the site home, the Activity inbox, the Agents list and Me.

    Coming back to a tab shows the screen I left there, with its text drafts and scroll position.

    Tapping the tab I am already on returns it to its first screen.

    Back from a document returns to the document I came from.

    A sheet closes back to the screen under it with "Cancel", "Close" or "Done", or by finishing the task.

    Tapping a notification switches to Read and opens the thread or document there. Activity still shows the inbox, and Back in Read returns to what Read showed before.

    "Open Me" on a screen that needs an identity switches to the Me tab.

    The "Agent server" row on Me opens the agent server sheet over Me and closes back to Me.

    A link to a Seed document from another app opens that document in Read, over the site home, and Back returns to the home.

    After closing and reopening the app, my server, my current identity and my agent server are still the ones I chose.

When something goes wrong

    A link I opened from outside the app is not a document: the document screen shows "This link is not a document." with a "Retry" button. I go back to the page I was reading. The home document is never shown in its place.

Not included

    The screens open in each tab are not kept between launches: after a relaunch every tab starts at its first screen. See The four tabs.

    A document opened from an agent conversation, and a link arriving while another tab is selected, are untested. See Moving between tabs and into the app.

    There is no history list.

Trace

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

App structure

Section parent: four tabs, a stack in each, sheets for tasks, links between tabs

The four tabs

What each tab is and what it remembers

Stacks, pushes and sheets

Push or sheet, Back, and how each sheet is dismissed

Every screen

All 25 routes with tab, path and presentation, and how they connect

Moving between tabs and into the app

Every connection that crosses a tab or enters from outside

Reading another site in place

Back restores the site context of the page underneath

Navigation bars and their actions

Leading and trailing actions that open or close screens

Screens

Section parent: every route grouped by tab

Reading first

One tap to anywhere in the space

main, the app shell

The root element that keeps every tab's stack alive

link

Rows and links that push a screen

Document and site home

Read tab root and pushed documents

Activity inbox

Activity tab root; rows cross into Read

Agents list

Agents tab root; Open Me shortcut

Me

Me tab root; Agent server row opens a sheet in place

Agent server sheet

The sheet that opens over Me

Thread

Where a reply notification lands

Implementation

Page

Part it plays

Navigation and routes

Route table, stacks per tab, shared actions, cross-tab moves

Deep links and URL handling

How hm:// links and web URLs reach the document route

The root contract (app.contract)

Shared state that persists and the route switch in the view

Root declarations: Read and Discuss

Derives that read the Read stack and decide the reader context

Root declarations: Activity and Agents

Tab gates so Activity and Agents load only while shown

Root declarations: Me, Profile, Crypto and Vault

Persisted server list and name drafts

State, refresh and stale-reply patterns

Tasks keyed on the top route and tab-gated polling

Read: root contract wiring

Read routes and actions in the root

Discuss: root contract wiring

Thread, comments and compose routes on the Read tab

Activity: screens, tasks and email settings

The row action that marks read and opens Read

Agents: screens and components

agentsNavigate: in-app routes, hm links and web links

Me: screens and components

Rows that push Server and Vault and open the agent server sheet

Contract views and built-in calls

Navigation attributes and the select, go, push and back calls

Contract UI tests

Navigation is covered by the UI tests

Code

File

What

app.contract L26-65

routes nav: tabs, pushed routes and sheets

app.contract L76-77

state server and currentAccount, persisted

app.contract L93-97

readStack, readRefs, readContextRef and readContextServer

app.contract L275-280

pick (select a tab), follow (go) and back

app.contract L382-383

activityMe: select the Me tab

app.contract L402-405

activityOpenRow: mark read, select Read, go to the thread or document

app.contract L417-429

agentsNavigate: hm links to the doc route, web links outside, routes in place

app.contract L360-364

discussOpenCreate: open the create sheet from a comment

app.contract L747-749

every tab's stack is drawn and kept

app.json L38-43

the hm protocol handler

me.contract L104-118

Server, Agent server and Vault rows

Tests

File

What it checks

app.test.contract

"the four tabs are there and each opens"

app.test.contract

"polish: Me lists the agent server and its row opens the agent server settings"

read.test.contract

"a child document pushes and Back returns home"

read.test.contract

"an hm deep link opens its document in Read, over the home"

read.test.contract

"a deep link that is not a document says so"

activity.test.contract

"activity: no identity offers Me"

activity.test.contract

"activity: grouped days, unread dots, mark all read and push a document"

open-site-activity.test.contract

"Activity thread fetch and reply use the configured server, not the covered document origin"

discuss.test.contract

"discuss: composing without an identity prompts to create one"

me.test.contract

"me: the chosen server persists across a relaunch"

Delivery

Delivered by #1470, #1484.

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

Unsubscribe anytime

Comments