[NO-TICKET] Offer all three ways to connect a site, and correct what the widget shows - #277
Merged
Merged
Conversation
…hows The CLI named two routes to attaching a site to an account — the dashboard link and `claim` — and left out the shortest one: the widget's own "Connect this website" panel, already rendered on the preview the person is looking at. All three now appear, with the panel first. The same output also promised a visible "Report a vulnerability" button straight after install. The widget serves the connect panel instead of that button until the site is claimed, so on a fresh install that promise is always wrong, and the person refreshes the preview looking for a control that is not there yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
/review |
|
Clear CLI and documentation updates unify site connection flows 🎯 Quality: 100% Elite · 📦 Size: Small 📈 This month: Your 145th PR — above team average · Averaging Excellent |
daniloradovic
approved these changes
Sep 21, 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.
What changed
guide,scan,setupandstatusnow list three ways to attach a site to a Patchstack account, and lead with the widget's own "Connect this website" panel — already rendered on the preview the person is looking at, needing no terminal and no copied URL. The dashboard link andnpx @patchstack/connect claimfollow it.AGENT-INSTALL.mdcarries the same order.The same output no longer promises a visible "Report a vulnerability" button.
Why the button was never there
The widget's public reference (
cdn.patchstack.com/llm.html,data-build-mode, on by default) is explicit: while a site is unclaimed the widget shows a one-time "connect website" onboarding instead of the report button, and the button appears only once the site is claimed.A fresh install is always unclaimed, so
Widget: added the "Report a vulnerability" tag … Reload your preview to see itdescribed something that could not be on the page yet. Agents repeat that line to the person verbatim, who refreshes the preview hunting for a control that only exists after a step nobody told them to take.The same reference says claiming is meant to happen in the builder's edit preview, where the connect panel shows by default. So the route the output left out is the one the product is built around, and the two it named are the fallbacks.
Fix
src/guide.ts— "Dashboard link" becomes "Connect this site to your Patchstack account", a numbered list of all three routes. The widget entry is dropped when the tag is not in place, so the numbering stays truthful for a project without one.src/guide.ts— the preview-refresh step now names the control that actually appears: the connect panel while unclaimed, the report button after.src/cli.ts— the same three routes afterscan;statusand thesetupsummary name the panel alongside the link andclaim.AGENT-INSTALL.md— step 6 becomes the three routes, and the widget is described as a control whose form follows claim state, with an explicit instruction not to promise the button on a site that has no account yet.How it was verified
npm test(3252 passed, 197 files),npm run typecheckandnpm run capabilities:checkare green. Builtdist/and rancli.js guideagainst a throwaway fixture carrying a widget tag, to read the rendered checklist rather than infer it.tests/guide.test.tsgains an assertion that the checklist does not promise the button before the site has an owner.The field-test gate is outstanding, not met.
src/guide.tsandAGENT-INSTALL.mdare read by the fixture from the published tarball, so a run today would audit the previous release's text and say nothing about this change. It needsnode field-test/run.mjs --persona hostile --rounds 3, plusstandardorlovablefor document accuracy, immediately after the release that carries it. Until then the deterministic gates above are what stand behind it.Out of scope, worth a follow-up
The install prompt still says "tell me to refresh the preview if the 'Report a vulnerability' button is not showing yet" — the same inaccuracy, from the other direction. It is the byte-identical artifact in
README.md,GETTING-STARTED.mdandfield-test/prompt.txt, so correcting it means all three together plus a hostile run before shipping. That is a different shape of change and deserves its own PR.Docs: the public documentation carried the same problem plus a separate bug — it told readers to set
data-report-form="true"to reveal the button, an attribute the widget does not read. Fixed in patchstack/documentation#88.🤖 Generated with Claude Code