[BUG] AI Mentor says "coded on 30 of the last 30 days" with a 1-day streak

オープン
#4,030 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@laypatel13 がすでに取り組んでいます。

2026年12月3日 から。

評価

この issue はまだ評価されていません。

説明

bug needs-triage status:assigned
What happened?

The AI Mentor says "You coded on 30 of the last 30 days". Same dashboard: 1 day streak, 3/7 active days, longest streak ever 18 days. Can't code 30 days in a row with an 18 day best.

The trend is off too. It says ↓1%, but my commits are down 33 vs last week. The AI weekly summary repeats it.

Why: the commit data only has rows for days with commits. In src/lib/ai-mentor.ts:

  • analyzePatterns takes commits.slice(-30): the last 30 rows, not the last 30 days
  • computeTrends splits the rows in half, not the calendar

So anyone with 30+ coding days in the last 90 always gets "30 of 30". The tests never caught it because they give a row for every day, even days with 0 commits.

Expected: count calendar days, so the card matches the streak and active days cards. Compare the trend over two equal date windows.

Attached the failing test that reproduces it below.

Steps to reproduce
  1. Sign in with an account that has 30+ coding days in the last 90, with gaps in the last 30
  2. Open the dashboard (HQ)
  3. Compare the AI Mentor card with the Streak, Active days and Personal records cards
Where is it?

AI features (insights, personality, project tutor, career)

Where did you see it?

devtrack.live

Browser and device

Chrome on macOS

Screenshots, console errors or logs
Screenshot 2026-12-04 at 12 00 31 AM Screenshot 2026-12-04 at 12 00 50 AM Screenshot 2026-12-04 at 12 07 44 AM
Want to fix it?
  • I'd like to work on this. A maintainer will assign you; please don't start before that.
主要言語
TypeScript
スター
246
フォーク
436
平均マージ
9時間 33分
マージ済み PR(30日)
213

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Priyanshu-byte-coder/devtrack のほかの issue

Priyanshu-byte-coder/devtrack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。