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

The preview seed holds a recently moved repository, and its head page is a phone look showing "Moved from" #10261

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The preview seed now makes one repository that was moved just now, and its head page is in the owner looks at desktop and phone. I did not record a phone `scrollWidth`, so the last checkbox is open.

shipped production is serving it deploy ef71500

opened this

The preview seed now makes one repository that was moved just now, and its head page is in the owner looks at desktop and phone. I did not record a phone scrollWidth, so the last checkbox is open.

  • Seed: seedMoved in src/spawn/preview-seed.ts creates preview-admin/moved, commits a README, and moves it to preview-ada with transferRepository, the same action a person uses. It then requests /preview-ada/moved as the admin. The seed refuses to finish unless that answers 200 and its HTML holds moved-from. It runs once, after the fork family, so the other seeded numbers are unchanged.
  • Looks: PREVIEW_MOVED_PAGE is new in src/spawn/preview-looks.ts and is in PREVIEW_OWNER_LOOKS at desktop and phone.
  • Test: test/preview-moved.test.ts seeds a preview, fetches the page as the admin, and finds Moved from preview-admin/moved on in the first-paint HTML. It also checks the recorded move and that both looks are listed.
  • Checks: bun x tsc --noEmit and scripts/gate.ts passed. The new test and test/preview-looks.test.ts pass (9 tests). The sandbox logs git spawn errors from fork-following during seeding, but the tests still pass.
  • Not done: there is no browser in my sandbox, so the pull's recorded phone look has not been captured yet. The scrollWidth value for /preview-ada/moved at 390 px has to come from the preview's looks once the forge deploys this push. I have not seen the look, so I'm not claiming it is at most 390.
  • Left out: previews that were already seeded before this change do not get the moved repository, because the seed runs once per admin. Each pull's preview is seeded fresh, so this only affects long-lived previews.

Closes #10195

commented

The preview seed now makes one repository that was moved just now, and its head page is in the owner looks at desktop and phone. I did not record a phone scrollWidth, so the last checkbox is open.

  • Seed: seedMoved in src/spawn/preview-seed.ts creates preview-admin/moved, commits a README, and moves it to preview-ada with transferRepository, the same action a person uses. It then requests /preview-ada/moved as the admin. The seed refuses to finish unless that answers 200 and its HTML holds moved-from. It runs once, after the fork family, so the other seeded numbers are unchanged.
  • Looks: PREVIEW_MOVED_PAGE is new in src/spawn/preview-looks.ts and is in PREVIEW_OWNER_LOOKS at desktop and phone.
  • Test: test/preview-moved.test.ts seeds a preview, fetches the page as the admin, and finds Moved from preview-admin/moved on in the first-paint HTML. It also checks the recorded move and that both looks are listed.
  • Checks: bun x tsc --noEmit and scripts/gate.ts passed. The new test and test/preview-looks.test.ts pass (9 tests). The sandbox logs git spawn errors from fork-following during seeding, but the tests still pass.
  • Not done: there is no browser in my sandbox, so the pull's recorded phone look has not been captured yet. The scrollWidth value for /preview-ada/moved at 390 px has to come from the preview's looks once the forge deploys this push. I have not seen the look, so I'm not claiming it is at most 390.
  • Left out: previews that were already seeded before this change do not get the moved repository, because the seed runs once per admin. Each pull's preview is seeded fresh, so this only affects long-lived previews.
Changes requested — before the latest push

The seed, the look entries and the test are sound, and the preview's /preview-ada/moved answers 200 with the moved-from line in the first-paint HTML. No security findings. One thing blocks: box 4 is unmet. The pull description does not quote a recorded phone scrollWidth (at most 390) for /preview-ada/moved, and no look of that page is among the pictures taken at this head. Fix first: confirm the forge's looks list and capture /preview-ada/moved at phone and desktop (the PREVIEW_OWNER_LOOKS entry should produce it after the next push), read the phone look to confirm the line shows, and quote its recorded scrollWidth (<=390) in the description. If the look is still not captured, say why and fix the cause. Minor: the seed's dynamic import('../http/server.ts') is worth a one-line comment on why it is lazy, or use a static import if no cycle exists.

commented

The static import is committed locally but not pushed: both pushes failed with CONNECT tunnel failed, response 502. The sandbox proxy refused the connection to the forge. I need the push retried.

The blocking item is still open. I have no recorded phone scrollWidth for /preview-ada/moved, so I'm not quoting one.

  • Why I can't get it: this sandbox has no browser, and it can't reach this pull's preview. curl to https://lab--10261--forge-trevato-apps.open-platform.sh/ returned 000. The forge's API read that I tried (pulls/10261) printed nothing, and with the 502 above I could not read the looks there either.
  • What I'm sure of: PREVIEW_MOVED_PAGE is in PREVIEW_OWNER_LOOKS at desktop and phone, and test/preview-looks.test.ts asserts both entries. Whether the looks service has captured them at this head I can't confirm from here.
  • What a person needs to do: open the phone look of /preview-ada/moved once the forge has captured it, confirm the "Moved from preview-admin/moved on <date>" line shows, and read its recorded scrollWidth. If no look exists at the pushed head, the cause is on the looks-service side. I haven't found it.

Import comment: the lazy import("../http/server.ts") in src/spawn/preview-seed.ts had no cycle behind it. It is now a static import, and I removed both lazy uses (the new seedMoved and the older seedSettingsPages). tsc and scripts/gate.ts are clean, the new test and test/preview-looks.test.ts pass (9 tests), and src/main.ts still boots.

Changes requested — before the latest push

The seed, the look entries and the test read well: it moves through transferRepository, refuses to finish unless the page is 200 and holds moved-from, the lazy import is now static, and the test checks first-paint HTML. No security findings. One thing blocks, and it is box 4: the description says outright that it quotes no recorded phone scrollWidth, and the issue requires the description to quote the phone look's recorded scrollWidth (<= 390) for /preview-ada/moved, with the line showing in that look.

Fix first: after the next push, read the phone look of /preview-ada/moved from the looks the forge records at this head, confirm the Moved from line shows, and edit the description to quote its scrollWidth (must be <= 390). If the look is not captured, find why (PREVIEW_OWNER_LOOKS holds the entry at desktop and phone) and fix the cause. If the width is over 390, fix the layout of the moved-from line. Note: when I fetched /preview-ada/moved on this pull's preview it answered 502, so confirm the preview is up and serving this head before reading the look.

Nothing else needs changing.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

This pull's preview seed now creates a repository called moved and moves it from preview-admin to preview-ada, so /preview-ada/moved shows "Moved from preview-admin/moved on <date>". There is still no recorded phone look of that page, so I'm not quoting a phone scrollWidth. The looks service on the forge does not take the owner-only pages for any pull.

  • Seed: seedMoved in src/spawn/preview-seed.ts uses transferRepository, the same move a person makes. It then fetches /preview-ada/moved as the admin, and the seed fails unless that answers 200 with moved-from in the HTML.
  • Looks list: PREVIEW_MOVED_PAGE is added to PREVIEW_OWNER_LOOKS at desktop and phone, in src/spawn/preview-looks.ts.
  • Test: test/preview-moved.test.ts seeds a preview and finds Moved from preview-admin/moved on in the first-paint HTML. It also checks the recorded move and that both look entries are listed.
  • Review feedback: the lazy import("../http/server.ts") in src/spawn/preview-seed.ts had no import cycle behind it. It is now a static import, in both seedMoved and the older seedSettingsPages (commit 6589e5ac7).
  • On the preview: at head 2bf7dada8, /preview-ada/moved answers 200 and its HTML contains "Moved from preview-admin/moved on".

Why there is no phone look: at this head the looks service took exactly the 24 pages in forge.json app.looks and none of the owner-only pages. Besides the moved page, it skipped /preview-admin/hello, the pull's Files tab, Iterations and /settings/*. Pulls #10254 and #10267 are the same.

  • ownerLooksFor adds those pages only when the forge's forgeRepo (FORGE_REPO) equals trevato/forge.
  • My guess, not checked: the forge's FORGE_REPO is unset or names another repository. The comment in src/app.ts:186 gives trevato-apps/forge as its example.
  • That is forge configuration, outside this pull, and I can't read it from the sandbox.
  • With no browser here, I can't take the picture and attach it myself either.
  • Once the owner looks are taken, the phone look of /preview-ada/moved will record its scrollWidth, and that closes the last checkbox.

Nothing new was pushed in this round. bun x tsc --noEmit and bun scripts/gate.ts passed, as did test/preview-moved.test.ts and test/preview-looks.test.ts. The forge's check is green on 2bf7dada8.

To try it: curl -H "authorization: Bearer $FORGE_TOKEN" https://lab--10261--forge-trevato-apps.open-platform.sh/preview-ada/moved and look for "Moved from preview-admin/moved on".

🤖 Generated with Claude Code

Approved

Since my last review the only change is the lazy import of ../http/server.ts becoming a static import (seedMoved and seedSettingsPages); that ask is met. No security findings: the move goes through transferRepository, the session made for the self-check is destroyed in finally, the page is checked for 200 and moved-from, and the test reads the first-paint HTML. Non-blocking: box 4 stays open. The looks the forge recorded at this head do not include /preview-ada/moved, because the owner-only looks are not captured on this forge, so there is no phone scrollWidth to quote. That cause is outside this pull. Once the owner looks are taken, quote the phone look scrollWidth (at most 390) in the description.

commented

Left #10195 open: 1 unticked item remain (The pull's phone look shows the line, and the description quotes that look's recorded scrollWidth at most 390.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs