Skip to content

Commit 1fd37a9

Browse files
authored
Release Candidate v6.1.2 (#456)
2 parents df99942 + 52ca827 commit 1fd37a9

24 files changed

Lines changed: 1008 additions & 75 deletions

‎.env.example‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
VITE_APP_BASE_URL=https://webapp.agent.com
55
# VITE_APP_BASE_URL=http://localhost:5173
66

7+
# Google Analytics 4 (leave measurement ID empty to disable analytics)
8+
VITE_ANALYTICS_MEASUREMENT_ID=
9+
VITE_ANALYTICS_DEBUG_MODE=false
10+
711
# Base URL for the backend API
812
VITE_API_BASE_URL=https://api.agent.com
913
# VITE_API_BASE_URL=http://192.168.x.x

‎.github/workflows/release-push.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
VITE_LANDING_PAGE_URL: ${{ vars.VITE_LANDING_PAGE_URL }}
3636
VITE_APP_NAME: ${{ vars.VITE_APP_NAME }}
3737
VITE_APP_NAME_SHORT: ${{ vars.VITE_APP_NAME_SHORT }}
38+
VITE_ANALYTICS_MEASUREMENT_ID: ${{ vars.VITE_ANALYTICS_MEASUREMENT_ID }}
39+
VITE_ANALYTICS_DEBUG_MODE: ${{ vars.VITE_ANALYTICS_DEBUG_MODE }}
3840
run: bun run build
3941

4042
- name: Upload artifact

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "agent-web",
33
"private": true,
4-
"version": "6.0.0",
4+
"version": "6.1.2",
55
"type": "module",
66
"scripts": {
77
"clean": "rm -rf dist .vite node_modules/.vite",

‎src/App.tsx‎

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { useEffect } from "react";
12
import { Toaster } from "@/components/ui/sonner";
23
import { Button } from "@/components/ui/button";
3-
import { Routes, Route, Navigate } from "react-router-dom";
4+
import { Route, Routes, useLocation } from "react-router-dom";
45
import ChatSettingsPage from "@/pages/ChatSettingsPage";
56
import UserSettingsPage from "@/pages/UserSettingsPage";
67
import AccessSettingsPage from "@/pages/AccessSettingsPage";
@@ -14,8 +15,38 @@ import OnboardingPage from "@/pages/OnboardingPage";
1415
import logoVector from "@/assets/logo-vector.svg";
1516
import { DEFAULT_LANGUAGE } from "@/lib/languages";
1617
import { t } from "@/lib/translations";
18+
import {
19+
trackFeatureAction,
20+
trackPageError,
21+
trackPageView,
22+
} from "@/lib/analytics";
23+
24+
function RootRedirect() {
25+
useEffect(() => {
26+
window.location.replace(import.meta.env.VITE_LANDING_PAGE_URL);
27+
}, []);
28+
29+
return null;
30+
}
1731

1832
function NotFoundPage() {
33+
const location = useLocation();
34+
35+
useEffect(() => {
36+
trackPageView({
37+
pageId: "not_found",
38+
pageState: "not_found",
39+
occurrenceId: location.key,
40+
interfaceLanguage: DEFAULT_LANGUAGE.isoCode,
41+
});
42+
trackPageError({
43+
pageId: "not_found",
44+
occurrenceId: location.key,
45+
errorCategory: "not_found",
46+
errorCode: "route_not_found",
47+
});
48+
}, [location.key]);
49+
1950
return (
2051
<main className="settings-pane-atmosphere flex min-h-dvh items-center justify-center px-[1rem] py-[3rem]">
2152
<section className="relative w-full max-w-xl overflow-hidden rounded-3xl border border-border/80 bg-surface-raised/78 shadow-[0_24px_90px_oklch(0.04_0.01_292/0.32)]">
@@ -28,14 +59,23 @@ function NotFoundPage() {
2859
<p className="mt-[1.5rem] font-mono text-sm font-semibold tracking-[0.18em] text-blue-300">
2960
404
3061
</p>
31-
<h1 className="mt-[0.75rem] text-[clamp(2rem,8vw,3.5rem)] font-semibold leading-[1.05] tracking-[-0.045em] text-foreground">
62+
<h1 className="mt-[0.75rem] text-[clamp(1.875rem,7vw,3rem)] font-semibold leading-[1.05] tracking-[-0.045em] text-foreground">
3263
{t("not_found_page.title")}
3364
</h1>
3465
<p className="mt-[1rem] max-w-md text-base leading-7 text-muted-foreground">
3566
{t("not_found_page.description")}
3667
</p>
3768
<Button asChild size="lg" className="mt-[2rem] rounded-xl">
38-
<a href={import.meta.env.VITE_LANDING_PAGE_URL}>
69+
<a
70+
href={import.meta.env.VITE_LANDING_PAGE_URL}
71+
onClick={() =>
72+
trackFeatureAction({
73+
featureId: "not_found_recovery",
74+
action: "return",
75+
sourceArea: "not_found",
76+
})
77+
}
78+
>
3979
{t("not_found_page.action")}
4080
</a>
4181
</Button>
@@ -88,16 +128,8 @@ function App() {
88128
element={<OnboardingPage />}
89129
/>
90130
{/* Edge-cases */}
91-
<Route
92-
path="*"
93-
element={<NotFoundPage />}
94-
/>
95-
<Route
96-
path="/"
97-
element={
98-
<Navigate to={`/${DEFAULT_LANGUAGE.isoCode}/help`} replace />
99-
}
100-
/>
131+
<Route path="/" element={<RootRedirect />} />
132+
<Route path="*" element={<NotFoundPage />} />
101133
</Routes>
102134
<Toaster />
103135
</>

‎src/assets/i18n/ar.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@
534534
"invalid_social_card_video_configuration": "تكوين فيديو بطاقة التواصل الاجتماعي غير صالح",
535535
"invalid_social_card_mode": "وضع بطاقة التواصل الاجتماعي غير صالح"
536536
},
537+
"auth_required_page": {
538+
"title": "لم تسجّل الدخول",
539+
"description": "اطلب من وكيلك فتح إعداداتك.",
540+
"action": "العودة إلى الصفحة الرئيسية"
541+
},
537542
"not_found_page": {
538543
"title": "الصفحة غير موجودة",
539544
"description": "هذا العنوان لا يؤدي إلى مساحة وكيلك.",

‎src/assets/i18n/de.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@
534534
"invalid_social_card_video_configuration": "Ungültige Social-Card-Video-Konfiguration",
535535
"invalid_social_card_mode": "Ungültiger Social-Card-Modus"
536536
},
537+
"auth_required_page": {
538+
"title": "Du bist nicht angemeldet",
539+
"description": "Bitte deinen Agenten, deine Einstellungen zu öffnen.",
540+
"action": "Zur Startseite"
541+
},
537542
"not_found_page": {
538543
"title": "Seite nicht gefunden",
539544
"description": "Diese Adresse führt nicht zum Bereich deines Agenten.",

‎src/assets/i18n/en.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@
534534
"invalid_social_card_video_configuration": "Invalid social card video configuration",
535535
"invalid_social_card_mode": "Invalid social card mode"
536536
},
537+
"auth_required_page": {
538+
"title": "You’re not signed in",
539+
"description": "Ask your agent to open your settings.",
540+
"action": "Go home"
541+
},
537542
"not_found_page": {
538543
"title": "Page not found",
539544
"description": "This address does not lead to your agent's space.",

‎src/assets/i18n/es.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@
534534
"invalid_social_card_video_configuration": "Configuración de video de tarjeta social no válida",
535535
"invalid_social_card_mode": "Modo de tarjeta social no válido"
536536
},
537+
"auth_required_page": {
538+
"title": "No has iniciado sesión",
539+
"description": "Pídele a tu agente que abra tus ajustes.",
540+
"action": "Ir al inicio"
541+
},
537542
"not_found_page": {
538543
"title": "Página no encontrada",
539544
"description": "Esta dirección no lleva al espacio de tu agente.",

‎src/assets/i18n/fr.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@
534534
"invalid_social_card_video_configuration": "Configuration vidéo de carte sociale invalide",
535535
"invalid_social_card_mode": "Mode de carte sociale invalide"
536536
},
537+
"auth_required_page": {
538+
"title": "Vous n’êtes pas connecté",
539+
"description": "Demandez à votre agent d’ouvrir vos paramètres.",
540+
"action": "Retour à l’accueil"
541+
},
537542
"not_found_page": {
538543
"title": "Page introuvable",
539544
"description": "Cette adresse ne mène pas à l’espace de votre agent.",

0 commit comments

Comments
 (0)