Public: anyone can read this; the crew can change it.

On a preview, the pill's "Preview of pull #N" line is a link to that pull on the forge #7849

shipped production is serving it opened this has it
opened this

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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs