From 800dd52b3e631f4ad049836cb3c13fcb9a4e078c Mon Sep 17 00:00:00 2001 From: hongyi-chen Date: Tue, 19 May 2026 05:56:46 +0000 Subject: [PATCH 1/2] Remove PushFeedback integration Removes the 'Was this helpful?' PushFeedback widget from both the Starlight footer (every docs page) and the standalone Scalar API reference at /api. Per Hong Yi: PushFeedback wasn't on a team plan and submissions were sparse, so it can be removed for now and re-introduced later with a Warp-built tool. Changes: - Delete src/components/FeedbackButtons.astro (purely PushFeedback). - Strip FeedbackButtons reference + comments from src/components/FeedbackFooter.astro. The custom footer still drops EditLink + LastUpdated relative to Starlight's default (preserves current visible layout). - Remove FeedbackButtons usage, comments, and .api-feedback-* styles from src/pages/api.astro. Theme script comments updated to drop PushFeedback's contract references (html[data-theme] is retained for the first-paint canvas color rules). - Drop PUBLIC_PUSHFEEDBACK_PROJECT_ID envField from astro.config.mjs and .env.example. - Remove https://app.pushfeedback.com from the connect-src directive in all three vercel.json CSP entries. Verified with `npm run build` (319 pages built clean). Co-Authored-By: Oz --- .env.example | 7 +- astro.config.mjs | 11 -- src/components/FeedbackButtons.astro | 162 --------------------------- src/components/FeedbackFooter.astro | 10 +- src/pages/api.astro | 104 +---------------- vercel.json | 6 +- 6 files changed, 11 insertions(+), 289 deletions(-) delete mode 100644 src/components/FeedbackButtons.astro diff --git a/.env.example b/.env.example index e0df515a..1cf7d104 100644 --- a/.env.example +++ b/.env.example @@ -1,15 +1,10 @@ # Copy to `.env` (or set via your shell) to enable optional integrations. # `.env`, `.env.local`, and `.env.production` are all gitignored. # -# Both of these values are PUBLIC (they're shipped to the browser by Astro's +# Values below are PUBLIC (they're shipped to the browser by Astro's # `envField`, and live behind rate limiting / allow-lists on the vendor side). # Kapa Custom Frontend integration ID for the "Ask AI" button in the header. # If unset, the Ask AI button is hidden and the site still runs normally. # Get yours at: https://app.kapa.ai/admin PUBLIC_KAPA_INTEGRATION_ID= - -# PushFeedback project ID for the per-page "Was this helpful?" widget and the -# feedback widget on the Scalar API page. If unset, both widgets are hidden. -# Dashboard: https://app.pushfeedback.com -PUBLIC_PUSHFEEDBACK_PROJECT_ID= diff --git a/astro.config.mjs b/astro.config.mjs index 10fac584..6a4ed7b9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -20,11 +20,6 @@ export default defineConfig({ access: 'public', optional: true, }), - PUBLIC_PUSHFEEDBACK_PROJECT_ID: envField.string({ - context: 'client', - access: 'public', - optional: true, - }), PUBLIC_RUDDERSTACK_WRITE_KEY: envField.string({ context: 'client', access: 'public', @@ -82,12 +77,6 @@ export default defineConfig({ // on every page on docs.warp.dev today; Starlight does not produce // them by default. Per-page OG/Twitter tags (image, branded title, // twitter:title/description) live in src/components/CustomHead.astro. - // - // PushFeedback CSS + JS used to live here, but they were render- - // blocking on every page even though the widget itself only sits - // at the bottom of the page in `FeedbackFooter.astro`. The lazy - // loader now lives inside `FeedbackButtons.astro` and pulls the - // assets in `requestIdleCallback` time — off the critical path. { tag: 'meta', attrs: { name: 'robots', content: 'index, follow' }, diff --git a/src/components/FeedbackButtons.astro b/src/components/FeedbackButtons.astro deleted file mode 100644 index 326a5f3a..00000000 --- a/src/components/FeedbackButtons.astro +++ /dev/null @@ -1,162 +0,0 @@ ---- -/** - * Shared PushFeedback thumbs-up/down widget. - * - * Used by: - * - `FeedbackFooter.astro` — appears at the bottom of every Starlight page - * - `pages/api.astro` — fixed bottom-right on the standalone /api page - * - * Both call sites previously hand-rolled the same markup (identical SVG - * paths, identical `` props). This consolidates them so - * future changes (icons, label, modal-position) land in one place. - * - * The PushFeedback CDN assets used to ship in the page `` (via - * `astro.config.mjs` for Starlight pages and inline for `/api`), which - * meant a render-blocking CSS round-trip + a deferred 70 KB+ script on - * every page even though the widget only renders below the fold. The - * inline ` -
- {question} - - - Yes - - - - No - -
- -)} - - diff --git a/src/components/FeedbackFooter.astro b/src/components/FeedbackFooter.astro index c6ae987b..c20f47a5 100644 --- a/src/components/FeedbackFooter.astro +++ b/src/components/FeedbackFooter.astro @@ -1,15 +1,11 @@ --- -// Custom footer with PushFeedback "Was this helpful?" widget. -// PushFeedback CDN is loaded via Starlight's `head` config in astro.config.mjs. -// Dashboard: https://app.pushfeedback.com +// Custom footer: drops EditLink + LastUpdated from Starlight's default +// footer and keeps Pagination + the Starlight credits link. import Pagination from 'virtual:starlight/components/Pagination'; import config from 'virtual:starlight/user-config'; -import FeedbackButtons from './FeedbackButtons.astro'; ---
- - { @@ -22,8 +18,6 @@ import FeedbackButtons from './FeedbackButtons.astro';
diff --git a/vercel.json b/vercel.json index a2df40b6..dcf4647d 100644 --- a/vercel.json +++ b/vercel.json @@ -29,7 +29,7 @@ }, { "key": "Content-Security-Policy", - "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.pushfeedback.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" + "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" } ] }, @@ -38,7 +38,7 @@ "headers": [ { "key": "Content-Security-Policy", - "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.pushfeedback.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" + "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" } ] }, @@ -47,7 +47,7 @@ "headers": [ { "key": "Content-Security-Policy", - "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.pushfeedback.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" + "value": "default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://www.google.com https://www.gstatic.com https://cdn.jsdelivr.net https://cdn.rudderlabs.com https://polyfill-fastly.io; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; font-src 'self' https://fonts.gstatic.com https://cdn.jsdelivr.net; img-src 'self' data: https:; frame-src https://www.youtube-nocookie.com https://www.loom.com https://drive.google.com https://www.google.com; connect-src 'self' https://va.vercel-scripts.com https://vitals.vercel-insights.com https://*.kapa.ai https://www.google.com https://app.warp.dev https://api.rudderstack.com; frame-ancestors 'none'" } ] }, From 68ead8123d782d89b6ffc94f9935b77d2bc1213a Mon Sep 17 00:00:00 2001 From: hongyi-chen Date: Tue, 19 May 2026 06:06:15 +0000 Subject: [PATCH 2/2] Remove footer top divider line The border-top + padding-top on the footer were originally added to visually separate the PushFeedback widget from the page content. With the widget gone (#100), the divider no longer separates anything meaningful, so drop it. The pagination card and Starlight credits keep their own spacing via the existing footer gap + margin-top. Co-Authored-By: Oz --- src/components/FeedbackFooter.astro | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/FeedbackFooter.astro b/src/components/FeedbackFooter.astro index c20f47a5..8c085df1 100644 --- a/src/components/FeedbackFooter.astro +++ b/src/components/FeedbackFooter.astro @@ -23,8 +23,6 @@ import config from 'virtual:starlight/user-config'; flex-direction: column; gap: 1.25rem; margin-top: 2rem; - padding-top: 1.25rem; - border-top: 1px solid var(--sl-color-hairline-light); } .kudos { align-items: center;