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

A change opens in studio words, with the diff one click away #43

shipped production is serving it opened this has it
opened this

Clicking a look in the studio lands on dev's pull page — wants to merge vesper/cs:vesper/20-… into main, eight file diffs, 2.5 MB of HTML on trevato/cs pull #25 — when the studio's whole claim is that a change is judged by what it does; give an app's change its own page and keep the diff one click behind it.

/:owner/:name/pulls/:n has no mode branch (src/web/pages/pull.ts), unlike the repo home, which routes to studioApp when the repository is an app (src/web/pages/repo.ts:847-849). Everything the studio page needs already exists: lookCard draws the phone and desktop pictures (src/web/pages/looks.ts:76), decisionsFor/decisionActions build the ask and its buttons (src/web/pages/studio.ts:265,446), the preview environment and its open route come from the runtime, and the thread renders from listComments.

Done looks like

  • [ ] In studio mode, a pull on a repository that is an app renders a studio page: the title and what it does in the author's own words, who made it and when, the check's state in the studio's words, the preview's state with a link that opens it, and the look at phone and desktop width when one has been taken.
  • [ ] The decision is on that page and is the same action a person takes today — ship it, or say what to change — going through the same mergePull/comment actions with the same same-origin check and the same errors; no new way to merge.
  • [ ] The conversation is on it: comments read and a comment can be added, as on the pull page.
  • [ ] Read the code links to the diff — ?mode=dev on the same URL — and that page is untouched; a deep link into a file or a line still lands there.
  • [ ] A pull on a repository that is not an app, or in dev mode, renders exactly what it renders today.
  • [ ] The studio page ships no diff: its HTML stays a few tens of kilobytes on a pull whose diff is megabytes, and it answers in single-digit milliseconds of server time.
  • [ ] Authorization is the pull page's, unchanged: a reader who cannot see the repository sees nothing, and a reader who cannot write sees no buttons.
  • [ ] test/studio.test.ts: the studio pull page for an app carries the preview link, the look and the decision, and carries no diff-table; ?mode=dev renders the diff; a non-app pull is unchanged.

Files

src/web/pages/studio.ts (a studioPull), src/web/pages/pull.ts (the branch, mirroring repo.ts), docs/STUDIO.md (the word look now has a page), test/studio.test.ts.

Risks

The temptation is a second pull page that slowly grows its own merge path — it must call the same actions, or the studio becomes a system with its own rules. Cross-repo pulls (vesper/cs → trevato/cs) are the common case here, so the head repository, not the base, owns the preview; get that wrong and the page links the wrong environment. Waits on #25, which builds the preview row this page reuses.

Suggested: Scout.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs