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
4 changes: 4 additions & 0 deletions src/components/LocalCodingTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import { useEffect, useState } from "react";

const DATA_WINDOW_DAYS = 90;
const dataWindowLabel = `Last ${DATA_WINDOW_DAYS} days`;


interface DailyData {
date: string;
totalSeconds: number;
Expand Down
5 changes: 4 additions & 1 deletion src/components/RepoActivityDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { summarizeCodingActivity } from "@/lib/coding-activity-insights";
import { useHeatmapTheme } from "@/hooks/useHeatmapTheme";
import { useAccount } from "@/components/AccountContext";

const DATA_WINDOW_DAYS = 90;


interface RepoActivityDrawerProps {
repoName: string;
isOpen: boolean;
Expand Down Expand Up @@ -171,7 +174,7 @@ export default function RepoActivityDrawer({ repoName, isOpen, onClose }: RepoAc
</div>

<div>
<h3 className="text-sm font-semibold text-[var(--card-foreground)] mb-3">Commit Heatmap (Last 90 Days)</h3>
<h3 className="text-sm font-semibold text-[var(--card-foreground)] mb-3">{`Commit Heatmap (Last ${DATA_WINDOW_DAYS} Days)`}</h3>
<div className="overflow-x-auto pb-2 scrollbar-thin">
<div
className="grid gap-[2px]"
Expand Down
9 changes: 7 additions & 2 deletions src/components/StreakTracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import { toast } from "sonner";
import { toPng } from "html-to-image";
import { Flame, Trophy, Calendar, Zap, Copy, CheckCircle, Medal, Star, Sparkles } from "lucide-react";


const DATA_WINDOW_DAYS = 90;
const dataWindowLabel = `Last ${DATA_WINDOW_DAYS} days`;


const STREAK_MILESTONES = [7, 30, 50, 100, 200, 365];

interface StreakData {
Expand Down Expand Up @@ -491,12 +496,12 @@ export default function StreakTracker() {
tooltip: "Your longest streak ever",
},
{
label: "Active Days (90d)",
label: `Active Days (${DATA_WINDOW_DAYS}d)`,
value: animatedActiveDays,
unit: "days",
highlight: false,
icon: Calendar,
tooltip: "Days you made commits in the last 90 days",
tooltip: `Days you made commits in the ${dataWindowLabel.toLowerCase()}`,
},
{
label: "Last Commit",
Expand Down