{% extends "base.html" %} {% block title %}Profile — devcoach{% endblock %} {% block content %}

Knowledge Map

{# Add group — edit mode only #} {# Add topic — edit mode only #} {# Edit / Done toggle #}
{# Stats bar #}
{{ stats.total_lessons }} lessons total · {{ stats.lessons_today }} / {{ max_per_day }} today · {{ stats.lessons_this_week }} this week · {% if rate_limit.allowed %} Available now {% else %} {{ rate_limit.reason }} {% endif %}
{% for category, topics in categorised.items() %}
{# Group name + delete × — grouped so × sits right after the name on hover #}

{{ category }}

{% if category != 'Other' %}
{% endif %}
{# Add topic to this group — edit mode only #}
{% for entry in topics %} {% set topic = entry.topic %} {% set confidence = entry.confidence %} {% set pct = (confidence / 10 * 100) | int %} {% if confidence >= 7 %} {% set color = "bg-green-500" %} {% set text_color = "text-green-600 dark:text-green-400" %} {% elif confidence >= 4 %} {% set color = "bg-yellow-500" %} {% set text_color = "text-yellow-600 dark:text-yellow-400" %} {% else %} {% set color = "bg-red-500" %} {% set text_color = "text-red-600 dark:text-red-400" %} {% endif %}
{# Move to group — edit mode only, revealed on hover, before topic name #} {# Topic name + delete button grouped so × stays tight against the text #}
{# View mode: topic is a link to lessons filtered by this topic #} {{ topic }} {# Edit mode: plain text #} {# Delete topic — edit mode only, revealed on hover, snug after topic text #}
{# − button — edit mode only #}
{# + button — edit mode only #} {{ confidence }}
{% endfor %}
{% endfor %}
{% endblock %}