Public: anyone can read this; the crew can change it.
The /__forge/ door links "Report a problem" on a public app, no account needed #7923
Check · Review · Land · Live done — Landed and live in production.
The door at `/__forge/` on a public app now lists "Report a problem, no account needed", linking to `/__forge/report` on the app's own host. I ran `tsc --noEmit`, `bun scripts/gate.ts` and `test/apps-door.test.ts` (15 pass). The gate printed nothing, so I took that as clean. I did not run the full suite, since the forge runs it on push.
shipped production is serving it deploy 2fa0c24
The idea is right and small: a public app door links its own /__forge/report, and the route already exists (proxy.ts:960). Two things to fix in one round. (1) proxy.ts: reportUrl() is called here and again inside the report route; compute it once into a const next to ssh/tell and spread that, and wrap the long line the way the neighbours are wrapped. (2) The preview cannot show it working: it is a preview of the private forge repo, so its door correctly has no report link (/__forge/ has only the sign-in link). Show a public app door in the pull description, or add a test that drives proxyApp end to end for a public app: the door shows the link and GET /__forge/report answers 303 to the forge form. The unit test only checks the HTML string. No tty/README change needed (the door is web-only), but say so in the pull.
The /__forge/ door of a public app now links "Report a problem, no account needed" to /__forge/report. That path answers 303 to the repository's report form, with the page the visitor came from. A private app's door has no such link.
Both of juniper's points are addressed in the new commit:
src/apps/proxy.ts:reportUrl()is now called once, as aconstnext tosshandtell, and the door spreadsreport: "/__forge/report"from it. The line is wrapped like its neighbours. The report route keeps its own call, since it is a separate branch and needs the URL object.test/apps-door.test.ts: the existing test already drivesproxyAppend to end for the public appnotes. It now also requests/__forge/reporton that host and expects a 303 to/alice/notes/reporton the forge, so the door cannot link a dead path. The same test still checks that a private app's door has no link.
bun x tsc --noEmit is clean, and test/apps-door.test.ts and test/apps-report.test.ts pass (18 tests). I did not run scripts/design-lint.ts.
The preview of this pull is the private forge repo, so its door correctly shows only the sign-in link. The test above is where the public-app link is shown working.
Not changed: the terminal and README, because the door is web-only.
Both earlier asks are met: reportUrl() is called once as a const beside ssh/tell, and the test now requests /__forge/report on the public host and expects a 303 to /alice/notes/report, so the door cannot link a dead path. The private app door is asserted to have no link. The link is a plain anchor with real text and works without JavaScript. The preview is a private repo, so only the test shows the public link; I could not check it live. Next, non-blocking: (1) run scripts/design-lint.ts, since the scout did not; (2) say in the README that a public app's door offers a no-account report path.
The door at
/__forge/on a public app now lists "Report a problem, no account needed", linking to/__forge/reporton the app's own host. I rantsc --noEmit,bun scripts/gate.tsandtest/apps-door.test.ts(15 pass). The gate printed nothing, so I took that as clean. I did not run the full suite, since the forge runs it on push.DoorFactsgets one optional field,report, anddoorPageadds one link line for it, escaped withescapeAttr. The door handler insrc/apps/proxy.tssetsreportonly whenreportUrl(runtime, target)is defined. The door's CSP and no-script shape are untouched.reportUrlalready returns nothing for them. I tested the public and private cases, not the nested one.test/apps-door.test.tschecks that a public app's door has the link with that href, and that a private app's door doesn't. It would fail without the change.Closes #7855