From 0382cf0035a5a405de521993a9dbf2cbcee71848 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 13:03:55 +0000 Subject: [PATCH 1/2] Initial plan From 5c833443c8a7a22a7b079159e244d3aeacc4ecad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 13:56:15 +0000 Subject: [PATCH 2/2] fix: restore state counts in footer, show gamification stats as separate line below Agent-Logs-Url: https://github.com/metalaureate/tend-cli/sessions/60b7e251-c77d-4fab-9015-f22c75e86ce4 Co-authored-by: metalaureate <2185884+metalaureate@users.noreply.github.com> --- relay/src/index.ts | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/relay/src/index.ts b/relay/src/index.ts index b806391..81d95b4 100644 --- a/relay/src/index.ts +++ b/relay/src/index.ts @@ -423,23 +423,21 @@ function buildBoardHtml(rows: ProjectRow[], updatedAt: string, todos: TodoRow[] const idleCount = effectiveStates.filter(s => s === 'idle').length; const footerParts: string[] = []; - if (stats) { - footerParts.push(`${stats.activeHours}/24h active`); - footerParts.push(`${stats.donesToday} done today`); - if (stats.donesWeek > stats.donesToday) { - footerParts.push(`${stats.donesWeek} this week`); - } - if (stats.todosOpen > 0) { - footerParts.push(`${stats.todosOpen} open TODO${stats.todosOpen > 1 ? 's' : ''}`); - } - } else { - if (stuckCount > 0) footerParts.push(`${stuckCount} needs attention`); - if (doneCount > 0) footerParts.push(`${doneCount} done`); - if (workingCount > 0) footerParts.push(`${workingCount} working`); - if (idleCount > 0) footerParts.push(`${idleCount} idle`); - } + if (stuckCount > 0) footerParts.push(`${stuckCount} needs attention`); + if (doneCount > 0) footerParts.push(`${doneCount} done`); + if (workingCount > 0) footerParts.push(`${workingCount} working`); + if (idleCount > 0) footerParts.push(`${idleCount} idle`); const footerHtml = footerParts.length > 0 ? footerParts.join(' · ') : 'no projects yet'; + const gamificationHtml = stats ? (() => { + const parts: string[] = []; + parts.push(`${stats.activeHours}/24h active`); + parts.push(`${stats.donesToday} done today`); + if (stats.donesWeek > stats.donesToday) parts.push(`${stats.donesWeek} this week`); + if (stats.todosOpen > 0) parts.push(`${stats.todosOpen} open TODO${stats.todosOpen > 1 ? 's' : ''}`); + return parts.join(' · '); + })() : null; + const emptyMsg = rows.length === 0 ? '
No events yet — start emitting with tend emit working "your task"
' : ''; @@ -649,6 +647,7 @@ function buildBoardHtml(rows: ProjectRow[], updatedAt: string, todos: TodoRow[] ` : ''} ` : ''} + ${gamificationHtml ? `
${gamificationHtml}
` : ''}