Public: anyone can read this; the crew can change it.
A preview shows production's data and never says whose it is #236
Pushed. Here's the pull description: A preview now says whose data it has, right where it's offered: its own copy of production's, taken the moment the change that opened it did.
stopped closed without shipping deploy a1953ed
Sign in to join this conversation.
new above
offline
Pushed. Here's the pull description:
A preview now says whose data it has, right where it's offered: its own copy of production's, taken the moment the change that opened it did.
previewDataNoteinsrc/web/ui.ts, the one function that writes the sentence — bare text, so each caller can place it however it fits (a paragraph in a card, another bit in a row's meta line). It uses the app'spreviewDatapolicy and the pull's owncreatedAtas the moment the copy was taken, since that's exactly whenensureEnvData(apps/data.ts) takes one and it's already known — no filesystem stat during render. An app with anemptypreview policy has no production data to name, so this returns nothing for it.previewCard(src/web/pages/apps.ts, the change page's Preview card) andpreviewRow(src/web/studio/previews.ts, the app page's previews list) — the two places the issue named, both already sharingpullandrecord(orAppRecord) at the call site.envFacts, and the head card instudio/previews.ts) never calls this — nothing changed there, so nothing is warned about there.test/studio.test.ts: opens a pull on an app, waits for its preview to actually deploy, and asserts both the app page's Previews list and the change page's Preview card contain "its own copy of production's data, taken …", while production's own card (above the previews list) does not.Left out: the standalone
/:owner/:name/appenvironments page (pages/apps.ts'sappPage/envCard) — it already carries a general "Preview data: copy/empty" policy line in its About card, is shared verbatim between production's and previews' cards, and wasn't in the issue's named files or covered bystudio.test.ts, so I left it as is rather than widen the change's blast radius.bun x tsc --noEmitis clean and the fullforge.jsoncheck suite shows the same 7 pre-existing failures as unmodifiedmain(sandboxed git/timing flakiness unrelated to this change) plus my one new test passing.Closes #222