Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ updates:
time: "09:00"
timezone: "Asia/Kolkata"
open-pull-requests-limit: 5
groups:
dependencies:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "chore(web)"
include: "scope"
Expand All @@ -60,6 +65,11 @@ updates:
time: "09:00"
timezone: "Asia/Kolkata"
open-pull-requests-limit: 5
groups:
dependencies:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "chore(widget)"
include: "scope"
Expand All @@ -80,6 +90,11 @@ updates:
time: "09:00"
timezone: "Asia/Kolkata"
open-pull-requests-limit: 5
groups:
dependencies:
update-types:
- "minor"
- "patch"
commit-message:
prefix: "chore(ui)"
include: "scope"
Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

> Changes staged for the next release.
### Changed

#### Production widget URL & dashboard entry point

- Replaced the hardcoded `http://localhost:3001` widget origin with the
deployed widget URL (`https://echo-widget-steel.vercel.app`) in:
- `apps/embed/landing.html` — the embed demo page
- `apps/web/modules/integrations/constants/index.ts` — the HTML, React,
Next.js, and vanilla JS snippets shown on the dashboard's Integrations
page, so copy-pasted embed code now points at the live widget instead of
a developer's local machine
- `apps/widget/public/widget.js` — rebuilt with `VITE_WIDGET_URL` set to the
deployed origin (`apps/embed/config.ts`'s `localhost:3001` remains as the
local-development fallback only)
- `apps/web/next.config.ts` — added a redirect from `/` to `/conversations` so
the dashboard opens directly on the operator inbox instead of a blank root

### Fixed

#### CI: group Dependabot updates for apps/web, apps/widget, packages/ui

- Dependabot's single-dependency PRs in this pnpm workspace never
regenerated `pnpm-lock.yaml` (only `package.json`), so every one of them
failed CI at `pnpm install --frozen-lockfile` with
`ERR_PNPM_OUTDATED_LOCKFILE`. The root workspace entry already used
`groups` and its grouped PRs correctly updated the lockfile and passed.
- Mirrored that grouping onto `apps/web`, `apps/widget`, and `packages/ui` so
future minor/patch updates land as working, grouped PRs instead of broken
single-dependency ones.

---

Expand Down
2 changes: 1 addition & 1 deletion apps/embed/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<script
src="http://localhost:3001/widget.js"
src="https://echo-widget-steel.vercel.app/widget.js"
data-organization-id="org_3GDxOdnkI7GmhCAZjUHDeCrA8M2"
></script>
</body>
Expand Down
8 changes: 4 additions & 4 deletions apps/web/modules/integrations/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const INTEGRATIONS = [

export type IntegrationId = (typeof INTEGRATIONS)[number]["id"]

export const HTML_SCRIPT = `<script src="http://localhost:3001/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const REACT_SCRIPT = `<script src="http://localhost:3001/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const NEXTJS_SCRIPT = `<script src="http://localhost:3001/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const JAVASCRIPT_SCRIPT = `<script src="http://localhost:3001/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const HTML_SCRIPT = `<script src="https://echo-widget-steel.vercel.app/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const REACT_SCRIPT = `<script src="https://echo-widget-steel.vercel.app/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const NEXTJS_SCRIPT = `<script src="https://echo-widget-steel.vercel.app/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
export const JAVASCRIPT_SCRIPT = `<script src="https://echo-widget-steel.vercel.app/widget.js" data-organization-id="{{ORGANIZATION_ID}}"></script>`
9 changes: 9 additions & 0 deletions apps/web/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import type { NextConfig } from "next"
const nextConfig: NextConfig = {
transpilePackages: ["@workspace/ui"],
devIndicators: false,
async redirects() {
return [
{
source: "/",
destination: "/conversations",
permanent: false,
},
]
},
}

export default withSentryConfig(nextConfig, {
Expand Down
6 changes: 3 additions & 3 deletions apps/widget/public/widget.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(function(){"use strict";const o={WIDGET_URL:"http://localhost:3001",DEFAULT_POSITION:"bottom-right"},p=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
(function(){"use strict";const o={WIDGET_URL:"https://echo-widget-steel.vercel.app",DEFAULT_POSITION:"bottom-right"},u=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg>`,b=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>`;(function(){let n=null,t=null,e=null,d=!1,r=null,a=o.DEFAULT_POSITION;const c=document.currentScript;if(c)r=c.getAttribute("data-organization-id"),a=c.getAttribute("data-position")||o.DEFAULT_POSITION;else{const i=document.querySelectorAll('script[src*="embed"]'),s=Array.from(i).find(l=>l.hasAttribute("data-organization-id"));s&&(r=s.getAttribute("data-organization-id"),a=s.getAttribute("data-position")||o.DEFAULT_POSITION)}if(!r){console.error("Echo Widget: data-organization-id attribute is required");return}function h(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g()}function g(){e=document.createElement("button"),e.id="echo-widget-button",e.innerHTML=p,e.style.cssText=`
</svg>`;(function(){let n=null,t=null,e=null,d=!1,r=null,a=o.DEFAULT_POSITION;const c=document.currentScript;if(c)r=c.getAttribute("data-organization-id"),a=c.getAttribute("data-position")||o.DEFAULT_POSITION;else{const i=document.querySelectorAll('script[src*="embed"]'),s=Array.from(i).find(l=>l.hasAttribute("data-organization-id"));s&&(r=s.getAttribute("data-organization-id"),a=s.getAttribute("data-position")||o.DEFAULT_POSITION)}if(!r){console.error("Echo Widget: data-organization-id attribute is required");return}function h(){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g()}function g(){e=document.createElement("button"),e.id="echo-widget-button",e.innerHTML=u,e.style.cssText=`
position: fixed;
${a==="bottom-right"?"right: 20px;":"left: 20px;"}
bottom: 20px;
Expand Down Expand Up @@ -40,4 +40,4 @@
width: 100%;
height: 100%;
border: none;
`,n.allow="microphone; clipboard-read; clipboard-write",t.appendChild(n),document.body.appendChild(t),window.addEventListener("message",f)}function w(){const i=new URLSearchParams;return i.append("organizationId",r),`${o.WIDGET_URL}?${i.toString()}`}function f(i){if(i.origin!==new URL(o.WIDGET_URL).origin)return;const{type:s,payload:l}=i.data;switch(s){case"close":u();break;case"resize":l.height&&t&&(t.style.height=`${l.height}px`);break}}function y(){d?u():m()}function m(){t&&e&&(d=!0,t.style.display="block",setTimeout(()=>{t&&(t.style.opacity="1",t.style.transform="translateY(0)")},10),e.innerHTML=b)}function u(){t&&e&&(d=!1,t.style.opacity="0",t.style.transform="translateY(10px)",setTimeout(()=>{t&&(t.style.display="none")},300),e.innerHTML=p,e.style.background="#3b82f6")}function x(){window.removeEventListener("message",f),t&&(t.remove(),t=null,n=null),e&&(e.remove(),e=null),d=!1}function v(i){x(),i.organizationId&&(r=i.organizationId),i.position&&(a=i.position),h()}window.EchoWidget={init:v,show:m,hide:u,destroy:x},h()})()})();
`,n.allow="microphone; clipboard-read; clipboard-write",t.appendChild(n),document.body.appendChild(t),window.addEventListener("message",f)}function w(){const i=new URLSearchParams;return i.append("organizationId",r),`${o.WIDGET_URL}?${i.toString()}`}function f(i){if(i.origin!==new URL(o.WIDGET_URL).origin)return;const{type:s,payload:l}=i.data;switch(s){case"close":p();break;case"resize":l.height&&t&&(t.style.height=`${l.height}px`);break}}function y(){d?p():m()}function m(){t&&e&&(d=!0,t.style.display="block",setTimeout(()=>{t&&(t.style.opacity="1",t.style.transform="translateY(0)")},10),e.innerHTML=b)}function p(){t&&e&&(d=!1,t.style.opacity="0",t.style.transform="translateY(10px)",setTimeout(()=>{t&&(t.style.display="none")},300),e.innerHTML=u,e.style.background="#3b82f6")}function x(){window.removeEventListener("message",f),t&&(t.remove(),t=null,n=null),e&&(e.remove(),e=null),d=!1}function v(i){x(),i.organizationId&&(r=i.organizationId),i.position&&(a=i.position),h()}window.EchoWidget={init:v,show:m,hide:p,destroy:x},h()})()})();
Loading