From 5f1b1b42120df5fad703031cac839b634c551786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=81=D0=B5=D0=BB=D1=8C?= Date: Sat, 14 Nov 2026 16:27:14 +0500 Subject: [PATCH] PEP-70: pug mascot next to the agents' questions Cartoon pug (inline SVG) on Home: sleeps when nothing waits, perks up with a speech bubble and question count when agents ask. Motion only without prefers-reduced-motion. Co-Authored-By: Claude Opus 5.5 --- apps/web/app/(app)/page.tsx | 4 +- apps/web/app/app.css | 10 ++++ apps/web/components/PugMascot.tsx | 89 +++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 apps/web/components/PugMascot.tsx diff --git a/apps/web/app/(app)/page.tsx b/apps/web/app/(app)/page.tsx index 97bb92a0..81f7fc99 100644 --- a/apps/web/app/(app)/page.tsx +++ b/apps/web/app/(app)/page.tsx @@ -1,5 +1,6 @@ import { listUserProjects, onboardingChecklist } from "@peppa/core"; import { OnboardingChecklist } from "@/components/Onboarding"; +import { PugBanner } from "@/components/PugMascot"; import { LiveRefresh } from "@/components/LiveRefresh"; import { ActivityAside } from "@/components/ActivityAside"; import { ProjectList, QuestionCard, SessionCard } from "@/components/cards"; @@ -20,7 +21,8 @@ export default async function Home({ searchParams }: { searchParams: Promise<{ e {items.length ? "Агенты ждут твоего решения — ответь здесь, в Telegram или через MCP." : "Всё идёт само: агентам от тебя ничего не нужно."} {onboarding.visible && }
- {items.length === 0 ? Агентам от тебя ничего не нужно. : items.map((q) => )} + + {items.map((q) => )}
все раннеры}> {sessions.length === 0 ? Сейчас ничего не запущено. : sessions.map((s) => )} diff --git a/apps/web/app/app.css b/apps/web/app/app.css index f150bd47..22beefde 100644 --- a/apps/web/app/app.css +++ b/apps/web/app/app.css @@ -101,3 +101,13 @@ @apply bg-primary/30; } } + +/* PEP-70: pug mascot — gentle breathing while asleep, a curious head tilt when agents ask. */ +@media (prefers-reduced-motion: no-preference) { + .pug-sleep .pug-head { animation: pug-breathe 3.2s ease-in-out infinite; } + .pug-sleep .pug-zzz { animation: pug-zzz 3.2s ease-in-out infinite; } + .pug-alert .pug-head { animation: pug-tilt 2.4s ease-in-out infinite; } +} +@keyframes pug-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, 0.98); } } +@keyframes pug-zzz { 0%, 100% { opacity: 0.25; transform: translateY(2px); } 50% { opacity: 0.6; transform: translateY(-2px); } } +@keyframes pug-tilt { 0%, 60%, 100% { transform: rotate(0deg); } 70% { transform: rotate(-9deg); } 85% { transform: rotate(5deg); } } diff --git a/apps/web/components/PugMascot.tsx b/apps/web/components/PugMascot.tsx new file mode 100644 index 00000000..d009a6da --- /dev/null +++ b/apps/web/components/PugMascot.tsx @@ -0,0 +1,89 @@ +// PEP-70: Peppa's mascot — a cartoon pug next to the agents' questions. Pure SVG (no external +// images), fixed fawn/black colours that read on both themes; motion only without reduced-motion. +import { cn } from "@/lib/utils"; + +type Mood = "sleep" | "alert"; + +export function PugMascot({ mood, size = 72, className }: { mood: Mood; size?: number; className?: string }) { + const awake = mood === "alert"; + return ( + + + {/* head */} + + {/* folded "button" ears flop over the head */} + + + {/* forehead wrinkles */} + + + {/* cheeks */} + + + {/* black mask */} + + {/* eyes */} + {awake ? ( + <> + + + + + + + + ) : ( + <> + + + + )} + {/* nose */} + + + {/* mouth + tongue */} + + {awake && } + + {!awake && ( + + z + z + + )} + + ); +} + +/** Mascot with a speech bubble: sleeps when nothing waits, perks up when agents ask. */ +export function PugBanner({ count }: { count: number }) { + const awake = count > 0; + return ( +
+ +
+ {awake ? ( + <> + Гав! {count === 1 ? "Агент ждёт" : "Агенты ждут"} твоего ответа + — {plural(count)} ниже. + + ) : ( + Тихо… Агентам от тебя ничего не нужно, мопс спит. + )} +
+
+ ); +} + +function plural(n: number) { + const m10 = n % 10, m100 = n % 100; + const w = m10 === 1 && m100 !== 11 ? "вопрос" : m10 >= 2 && m10 <= 4 && (m100 < 12 || m100 > 14) ? "вопроса" : "вопросов"; + return `${n} ${w}`; +}