Repository navigation
[NO-TICKET] Mark a one-line root layout, and end setup's output with the claim link - #461
Merged
Merged
Conversation
The marker step looked for <head> or <body> only at the start of a line. A v0 app's Next.js layout is written on one line (`return <html lang="en"><body …>…`), so it found no anchor, added no marker, and the published page never said which build it ran: the dashboard could not identify the live build. It now also anchors on a tag in the chain a `return` or an arrow function opens with, after trying line starts as before. A tag inside a string is not in such a chain and is still ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
/review |
|
🎯 Elite quality (94%) — Extends JSX shell anchoring to one-line root layouts, with tests covering the new path and a string false positive. 📦 Small 🤖 Written by Claude Code — going by its own attribution. Unknown whether a person read it; agents can report that with the |
daniloradovic
approved these changes
Oct 28, 2026
An assistant that ran setup reported only that the command succeeded and left out the summary, so the person never got the link to connect their Patchstack account. The instruction to pass the summary on came before it, in the middle of long output that an assistant may cut or skim. Setup's output, and summary's, now end with one line, the one an assistant is surest to read: include the summary above as written, and, while the site has no owner, with this link to connect the account. AGENT-INSTALL.md says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
/review |
devlob
approved these changes
Oct 28, 2026
devlob
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No ticket.
What changed
Two fixes from installing Patchstack on a v0 app published to Vercel:
scannow add Patchstack's production marker (window.__PATCHSTACK_PROD__/window.__PATCHSTACK_BUILD__) to a JSX root layout written on one line. That is the shape v0 generates for a Next.js app. The published page now says which build it runs.summary's, now end with one line telling the assistant to pass the summary on. While the site has no owner, that line carries the link to connect the Patchstack account.Why
The marker was missing.
findJsxShellAnchorinsrc/mark-build.tsmatched<heador<bodyonly at the start of a line. A v0 project'sapp/layout.tsxreads:<bodyfollows<html lang="en">on the same line, so the step found no anchor, returnedno-anchorand added nothing. The widget tag went in fine (a different step), so the published page loaded the widget but named no build. The dashboard could not identify the live build, anddoctor --urlflagged it.The claim link was dropped. The owner asked v0's assistant only to "install and set up @patchstack/connect by running
npx @patchstack/connect setup --widget". The assistant replied with nothing more than "completed with exit code 0" and never passed on the summary, so the person never saw the link to connect their account. The instruction to pass the summary on (SUMMARY_INTRO) is printed just before the summary, at the end of long output that an assistant may cut short or only skim. Setup already saves the summary to a file for exactly that reason.Fix
src/mark-build.ts):returnor an arrow function=>starts with. A tag inside a string ("<html><body>") is not in such a chain and is still ignored. Indentation comes from the line the tag is on, and the marker region goes in as the first child of<body>, as for any shell without<head>.src/report.ts,src/cli.ts):summaryClosingLine()is printed after the summary, as the very last line of setup's output. While the site has no owner it reads "Your reply to the person must include the summary above, as written, with this link to connect their Patchstack account: ". Otherwise it says the summary is their result and next step.npx @patchstack/connect summaryends the same way, from theclaimedandclaimUrlvalues.patchstackrc.jsonrecords.AGENT-INSTALL.md: "The message you end on" says the output ends with that line, and that reporting only success leaves the person without their results or the link.Verified
app/layout.tsx(shared by the owner):no-anchor;<body>, the file parses as TSX with no errors, and a second run changes nothing.tests/mark-build.test.ts, two new tests with synthetic fixtures:<html><body>inside a string is not an anchor.tests/bin-invocation.test.ts:/monitor/claim?site=<uuid>;summaryreprints the same summary and ends with the closing line;summary.mdis unchanged.npm run typecheck,npm run buildandcapabilities:checkare green. Fullnpm test: 4649 passed.Out of scope, worth a follow-up
vusercontent.netis already a preview domain (widget Test the published package, and fix two defects it found #190, SaaS #2355, both live), so v0's preview most likely runs on another host now, probably Vercel Sandbox's*.vercel.run. That needs the frame's actual URL before adding it.scan(every build runs one) once they update@patchstack/connect.Docs:
AGENT-INSTALL.mdupdated ("The message you end on"). This and the new last line of setup's output are what agents read, so the hostile field test is owed after the release that carries this, plusstandard/lovablefor doc accuracy.🤖 Generated with Claude Code