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

The forge pill links to the same path on the app's other side, and a `//` path cannot leave the forge's addresses #6254

Parked opened this
Closed without merging

The pill now links to the app's other side. The type check is clean and the pill, toolbar and side tests pass (54, including apps-crew-pill.test.ts with its 16 KiB budget unchanged). I did not run the whole suite or try it on a running app.

Notes

stopped parked by the crew deploy f96a97c

opened this

The pill now links to the app's other side. The type check is clean and the pill, toolbar and side tests pass (54, including apps-crew-pill.test.ts with its 16 KiB budget unchanged). I did not run the whole suite or try it on a running app.

  • Crew door: /__forge/crew in src/apps/proxy.ts now returns side, built by the new otherSide. It uses the app's recorded addresses and sideOf, and only for a signed-in viewer who can read the repository. A guest or a stranger of a private app gets none.
  • Previews offered: only those whose pull the viewer may see. This goes beyond the issue's text, so a sealed pull doesn't leak through the pill.
  • Pill script: src/apps/toolbar.ts builds the href as side.url's origin + location.pathname + location.search, with no new URL(path, base). It only does so when the side's URL is http(s).
  • Size: the new link pushed the script over 16 KiB, so I shared the three identical link styles in one ROW variable.
  • Tests: test/apps-pill-side.test.ts is new. It covers a reader getting the side, and a stranger of a private app getting none. It also covers an ordinary path and query being kept, and pathname: "//evil.test/x" giving an href on https://notes.apps.test. The server side is tested by calling otherSide directly with a stubbed runtime. I did not add an HTTP-level test of /__forge/crew carrying a side.

I left out the tint and the diff-on-selection ideas; they weren't in the issue.

Closes #6076

commented

The pill now links to the app's other side. The type check is clean and the pill, toolbar and side tests pass (54, including apps-crew-pill.test.ts with its 16 KiB budget unchanged). I did not run the whole suite or try it on a running app.

  • Crew door: /__forge/crew in src/apps/proxy.ts now returns side, built by the new otherSide. It uses the app's recorded addresses and sideOf, and only for a signed-in viewer who can read the repository. A guest or a stranger of a private app gets none.
  • Previews offered: only those whose pull the viewer may see. This goes beyond the issue's text, so a sealed pull doesn't leak through the pill.
  • Pill script: src/apps/toolbar.ts builds the href as side.url's origin + location.pathname + location.search, with no new URL(path, base). It only does so when the side's URL is http(s).
  • Size: the new link pushed the script over 16 KiB, so I shared the three identical link styles in one ROW variable.
  • Tests: test/apps-pill-side.test.ts is new. It covers a reader getting the side, and a stranger of a private app getting none. It also covers an ordinary path and query being kept, and pathname: "//evil.test/x" giving an href on https://notes.apps.test. The server side is tested by calling otherSide directly with a stubbed runtime. I did not add an HTTP-level test of /__forge/crew carrying a side.

I left out the tint and the diff-on-selection ideas; they weren't in the issue.

commented

Parked by the crew: the check failed ("flow vitals > home, the tick line and the MCP flow tool say the same numbers") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs