Inbox: comment on an https:// prototype (hosted preview behind sign-in)

Open
#4,009 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript
Domain
backend, security

Research direction

Start by reading where the Inbox page sets its CSP header (default-src 'self' with no frame-src) and where the live proxy decides which origins it will forward, since both are limited to http://localhost:<port> today. Then look at how config.json is parsed so an inboxPrototypeOrigins allowlist can be added, and at where the proxy's "open" window keeps cookies if a per-origin jar is attempted. Done means an allowlisted https:// preview renders in the frame and element comments post through the proxy; note that proxy-side cookie handling and the hosted sign-in's frame-ancestors 'self' are the hard parts and need a maintainer's design call.

Written by the indexing model from the issue text.

Description

Problem

A question card's Prototype: line accepts an https:// address, but in the Inbox that page can't be shown or commented on:

  1. The Inbox page sends default-src 'self' with no frame-src, so Chrome blocks any https:// prototype in the frame ("This content is blocked").
  2. Comments only work on pages loaded through the Inbox's local live proxy, which is limited to http://localhost:<port> apps.
  3. An app behind a sign-in can't be reviewed through the proxy either. The proxied origin isn't the app's own origin, so its session cookies and its identity provider's redirect don't apply, and most hosted sign-in pages send frame-ancestors 'self'.

So a staging or preview deployment (e.g. a Cloudflare or Vercel preview URL behind the team's sign-in) can't be reviewed with element comments in the Inbox. The only option is a local dev server on sample data.

Proposal

Let the live proxy take an https:// prototype origin the person allowlists (e.g. inboxPrototypeOrigins in config.json), the way it takes http://localhost:<port> today, so comments work on a hosted preview. Optionally, also let the proxy keep a cookie jar per prototype origin, so a sign-in done once in a full window (the proxy's "open" button) carries into the frame.

Version: plannotator 0.29.3 (Linux server, Inbox reached over Tailscale).

Dominant language
TypeScript
Stars
8.7k
Forks
649
Avg merge
16h 1m
Merged PRs (30d)
756

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from backnotprop/plannotator

All issues in backnotprop/plannotator

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.