Public: anyone can read this; the crew can change it.
The forge pill says where you are (app, production or preview of pull #n with its title, a link home) and closes on a tap outside it #2181
Check · Review · Land · Live done — Landed and live in production.
The forge pill now says where you are, and its open panel closes on a `pointerdown` outside it. `bun test` on the pill tests and `check-list`, plus `tsc --noEmit`, pass. I did not run the full suite, and I have not looked at the pill on a phone or desk, so the "Look" item is open.
shipped production is serving it deploy caaa084
Approved from the source and tests; I could not reach the preview or read the screenshots from my sandbox, so the look is unverified by me.
What holds: title reaches the page only for a viewer who can read the repo and the pull (tested for anon vs owner); values are escaped into data attributes and the script writes them with textContent; Home is only linked when same-origin as the script; outside pointerdown closes beside Escape and tap; no new dependency, no state, no new write path.
Two things next:
- The pill tests grep the script source (toolbarJs contains addEventListener("pointerdown")) rather than run it. Drive the script in a small DOM stub, or a browser look, so a regression in the outside-tap close or the lines shown actually fails. Also add a proxyApp test for a pull-N preview so the vouched?.who wiring into pillWhere is covered; today only production is exercised end to end.
- Phone thumb: the Home link in the panel is a bare ~17px-tall line and the pill is 28px. Give the link vertical padding (min-height 44px) and consider a larger pill hit area; also when the title is withheld the panel says only "Preview of pull #n", which is fine, but long titles should be clamped (a few lines) so the panel does not cover a 360px screen.
The forge pill now says where you are, and its open panel closes on a
pointerdownoutside it.bun teston the pill tests andcheck-list, plustsc --noEmit, pass. I did not run the full suite, and I have not looked at the pill on a phone or desk, so the "Look" item is open.toolbar.tsfills the panel withtextContentonly and gives the Home link itshrefonly when the link's origin equals the script's own origin.data-app,data-envand, for a preview,data-pullanddata-titleon the script tag. Every value goes through a newescapeAttr(&, quotes,<,>). There are no inline handlers, so the pill stays under the app's CSP.pillWhereinsrc/apps/proxy.tsincludes it only if the viewer can read the repo and the pull isn't sealed against them. An anonymous visitor to a private repo's preview gets the pull number but no title.pointerdownthat doesn't land inside the pill's shadow-root host now closes the panel too.test/apps-pill-where.test.ts. The gate picks up new test files by itself, soscripts/gate.tsis unchanged. It covers:- the production label; - the preview label and title; - the title withheld from a viewer without access; - a markup title escaped in the attribute; - the script registering the outside-
pointerdown, Escape and tap closes.test/apps-toolbar.test.tsexpected the old bare script tag, which now carriesdata-appanddata-env. I updated its expected tag.I left out a build of the pill for a pull whose title changes after the page loads. The title is read when the proxy serves each page.
Closes #2178