fix(telemetry): review nits
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Successful in 8s
CI/CD Pipeline / i18n Catalog Check (push) Failing after 49s
CI/CD Pipeline / Build and Push App Docker Image (push) Skipped
CI/CD Pipeline / Deploy to Kubernetes (push) Skipped

- dock h2h source corrected to match_dock; badge_viewed breakdown via value
- stats filter guards unified, ref-based, double-tap safe
- emoji picker reuses handleReactionClick; comment and import tidy
This commit is contained in:
2026-08-26 23:19:45 -07:00
parent f593b2c7b8
commit 8e42862d20
7 changed files with 13 additions and 13 deletions
@@ -144,7 +144,7 @@ const BadgeStatRow: React.FC<BadgeStatRowProps> = ({
<Box key={badge.id}>
<UnstyledButton
onClick={() => {
track("badge_viewed", { badge: badge.key });
track("badge_viewed", { value: badge.key });
badgeSheet.open();
}}
w='100%'
@@ -176,7 +176,7 @@ const MatchDock = ({ match, onClose }: MatchDockProps) => {
variant="subtle"
size="sm"
onClick={() => {
track("h2h_viewed", { source: "match_card" });
track("h2h_viewed", { source: "match_dock" });
h2hSheet.open();
}}
aria-label={t`View head-to-head`}
@@ -1,5 +1,5 @@
import { Box, Stack, Text, Divider, Group, Button } from "@mantine/core";
import { Suspense, useState, useDeferredValue } from "react";
import { Suspense, useState, useDeferredValue, useRef } from "react";
import { Trans, useLingui } from "@lingui/react/macro";
import { Link } from "@tanstack/react-router";
import Header from "./header";
@@ -21,8 +21,10 @@ const StatsWithFilter = ({ id }: { id: string }) => {
const deferredViewType = useDeferredValue(viewType);
const isStale = viewType !== deferredViewType;
const viewTypeRef = useRef(viewType);
const changeViewType = (next: typeof viewType) => {
if (next === viewType) return;
if (viewTypeRef.current === next) return;
viewTypeRef.current = next;
track("stats_filtered", { value: next, source: "profile" });
setViewType(next);
};
@@ -202,10 +202,7 @@ const EmojiBar = ({
</AnimatePresence>
</Group>
<EmojiPicker
onSelect={onReactionPress || ((emoji) => {
if (!userReactions.includes(emoji)) track("reaction_sent", { emoji, source });
toggleReaction.mutate({ data: { matchId, emoji } });
})}
onSelect={handleReactionClick}
userReactions={userReactions}
/>
</Group>
@@ -9,10 +9,10 @@ import {
Text,
Title,
} from "@mantine/core";
import { DatePickerInput } from "@mantine/dates";
import { ListSkeleton, StatTileSkeleton } from "@/components/skeletons";
import { useRollupRange } from "../queries";
import type { RollupRow } from "../types";
import { DatePickerInput } from "@mantine/dates";
import { fillDailySeries, lastNDays, latestValue, listDays, sumByDim } from "../range";
import { BarList, Sparkline, StatTile } from "./charts";
import { DetailSheet } from "./shared";