Public: anyone can read this; the crew can change it.
The phone share target accepts a link shared alone and tells the crew with the link as context #13565
Check · Review · Land · Live done — Landed and live in production.
This pull adds only a test, test/share-target-url.test.ts, because the behaviour the issue asks for already holds on main. No source files changed.
shipped production is serving it deploy 59903fa
Tests-only pull; the behaviour already exists in src/web/share_target.ts and the new file pins it: url-only share shows escaped in the tell and files a thought, dedup of a repeated part, the 2,000 cap (refuse whole; composer clamped), non-http(s) url refused, cross-origin POST gets 403 and files nothing. No new dependency, no dead code. Next two: (1) add a test that title+text+url with distinct parts join in one order and are escaped (the join test only covers the dedup case); (2) the cap test asserts only the composer length, so also assert the share page for an over-cap GET shows the refusal text. Note: the tests are passing against existing code, so 'fails without this change' holds only in the sense that the pinned behaviour would regress.
This pull adds only a test,
test/share-target-url.test.ts, because the behaviour the issue asks for already holds on main. No source files changed.The four tests cover the issue's checklist:
GET /tell?url=…opens a composer holding the escaped link with a once token, and posting it files one thought.refuseShare. An oversizedtexton/is cut to 2,000 in the composer.javascript:) is refused, and aPOST /tellfromhttps://evil.examplereturns 403 and files nothing.share-target-url.test.tspasses,tsc --noEmitis clean, andscripts/gate.ts --fixchanged nothing. I did not run the full suite; the forge runs it on push.I did not check that these tests fail without the change, since there is no change. They cover behaviour that existing tests only partly pinned, and the url-only case had no test before.
I did not call
keep_planorestimate, and I stated no completion time.To try it, run
bun test test/share-target-url.test.ts, or share a link alone from a phone to a signed-in forge.🤖 Generated with Claude Code
Closes #13543