Repository navigation
Conversation
…tent The landing page described a product Supo isn't yet: invented metrics, placeholder testimonials, paid tiers with no billing, and API examples for an endpoint and SDKs that don't exist. - Remove TestimonialsSection, plus ClosingCTA and ProductShowcaseSection, which nothing rendered. - Hero: replace the 80% / 94% / 99.9% uptime SLA figures and the KPI mock with what Supo does, and an example conversation that shows a cited answer and a handoff using the widget's real handoff reply. - Features: describe retrieval with citations, the real handoff triggers and the actual channels (widget chat and email). - Pricing: one free alpha plan listing features that ship today. - Rename APIPlayground to DeveloperSection, with snippets that work against the published @supoapp/widget package, the script embed and /api/v1/knowledge/search. - Navbar and footer: replace dead "#" links with real sections and the repository's API reference, changelog and security policy (src/lib/site.ts).
With NEXT_PUBLIC_SUPO_DEMO_PRODUCT_ID set, the home page loads that product's widget through /widget.js, the same script embed customers use. mountDemoWidget() owns the lifecycle so it can be tested without React: - The script insert is deferred one tick, so React StrictMode's mount/unmount/remount loads the bundle once. - On unmount it destroys the widget and clears window.Supo and window.SupoSettings, so the launcher doesn't follow a visitor into the app after a client-side navigation. - A script that finishes loading after unmount tears down the instance it created. Tests run under happy-dom (new dev dependency). Each guard was checked by removing it and confirming its test fails. Also verified in Chromium against `next dev`: one widget, one bundle request, removed on navigation to /sign-in, remounted on back, and nothing loaded with the variable unset.
- README: a Mermaid diagram of indexing and answering, matching retrieve.ts, the chat route's handoff decision and missing-knowledge gaps. Checked with the Mermaid renderer. - README: document NEXT_PUBLIC_SUPO_DEMO_PRODUCT_ID and the steps to enable the landing-page demo. - CHANGELOG: landing page changes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a26f0f6be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Browsers send no Origin header on same-origin GETs, and isOriginAllowed rejects origin-less requests once a product has an allow-list. On Supo's own pages, such as the landing-page demo, the widget's config, message polling and realtime-token requests got a 403. The widget then silently fell back to defaults, and agent replies didn't arrive without Ably. Treat Sec-Fetch-Site: same-origin as a request from this deployment. Browsers set it and pages cannot. Cross-site requests are still checked against the allow-list. Reproduced in Chromium against `next dev` (config 403 with an allow-list), then verified: config 200 from the landing page, cross-site Origin 403, request without Origin or metadata 403, allow-listed Origin 200.
Summary
The landing page described a product Supo isn't yet:
api.supo.ai/v1/chatendpoint and Node/Python/PHP SDKs that don't exist#linksThis PR replaces all of it with real content and adds an optional live demo. It has three commits, each passing lint, typecheck and tests on its own.
1. Accurate landing content
TestimonialsSection, plusClosingCTAandProductShowcaseSection, which nothing rendered.handoff/policy.ts), and widget chat plus email instead of "social media".APIPlayground): snippets for the published@supoapp/widget@alpha(checked against the npm package's types), the script embed, andPOST /api/v1/knowledge/search.docs/API.md,CHANGELOG.mdandSECURITY.mdin this repository.2. Optional live demo widget
NEXT_PUBLIC_SUPO_DEMO_PRODUCT_IDis set, the home page loads that product's widget through/widget.js, the same embed customers use.mountDemoWidget()(src/lib/demo-widget.ts) handles the lifecycle:3. Docs
Testing
src/lib/__tests__/demo-widget.test.tsruns underhappy-dom, a new dev dependency pinned to a release from September.next dev):widget.jsrequest, and the widget config returns 200./sign-inand remounts on back. No widget console errors.bun auditreports no new findings.Enabling the demo after merge
NEXT_PUBLIC_SUPO_DEMO_PRODUCT_IDand redeploy. It is read at build time because/is static.