diff --git a/.agents/skills/databuddy-internal/SKILL.md b/.agents/skills/databuddy-internal/SKILL.md index f7d4215d7..58b3762d5 100644 --- a/.agents/skills/databuddy-internal/SKILL.md +++ b/.agents/skills/databuddy-internal/SKILL.md @@ -104,6 +104,7 @@ Read [codebase-map.md](./references/codebase-map.md) when you need deeper routin - For dashboard navigation audits, check all route surfaces: `components/layout/navigation/navigation-config.tsx`, `components/ui/command-search.tsx`, and local `PageNavigation` layouts under `app/**/layout.tsx` before calling a page orphaned. - When fixing broken dashboard links to moved sections, update the real docs/search/navigation links and section anchors directly; do not add compatibility redirect pages unless explicitly requested. - Custom events UI is shared in `apps/dashboard/components/events/custom-events`; keep many-series legends outside the Recharts plot, use compact controls for property-summary event selection, and avoid separate event-count chip/list sections. +- Goals and Funnels are sibling conversion surfaces; keep Goals list-first and visually aligned with `app/(main)/websites/[id]/funnels` instead of adding separate summary-card chrome. - Insights merged feed (`use-insights-feed`) collapses history + AI by `insightSignalDedupeKey` in `apps/dashboard/lib/insight-signal-key.ts` so the list is one row per signal (latest wins). - Insights page (`app/(main)/insights`) should stay focused on the brief + signal queue; do not add generic global analytics KPI cards or top pages/referrers/countries tables there. - Theme: `apps/dashboard/app/globals.css`. **`--border` is intentionally subtle**; do not crank it darker for “contrast” unless **iza** asks—prefer text tokens or layout for readability. diff --git a/apps/dashboard/app/(main)/websites/[id]/goals/_components/goal-item.tsx b/apps/dashboard/app/(main)/websites/[id]/goals/_components/goal-item.tsx index d01c99fb3..c08a8d95f 100644 --- a/apps/dashboard/app/(main)/websites/[id]/goals/_components/goal-item.tsx +++ b/apps/dashboard/app/(main)/websites/[id]/goals/_components/goal-item.tsx @@ -7,9 +7,8 @@ import { formatNumber } from "@/lib/formatters"; import { cn } from "@/lib/utils"; import { DotsThreeIcon, - EyeIcon, - MouseMiddleClickIcon, PencilSimpleIcon, + TargetIcon, TrashIcon, WarningCircleIcon, } from "@databuddy/ui/icons"; @@ -23,30 +22,49 @@ interface GoalItemProps { onEdit: (goal: Goal) => void; } -const GOAL_TYPE_CONFIG = { - PAGE_VIEW: { - icon: EyeIcon, - bg: "bg-blue-500/10 text-blue-600 dark:text-blue-400", - }, - EVENT: { - icon: MouseMiddleClickIcon, - bg: "bg-violet-500/10 text-violet-600 dark:text-violet-400", - }, - CUSTOM: { - icon: MouseMiddleClickIcon, - bg: "bg-muted text-muted-foreground", - }, -} as const; - function GoalProgress({ rate }: { rate: number }) { const clampedRate = Math.max(0, Math.min(100, rate)); return ( -
+ {formatGoalType(goal.type)} + + + {goal.target} + + {goal.description ? ( + <> + + + {goal.description} + + > + ) : null} +
); } @@ -61,36 +79,25 @@ export function GoalItem({ const analyticsError = analytics && !analytics.ok ? analytics.error : null; const rate = analyticsData?.overall_conversion_rate ?? 0; const users = analyticsData?.total_users_completed ?? 0; - const eligibleUsers = analyticsData?.total_users_entered ?? 0; - const config = GOAL_TYPE_CONFIG[goal.type] ?? GOAL_TYPE_CONFIG.PAGE_VIEW; - const TypeIcon = config.icon; return ( -- {goal.name} -
-- {goal.target} -
++ {goal.name} +
+{label}
- {isLoading ? ( - - ) : ( -- {value} -
- )} -
- {shareableLink || `/public/${websiteId}`}
+ {shareableLink}
+