As a reader, I want to type the address of a Seed site and read it in the app, so that I can reach a site I have no bookmark for without leaving Seed.
Situation
I have the address of a Seed site, but no bookmark. I want to type it on my phone and read the site without leaving Seed.
What I do
Open the mobile app and focus its site-address field.
Type https://seed.hyper.media and submit from the keyboard. I should not have to select a suggestion.
Wait for the destination. I can tell which site opened from its content, not merely from my input echoed on screen. I am still in the mobile app.
Enter a malformed address. The app explains the problem, keeps the text editable, and lets me correct it and open the site without restarting.
What I should see
The Read tab's document screen has an "Open site" action that opens the Open site sheet.
The sheet has one address field with a URL keyboard. The Open button is disabled while the field is empty.
Submitting from the keyboard and tapping Open do the same thing.
A bare host such as seed.hyper.media is accepted and treated as https://.
A link to a document, hm:// or a site's /hm/ page, opens that document.
The destination opens in the app's own document screen, with the site's content visible.
Links, the directory, authors and discussion of that document stay on that site. My configured server does not change.
A reply to an earlier submission never replaces a later one.
When something goes wrong
A malformed or unsupported address shows an explanation under the field. The text stays editable, and correcting it opens the site without restarting.
If the site cannot be reached, the document screen shows its failure line with Retry.
Not included
The review video starts before typing and ends with readable destination content. Tabs, history, search-engine queries, and a visual redesign are outside this first workflow.
Trace
Story US-READ-04, 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 |
|---|---|
The design of this workflow: address entry and in-app reading | |
The Open site sheet: field, footer, error, Open button, Cancel | |
The "Open site" bar button, and the screen the destination opens on | |
The opened site becomes the reader's context without changing the server | |
Open site is a sheet; submitting replaces it with a pushed document | |
The "Open site" text button and the sheet's Cancel | |
Web addresses enter the app only through this sheet or an in-app link | |
Validation on submit, error under the field, keyboard submit | |
The Open site form: field, submit control and enabling rule | |
The "Open site" bar button and the sheet's Cancel | |
A valid but unreachable address opens the document failure state | |
The URL field with its placeholder and keyboard submit | |
Open, "Opening…" and the disabled empty state | |
Sheet presentation | |
Retry when the destination cannot be reached | |
A failed site never falls back to the configured home | |
The validation and hint strings |
Implementation
Page | Part it plays |
|---|---|
The implementation and evidence note for this workflow | |
Validation, the revision guard on the reply, reading from the entered server | |
OpenSiteScreen and its testIds | |
The open-site route, the draft state, the readSiteOpened mutation and its actions | |
The readOpenSite source | |
refFromUrl and siteUrlParts used by the validator | |
resolveLink and linkServer: the page is read from the typed address's own server | |
The typed URL becomes the doc route's ref | |
The open-site route and the back-then-push on success | |
The revision pattern that discards a stale reply | |
readSiteDraft, readSiteError, the revisions and readSiteOpened | |
GET /hm/api/config to find the site's home account | |
open-site.test.contract | |
open-site.test.ts and deep-links.test.ts | |
The first workflow carried through the mobile process | |
The recording and checks attached to PR #1484 |
Code
File | What |
|---|---|
ReadOpenReply and OpenSiteScreen | |
The "Open site" bar button on DocScreen | |
route open-site "/open-site" | |
readSiteDraft, readSiteError, the revisions, readSiteReplyCurrent and mutation readSiteOpened | |
readShowOpenSite, readEditSite, readSubmitSite, readSiteAfterOpen | |
The open-site entry renders OpenSiteScreen | |
openSite: trims, defaults a bare host to https, validates | |
readOpenSite source | |
resolveLink and linkServer | |
siteUrlParts |
Tests
File | What it checks |
|---|---|
open a typed Seed site URL in the native reader and return | |
invalid URL stays editable; cancel returns to the same document | |
failed site loading exposes retry and never substitutes the default home | |
a submitted revision cannot apply to an edited or reopened form with identical text | |
site submission trims input, defaults bare hosts to HTTPS and preserves the target | |
invalid addresses, credentials, files and non-document routes stay in the form | |
a typed site and gateway URL read from their own server, not the configured default | |
an unreachable typed site reports failure on that server, never a default home |
Delivery
Delivered by #1484.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime