{% extends "solo/base_solo.html" %} {% block title %}Dashboard - Solo Mode{% endblock %} {% block extra_head %} {% endblock %} {% block content %} {# Phase pill is removed; the stepper at the top of base_solo.html already communicates the current phase, fixed in B1. Keeping it created two indicators in different design systems for the same fact. #} {# ── Tab Navigation ─────────────────────────────────────── #}
{# ════════════════════════════════════════════════════════════ OVERVIEW TAB ════════════════════════════════════════════════════════════ #}
{# Annotation Progress Card #}

Annotation Progress

{% if annotation_stats %} {% set total = annotation_stats.human_labeled + annotation_stats.llm_labeled + annotation_stats.remaining %} {% set pct = ((annotation_stats.human_labeled + annotation_stats.llm_labeled) / total * 100) if total > 0 else 0 %}

{{ pct|int }}%

Human {{ annotation_stats.human_labeled }}
LLM {{ annotation_stats.llm_labeled }}
Remaining {{ annotation_stats.remaining }}
{% else %}

No annotation data yet

{% endif %}
{# Agreement Card #}

Agreement

{% if agreement_metrics %} {% set rate = agreement_metrics.agreement_rate or 0 %}

{{ (rate * 100)|int }}%

Comparisons {{ agreement_metrics.total_compared }}
Agreements {{ agreement_metrics.agreements }}
Disagreements {{ agreement_metrics.disagreements }}
{% else %}

No agreement data yet

{% endif %}
{# LLM Labeling Card #}

LLM Labeling

{% if llm_stats %}
Labeled {{ llm_stats.labeled_count }}
Queue {{ llm_stats.queue_size }}
Errors {{ llm_stats.error_count }}
Status {% if llm_stats.is_paused %} Paused {% elif llm_stats.is_running %} Running {% else %} Stopped {% endif %}
{% else %}

LLM labeling not started

{% endif %}
{# Edge Case Rules Summary Card #} {% if edge_case_rule_stats and edge_case_rule_stats.total_rules > 0 %}

Edge Case Rules

{{ edge_case_rule_stats.total_rules }}

rules discovered

Categories {{ edge_case_rule_stats.total_categories }}
Pending {{ edge_case_rule_stats.pending_categories }}
Approved {{ edge_case_rule_stats.approved_categories }}
{% endif %} {# Refinement Loop Card #} {# Labeling Functions Card #} {# Confidence Routing Card #} {% if llm_stats and llm_stats.confidence_routing and llm_stats.confidence_routing.enabled %}

Confidence Routing

Total Routed {{ llm_stats.confidence_routing.total_routed }}
Human Routed {{ llm_stats.confidence_routing.human_routed_count }}
{% for tier in llm_stats.confidence_routing.tiers %}
{{ tier.name or 'Tier ' ~ loop.index }} {{ tier.instances_accepted }} accepted ({{ (tier.acceptance_rate * 100)|int }}%)
{% endfor %}
{% endif %} {# Validation Progress Card #} {% if validation_progress and validation_progress.total_samples > 0 %}

Final Validation

{{ validation_progress.percent_complete|int }}%

Validated {{ validation_progress.validated }} / {{ validation_progress.total_samples }}
Accuracy {{ (validation_progress.validation_accuracy * 100)|int }}%
{% endif %}
{# Action Buttons #}
{% if phase == 'setup' %} Start Setup {% elif phase == 'prompt_review' %} Edit Prompt {% elif phase in ['edge_case_synthesis', 'edge_case_labeling'] %} Continue Edge Cases {% elif phase in ['parallel_annotation', 'active_annotation'] %} Continue Annotating {% elif phase == 'disagreement_resolution' %} Resolve Disagreements {% elif phase == 'periodic_review' %} Continue Review {% elif phase == 'rule_review' %} Review Edge Case Rules {% elif phase == 'final_validation' %} Continue Validation {% elif phase == 'completed' %} Export Data {% endif %} API Status
{# ════════════════════════════════════════════════════════════ CONFUSION TAB ════════════════════════════════════════════════════════════ #}
{# Summary Cards #}

Total Disagreements

0

Distinct Patterns

0

Top Confusion

{# Heatmap + Side Panel #}

Confusion Heatmap

Pattern Details

Click a heatmap cell to see details

Per-Label Accuracy

{# Patterns Table #}

Confusion Patterns

LLM Predicted Human Corrected Count % of Errors Actions
Loading...
{# ════════════════════════════════════════════════════════════ LABELING FUNCTIONS TAB ════════════════════════════════════════════════════════════ #}
{# Summary Cards #}

Total Functions

0

Enabled

0

Instances Labeled

0

Avg Confidence

{# Actions #}
{# Functions Table #}
Pattern Label Confidence Coverage Enabled
Loading...
{# ════════════════════════════════════════════════════════════ DISAGREEMENT EXPLORER TAB ════════════════════════════════════════════════════════════ #}
{# Summary Cards #}

Total Compared

0

Disagreements

0

Disagreement Rate

0%

Avg Disagree Confidence

{# Scatter + Timeline #}

Confidence vs Agreement

Agreement Timeline

Stable

Per-Label Breakdown

{# Filter + Disagreement List #}

Disagreement Details

Loading...

{# ════════════════════════════════════════════════════════════ EDGE CASE RULES TAB ════════════════════════════════════════════════════════════ #}
{# Stats Cards #}

Rules Discovered

{{ edge_case_rule_stats.total_rules if edge_case_rule_stats else 0 }}

Categories

{{ edge_case_rule_stats.total_categories if edge_case_rule_stats else 0 }}

Pending Review

{{ edge_case_rule_stats.pending_categories if edge_case_rule_stats else 0 }}

Approved

{{ approved_count }}

{# Pending Categories for Review #} {% if pending_categories %}

Pending Categories

{% for item in pending_categories %}

Category {{ item.category.id[:8] }}

{{ item.category.summary_rule }}
{% for rule in item.member_rules %}
{{ rule.rule_text }}
Instance: {{ rule.instance_id }} | Confidence: {{ (rule.source_confidence * 100)|int }}%
{% endfor %}
{% endfor %} {% else %}

No pending categories to review.

{% endif %} {# Apply Approved Rules #} {% if approved_count > 0 %}

{{ approved_count }} approved categories ready to incorporate into annotation prompt.

{% endif %} {# Rules Table #}

All Rules

Rule Text Instance Confidence Cluster Status
Loading...
{# ════════════════════════════════════════════════════════════ RULE CLUSTERS TAB ════════════════════════════════════════════════════════════ #}
{# Scatter Plot #}

Rule Embedding Space

{# Side Panel #}

Rule Details

Click a point to see details

Controls

{% endblock %} {% block sidebar %} {# No sidebar — use full width for dashboard #} {% endblock %} {% block extra_js %} {% endblock %}