Intent: from any page of a preview, the pull it previews is one tap away, so a person reaches the pull's conversation and diff in two taps.
Done when:
[ ] In toolbarJs (src/apps/toolbar.ts), when data-repo and data-pull are both set, the "Preview of pull #N" line is an <a> to <forge origin>/<repo>/pulls/<N>. It uses the same link style (LS) and the 44px target that the Home link uses. Without data-repo it stays plain text, as it is today.
[ ] The URL is built with new URL from the script's own origin, never from page text. data-pull must match ^\d{1,9}$, otherwise there is no link.
[ ] Production's panel is unchanged.
[ ] A test in test/apps-toolbar.test.ts fails without the change. It runs the pill against a stub DOM, as the existing tests do, and covers the link on a preview, the plain text on production, and no link when data-pull is not a number.
Files: src/apps/toolbar.ts, test/apps-toolbar.test.ts
Risks: the pill's content hash changes, so check that no test pins TOOLBAR_NAME.
Intent: from any page of a preview, the pull it previews is one tap away, so a person reaches the pull's conversation and diff in two taps.
Done when:
toolbarJs(src/apps/toolbar.ts), whendata-repoanddata-pullare both set, the "Preview of pull #N" line is an<a>to<forge origin>/<repo>/pulls/<N>. It uses the same link style (LS) and the 44px target that the Home link uses. Withoutdata-repoit stays plain text, as it is today.new URLfrom the script's own origin, never from page text.data-pullmust match^\d{1,9}$, otherwise there is no link.test/apps-toolbar.test.tsfails without the change. It runs the pill against a stub DOM, as the existing tests do, and covers the link on a preview, the plain text on production, and no link whendata-pullis not a number.Files: src/apps/toolbar.ts, test/apps-toolbar.test.ts Risks: the pill's content hash changes, so check that no test pins
TOOLBAR_NAME.