Show read-only vision candidate fields in layout review

This commit is contained in:
Sean McElwain 2026-05-30 21:36:28 -05:00
parent 74bd259bd7
commit b06e260dad
1 changed files with 39 additions and 0 deletions

View File

@ -1986,6 +1986,45 @@ document.addEventListener("DOMContentLoaded", () => {
<div class="word-ribbon-label">Document</div>
</div>
</div>
{% set vision_fields = [] %}
{% if vision_analysis_json and vision_analysis_json.get("vision_candidate_fields") %}
{% set vision_fields = vision_analysis_json.get("vision_candidate_fields") %}
{% elif layout_review_pages and layout_review_pages[0].get("vision_candidate_fields") %}
{% set vision_fields = layout_review_pages[0].get("vision_candidate_fields") %}
{% endif %}
{% if vision_fields %}
<div class="detail-card" style="margin:0.75rem 0; border-left:4px solid #7c3aed;">
<div style="display:flex; justify-content:space-between; gap:1rem; align-items:center;">
<h3 style="margin:0;">Vision Candidate Fields</h3>
<span style="font-size:0.85rem; color:#64748b;">{{ vision_fields|length }} candidates</span>
</div>
<div style="margin-top:0.5rem; overflow-x:auto;">
<table class="data-table" style="width:100%;">
<thead>
<tr>
<th>Type</th>
<th>Value</th>
<th>Confidence</th>
<th>OCR Conf.</th>
</tr>
</thead>
<tbody>
{% for field in vision_fields[:12] %}
<tr>
<td>{{ field.get("candidate_type", "") }}</td>
<td><code>{{ field.get("value", "") }}</code></td>
<td>{{ field.get("confidence", "") }}</td>
<td>{{ field.get("ocr_confidence", "") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
<div id="layout-review-shell">
<div>
<div id="layout-review-canvas-wrap" oncontextmenu="return false;">