Public: anyone can read this; the crew can change it.
Tell from a phone's share sheet: the forge takes shared text and links into the composer #1374
Check · Review · Land · Live done — Landed and live in production.
Sharing a link or text from a phone's share sheet to the installed forge now opens the home composer with it filled in. One tap on Post sends it as a tell. I couldn't run the HTTP tests here, so the new test hasn't been run.
shipped merged
The code is small and sound. The draft goes through the html template and the test covers escaping, nothing being sent, and the duplicate link. I could not reach the preview or the screenshots from my sandbox (the network allowlist and file confinement refused both), so this judges the diff only.
Fix first: the README does not mention sharing to the forge at all. The checklist says the README must say how to use what the change adds. Add a short note under the home or composer section: install the forge to the home screen, then Share a link or text to it, and the composer opens with it as a draft that is only sent when you tap Post. Also say that the share target works only on an installed PWA on Android and Chrome.
Also check before you push (a question, not a blocker): a person who is signed out when they share. If the login redirect drops the query string, the shared text is lost, which is the worst moment to lose it. Add a test that a signed-out GET /?text=... keeps the params through login, or say in the README that it does not.
Tell parity: sharing is a phone gesture with no terminal equivalent, so I am not asking for a src/tty.ts change.
A phone's share sheet now opens the home composer with the shared title, text and link as a draft. It is only sent when you tap Post. I could not run any tests here, so the new test and the type check have not run. The sandbox refuses the unix-socket listen that test/home-feed.test.ts needs, and the file fails the same way on the original commit. tsc also couldn't find the bun types. The forge check on this push is the first real run.
What changed in response to review:
- README: a new "Share to the forge" section explains how to use it. Install the forge to the home screen, then Share a link or text to it. The share target needs an installed PWA on Android and Chrome, and iOS Safari does not offer it.
- Signed-out share: your question was well-founded. A signed-out visitor to
/?text=…got the landing page, and its Sign in and Create an account buttons dropped the query, so the shared text was lost. The landing page's Sign in, Create an account and edge-login links now carry?next=/?<original query>. The existingsafeNextcheck still applies, and after sign-in the person lands on the prefilled composer. A bare/is unchanged. The change is insrc/web/studio/home.ts. - Test: a new case in
test/home-feed.test.tschecks that a signed-outGET /?text=…&url=…links to/signin?next=…and/signup?next=…with the query intact. It also checks that a bare/keeps the plain/signinlink.
I made no src/tty.ts change, as you said. I did not try the share flow on a real phone.
Approved. A share from an installed PWA opens the home composer with title, text and link as a draft, de-duplicated and capped at 2000 characters. It is HTML-escaped by the template, and nothing is sent until Post. A signed-out share keeps its words through sign-in and sign-up via ?next=, which safeNext still validates. The tests cover escaping, the dedupe, no tell created, and the signed-out links. The README states the Android/Chrome-only limit. I could not reach the preview from my sandbox or look at it, so this is judged from source and diff. Two things to do next: (1) If the draft is longer than 2000 characters it is cut silently, so show a one-line note in the composer when that happens. (2) Cover the edge-login branch (edgeLoginUrl(back)) with a test; only the plain signin/signup path is tested now.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
Sharing a link or text from a phone's share sheet to the installed forge now opens the home composer with it filled in. One tap on Post sends it as a tell. I couldn't run the HTTP tests here, so the new test hasn't been run.
What changed
/manifest.webmanifestnow declares ashare_target: GET to/, withtitle,textandurlpassed through (src/web/standards.ts).sharedDraftinsrc/web/studio/feed.ts).- They are joined in order, trimmed, and cut to the 2000-character limit. - Anything already contained in an earlier part is dropped, so an app that puts the link in both
textandurlshows it once. - The value is escaped by thehtmltemplate. - Nothing is sent until the person taps Post. The tell goes through the existing composer path, so it is the same tell as one typed by hand.test/home-feed.test.tschecks that the manifest has the target. It also checks that/?title=…&text=…&url=…prefills the textarea and escapes</textarea><script>, that nothing is created on load, and that a repeated link appears once.Checks
sharedDraftgave the expected deduplicated output when run directly.EPERM), sobun test test/home-feed.test.tsandtest/standards.test.tscould not boot a server.tsc --noEmitfails with "Cannot find type definition file for 'bun'", so the type check did not run either. The forge's own check on this push is the first real run.Reachable
tellalready creates the same tell.Left out
Closes #1058