< Summary

Information
Class: Pomodoro.Web.Components.History.DailySummarySection
Assembly: Pomodoro.Web
File(s): /home/runner/work/Pomodoro/Pomodoro/src/Pomodoro.Web/Components/History/DailySummarySection.razor
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 43
Line coverage: 100%
Branch coverage
100%
Covered branches: 8
Total branches: 8
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%66100%
get_CurrentStats()100%11100%
get_HistoryPagePresenterService()100%11100%
FormatFocusTime(...)100%22100%

File(s)

/home/runner/work/Pomodoro/Pomodoro/src/Pomodoro.Web/Components/History/DailySummarySection.razor

#LineLine coverage
 1@using Pomodoro.Web.Models
 2@using Pomodoro.Web.Pages
 3
 4<div class="weekly-summary-section">
 5    <div class="section-header">
 6        <h2>Daily Summary</h2>
 7    </div>
 8    <div class="weekly-stats">
 9        <div class="stat">
 10810            <span class="stat-value">@FormatFocusTime(CurrentStats?.FocusMinutes ?? 0)</span>
 11            <span class="stat-label">Minutes Focused</span>
 12        </div>
 13        <div class="stat">
 10814            <span class="stat-value">@(CurrentStats?.PomodoroCount ?? 0)</span>
 15            <span class="stat-label">Pomodoros</span>
 16        </div>
 17        <div class="stat">
 10818            <span class="stat-value">@(CurrentStats?.TasksWorkedOn ?? 0)</span>
 19            <span class="stat-label">Tasks Worked On</span>
 20        </div>
 21    </div>
 22</div>
 23
 24@code {
 25    [Parameter]
 43226    public DailyStatsSummary? CurrentStats { get; set; }
 27
 28    [Inject]
 40829    protected HistoryPagePresenterService HistoryPagePresenterService { get; set; } = default!;
 30
 31    /// <summary>
 32    /// Format focus time for display
 33    /// </summary>
 34    internal string FormatFocusTime(int minutes)
 11035    {
 36        // DIAGNOSTIC: Check if HistoryPagePresenterService is null
 11037        if (HistoryPagePresenterService == null)
 438        {
 439            return minutes.ToString();
 40        }
 10641        return HistoryPagePresenterService.FormatFocusTime(minutes);
 11042    }
 43}