{% extends "base.html" %} {% from "components/ui.html" import page_header %} {% block title %}{{ _('My productivity') }} · {{ app_name }}{% endblock %} {% block content %} {% set productivity_breadcrumbs = [{'text': _('Dashboard'), 'url': url_for('main.dashboard')}, {'text': _('My productivity')}] %} {{ page_header('fas fa-chart-line', _('My productivity'), _('Your personal time tracking patterns, focus, and streaks.'), breadcrumbs=productivity_breadcrumbs) }}
{# ---------- Row 1 — Summary cards ---------- #}
{# Today's hours #}

{{ _("Today's hours") }}

{{ '%.1f'|format(summary.today_hours or 0) }}

{{ _('today') }}

{{ _('Timer running') }}
{# This week #}

{{ _('This week') }}

{{ '%.1f'|format(summary.week_hours or 0) }} / {{ '%.0f'|format(summary.week_goal_hours or 0) }} h

{{ _('this week') }}

{{ summary.billable_percent_week or 0 }}% {{ _('billable') }}

{# Streak #}

{{ _('Streak') }}

{{ streak.current_streak or 0 }}

{{ _('day streak') }}

{{ _('Best') }}: {{ streak.longest_streak or 0 }} {{ _('days') }}

{# Avg session #}

{{ _('Avg session') }}

{{ _('per session (last 30 days)') }}

{{ _('Most productive') }}: {{ focus.most_productive_day or '—' }}

{# ---------- Row 2 — Daily hours bar chart ---------- #}

{{ _('Daily hours') }}

{{ _('Last 14 days, with daily goal reference') }}

{# ---------- Row 3 — projects + focus ---------- #}
{# Project breakdown doughnut (60%) #}

{{ _('Project breakdown') }}

{{ _('Top projects (last 30 days)') }}

{{ _('Total') }} 0h
    {# Focus stats (40%) #}

    {{ _('Focus') }}

    {{ _('How and when you work best (last 30 days)') }}

    {{ _('Most productive hour') }}
    {{ _('Most productive day') }}
    {{ focus.most_productive_day or '—' }}
    {{ _('Longest session') }}
    {{ _('Entries per active day') }}
    {{ _('Tracked days this month') }}
    {{ streak.tracked_days_this_month or 0 }} / {{ streak.total_days_this_month or 1 }}
    {# ---------- Row 4 — Activity heatmap ---------- #}

    {{ _('Activity heatmap') }}

    {{ _('Last 12 weeks of tracked time') }}

    {{ _('Less') }} {{ _('More') }}
    {# ---------- Row 5 — Insights ---------- #}

    {{ _('Insights') }}

      {% if insights %} {% for line in insights %}
    • {{ line }}
    • {% endfor %} {% else %}
    • {{ _('Start tracking time to unlock personal insights.') }}
    • {% endif %}
    {# Server-rendered initial dataset for charts #} {% endblock %} {% block scripts_extra %} {% endblock %}