{% extends "ui/base.html" %}
{% block title %}Dashboard · {{ context.config.run.name or context.run_id }}{% endblock %}
{% block content %}
{% set status_colors = {
"awaiting_review": "warning",
"blocked": "danger",
"completed": "success",
"completed_with_errors": "warning",
"failed": "danger",
"processing": "primary",
"ready": "success",
"reviewed": "info",
"running": "primary",
"completed_in_this_run": "success"
} %}
{% set stage_labels = {
"input": "Input",
"detection": "PHI detection",
"transformation": "Draft de-identification",
"validation": "Validation",
"review": "Human review",
"finalization": "Final de-identification",
"export": "Export"
} %}
{% set stage_descriptions = {
"input": "Imports and normalizes source records.",
"detection": "Finds PHI spans with detectors and custom rules.",
"transformation": "Creates the de-identified draft used for validation and review.",
"validation": "Checks the draft text for residual PHI.",
"review": "Applies the required human decisions and corrections.",
"finalization": "Applies approved redactions, generalizations, and synthetic replacements.",
"export": "Writes selected ready records to a file."
} %}
{% set progress_labels = {
"skipped": "Not required",
"completed": "Completed in this run",
"completed_with_errors": "Completed in this run",
"running": "In progress"
} %}
{{ context.config.run.name or context.run_id }}
{{ context.run_id }}
{% if report.action %}
{% if report.action.kind == 'review' %}
Review records
{% elif report.action.kind == 'retry' %}
{% elif report.action.kind == 'continue' %}
{% endif %}
{% endif %}
Files
{% if rules_error %}
Rules unavailable: {{ rules_error }}
{% endif %}
{% if report.lineage %}
Revised run. Created from {{ report.lineage.parent_run_id }}.
{{ report.lineage.reason }}
Open parent
{% endif %}
{% if job.state == 'running' %}
Processing {{ job.operation|replace('_', ' ') }}
{% endif %}
{% for label, value, id in [
('Run status', report.run.status|replace('_', ' '), 'run-status'),
('Records', report.records.denominator, 'record-total'),
('Awaiting review', report.review.pending, 'review-count'),
('Ready', report.records.exportable, 'exportable-count')
] %}
{{ label }}
{% if id == 'run-status' %}
{{ value }}
{% else %}
{{ value }}
{% endif %}
{% endfor %}
{% if report.errors.unresolved %}
{{ report.errors.unresolved }} unresolved processing error{{ 's' if report.errors.unresolved != 1 }}
{% if report.errors.retryable %}
{% endif %}
{% for error in report.errors.groups if not error.resolved %}
{% endfor %}
{% endif %}
{% set always_visible = ["input", "transformation", "finalization", "export"] %}
{% for stage in report.stages.run %}
{% if stage.stage_name in always_visible or report.configured_sections.get(stage.stage_name, False) %}
{{ stage_labels.get(stage.stage_name, stage.stage_name|replace('_', ' ')) }}
{{ 'Reused from parent' if stage.provenance == 'reused_from_parent' else progress_labels.get(stage.status, 'Waiting') }}
{{ stage_descriptions.get(stage.stage_name, '') }}
{{ stage.status|replace('_', ' ') }}
{% endif %}
{% endfor %}
Source
Category
Spans
Records
{% for item in report.findings.counts %}
{{ item.source_kind|replace('_', ' ') }}
{{ item.canonical_category|replace('_', ' ') }}
{{ item.active_span_count }}
{{ item.active_record_count }}
{% else %}
No findings recorded.
{% endfor %}
{% if report.configured_sections.validation or report.configured_sections.review %}
{% if report.configured_sections.validation %}
Records checked {{ report.validation.completed }}
Records with findings {{ report.validation.effective_violations }}
Findings configured to retain
{{ report.validation.ignored_findings }}
Technical failures {{ report.validation.technical_errors + report.validation.truncated }}
{% endif %}
{% if report.configured_sections.review %}
Awaiting review {{ report.review.pending }}
Completed {{ report.review.completed }}
Total time {{ report.review.review_seconds|duration }}
Average time {{ report.review.average_seconds|duration }}
{% endif %}
{% endif %}
{% if report.usage.backends %}
Service usage
(Includes successful, failed, and truncated calls when usage is available)
{% for backend in report.usage.backends %}
{% if backend.actual_cost_usd is defined %}${{ '%.6f'|format(backend.actual_cost_usd) }}{% else %}Not priced {% endif %}
Requests
{{ backend.request_count }}
Succeeded / failed
{{ backend.successful_requests }} / {{ backend.error_requests }}
{% if backend.input_tokens is defined %}
Input tokens
{{ backend.input_tokens }}
Output tokens
{{ backend.output_tokens }}
{% if backend.actual_input_cost_usd is defined %}Input cost ${{ '%.6f'|format(backend.actual_input_cost_usd) }} {% endif %}
{% if backend.actual_output_cost_usd is defined %}Output cost ${{ '%.6f'|format(backend.actual_output_cost_usd) }} {% endif %}
{% else %}
Input characters
{{ backend.input_characters }}
{% endif %}
{% endfor %}
{% endif %}
Created
Format
Records
File
{% for item in report.exports.history %}
{{ item.created_at[:19]|replace('T', ' ') }} UTC
{{ item.format }}
{{ item.record_count }}
{{ item.output_path }}
{% else %}
No exports yet.
{% endfor %}
{% if rules_json %}
{% endif %}
{% endblock %}