diff --git a/devboard/client/src/pages/Dashboard.jsx b/devboard/client/src/pages/Dashboard.jsx
index c7e6c70..ba45ef2 100644
--- a/devboard/client/src/pages/Dashboard.jsx
+++ b/devboard/client/src/pages/Dashboard.jsx
@@ -43,6 +43,7 @@ import {
} from "../components/common/Icons";
import { openVisit, touchVisit } from "../utils/lastVisit";
import { timeAgo } from "../utils/timeAgo";
+import { topLanguage } from "../utils/topLanguage";
import {
BoardZoomContext,
ZOOM_MAX,
@@ -282,6 +283,8 @@ const Dashboard = () => {
};
const debt = calculateDebtScore();
+ const topLang = useMemo(() => topLanguage(tasks), [tasks]);
+
const [streak, setStreak] = useState(calculateStreak);
const [showBurndown, setShowBurndown] = useState(false);
const [standupCopied, setStandupCopied] = useState(false);
@@ -1578,6 +1581,15 @@ ${stuck
{streak} day streak
)}
+ {topLang && (
+
+ mostly {topLang.language}
+
+ )}
+
{debt.count > 0 && (
{
+ const counts = {};
+ let total = 0;
+ for (const task of tasks || []) {
+ for (const snippet of task.snippets || []) {
+ const language = String(snippet?.language || "")
+ .trim()
+ .toLowerCase();
+ if (!language) continue;
+ counts[language] = (counts[language] || 0) + 1;
+ total += 1;
+ }
+ }
+ const [language, count] =
+ Object.entries(counts).sort(
+ (a, b) => b[1] - a[1] || a[0].localeCompare(b[0]),
+ )[0] || [];
+ return language ? { language, count, total } : null;
+};