diff --git a/AGENT-INSTALL.md b/AGENT-INSTALL.md index ffb0f4c..730e270 100644 --- a/AGENT-INSTALL.md +++ b/AGENT-INSTALL.md @@ -166,7 +166,7 @@ When you've connected, say **done**. #### What Patchstack found 🔴 High **1** · 🟠 Medium **3** · 🔵 Low **1** · 12 packages outdated · 12 protection rules available -**Refresh your app's preview** to see the Patchstack widget. +**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page. _Patchstack is now part of your install and build. Your API key is in `.patchstackrc.local.json`: git ignores it, so never share it._ ```` @@ -177,7 +177,7 @@ The parts always come in that order. Fill each from the output, and leave out a 2. **Headline.** What was checked and found, as the heading. When the output gives no counts, write "Patchstack is now watching your app." Never estimate a count the output did not print. 3. **What to do now.** The next step from the `Next:` line, as the heading, with its link or command written out in full on its own line. Only that step: the items under `To do` are yours to finish, not the person's. Then: "When you've connected, say **done**." (or "When that's done, say **done**." for any other step). 4. **What Patchstack found.** The severity counts, outdated packages and protection rules exactly as the output lists them. Leave it out when nothing was found: the headline already says so. -5. **Notes.** "**Refresh your app's preview** to see the Patchstack widget." when setup added the widget; any line the output marks `ℹ`, except the one about no server. +5. **Notes.** "**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page." when setup added the widget; any line the output marks `ℹ`, except the one about no server. 6. **What changed.** One line in italics: that Patchstack is now part of the install and build, and where the API key is (git ignores it; never share it). ### Commands for later diff --git a/src/cli.ts b/src/cli.ts index 5626c0e..22c0175 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1949,7 +1949,7 @@ async function runWidget(args: ParsedArgs): Promise { console.log(` ${buildWidgetTag(state.siteUuid)}`); break; } - console.log(` ${paint('dim', 'Refresh your preview to see it. Your live site gets it with your next deploy.')}`); + console.log(` ${paint('dim', 'Reload your app\'s preview page to see it in a bottom corner of the page. Your live site gets it with your next deploy.')}`); return 0; } diff --git a/src/report.ts b/src/report.ts index c14fb0c..362764d 100644 --- a/src/report.ts +++ b/src/report.ts @@ -378,7 +378,7 @@ export function renderSummary(report: StatusReport, progress: Progress, context: lines.push('#### What Patchstack found', parts.join(' · '), ''); } - if (options.widgetOnPage) lines.push("**Refresh your app's preview** to see the Patchstack widget.", ''); + if (options.widgetOnPage) lines.push("**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.", ''); // A fact about the app, not a step: the ones that matter here are what protection does not cover. for (const item of report.missing.filter((entry) => entry.note === true && entry.key !== 'runtime-protection')) { lines.push(item.plain?.text ?? item.text, ''); diff --git a/tests/bin-invocation.test.ts b/tests/bin-invocation.test.ts index 4bbfa6c..ff6b97a 100644 --- a/tests/bin-invocation.test.ts +++ b/tests/bin-invocation.test.ts @@ -843,7 +843,7 @@ describe.skipIf(!built)('the packaged bin, invoked as npm invokes it', () => { // The summary is what sits between its heading and the closing line for the assistant. const summary = setup.slice(setup.indexOf('──── Summary ────'), setup.lastIndexOf('\n\nYour reply to the person')); - expect(summary).toContain("**Refresh your app's preview** to see the Patchstack widget."); + expect(summary).toContain("**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page."); expect(summary).toContain('Your API key is in `.patchstackrc.local.json`: git ignores it, so never share it.'); expect(summary).toContain(`When you've connected, say **done**.`); // Every file setup changed is still listed for the person, in the report above the summary. diff --git a/tests/install-prompt.test.ts b/tests/install-prompt.test.ts index a11351e..102e265 100644 --- a/tests/install-prompt.test.ts +++ b/tests/install-prompt.test.ts @@ -54,7 +54,7 @@ describe('the install prompt', () => { { installCommand: 'npm install --save @patchstack/connect', siteUuid: 's', claimUrl: 'https://example.com/claim', environment: 'sandbox' }, { widgetOnPage: true, dashboardUrl: null }, ).join('\n'); - expect(summary).toMatch(/Refresh your app's preview\*\* to see the Patchstack widget/); + expect(summary).toContain("**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page."); }); it('makes the widget part of the install rather than a question for the user', () => { diff --git a/tests/report.test.ts b/tests/report.test.ts index 4127c84..c194f9b 100644 --- a/tests/report.test.ts +++ b/tests/report.test.ts @@ -201,7 +201,7 @@ describe('renderSummary', () => { '#### What Patchstack found', '🔴 High **1** · 🟠 Medium **3** · 🔵 Low **1** · 12 packages outdated · 12 protection rules available', '', - "**Refresh your app's preview** to see the Patchstack widget.", + "**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.", ]); }); @@ -225,7 +225,7 @@ describe('renderSummary', () => { '', `When you've connected, say **done**.`, '', - "**Refresh your app's preview** to see the Patchstack widget.", + "**Reload your app's preview page.** The Patchstack widget appears in a bottom corner of the page.", '', `_Patchstack is now part of your install and build. Your API key is in \`${SECRET_CONFIG_FILENAME}\`: git ignores it, so never share it._`, ]);