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 #1000

Closed opened this in answer to
Closed without merging

Sharing a link or text to the installed forge from a phone's share sheet now opens the home composer filled in. One tap on Post sends it as a tell, and you land back on the feed. The home-feed and standards tests pass.

Notes

stopped closed without shipping deploy 9051476

opened this

Sharing a link or text to the installed forge from a phone's share sheet now opens the home composer filled in. One tap on Post sends it as a tell, and you land back on the feed. The home-feed and standards tests pass. The full type check didn't run, because bunx tsc couldn't find the bun types here. I never opened it on a phone or took the "Look" screenshots, so I haven't seen the composer at phone and desktop widths.

  • Manifest: /manifest.webmanifest now has a GET share_target pointing at /, with title, text and url. This is in src/web/standards.ts.
  • Prefill: the existing composer in src/web/studio/feed.ts fills the box from the shared title, text and URL. When a part is already contained in another (Android often repeats the link inside text), it is dropped. The result is capped at 2000 characters.
  • Escaping: shared text is escaped like any other composer text. A test shares a </textarea><script> payload and checks it comes out inert.
  • Sending: posting uses the same path as before. The no-script form posts to /tell and redirects to /. With the script, a shared tell goes through the outbox and the address is reset to /, so a refresh doesn't refill the box.
  • Tests: in test/home-feed.test.ts, the manifest has the target, the route prefills, and sharedText handles repeated links, the length cap and empty input.
  • Reachability: the Page is the share sheet on an installed forge. The MCP tell tool already does the same job, so I added nothing there.
  • Removes: nothing, because I added no screen or control. The share target reuses the existing composer, so there is still one interface for telling.

Not done: if you're signed out, sharing goes through sign-in and the shared text is lost, because sign-in doesn't carry the query through. I also didn't add a POST/file share target.

To try it, install the forge as an app on a phone, sign in, and share a link to it from another app. Or open /?title=Hi&url=https://example.com while signed in.

Closes #618

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs