fix: Display work/author metadata and improve section titles

Backend fix:
- Remove return_properties from hierarchical chunk query
- Weaviate returns nested objects (work, document) when return_properties is not specified
- This allows chunks to have work.author and work.title available

Frontend improvements:
- Truncate long section titles to 80 chars with ellipsis
- Hide section_path if identical to title (avoid duplication)
- Work and author badges should now display correctly in chunk metadata
This commit is contained in:
2026-01-01 15:42:03 +01:00
parent 80464f9f69
commit 474edf75e5
2 changed files with 5 additions and 6 deletions

View File

@@ -178,11 +178,13 @@
<div class="section-group">
<div class="section-header">
<h3 style="margin: 0 0 0.5rem 0; font-size: 1.3em;">
📂 {{ section.title }}
📂 {{ section.title[:80] }}{% if section.title|length > 80 %}...{% endif %}
<span class="badge" style="background-color: var(--color-accent-alt); color: white; margin-left: 0.5rem;">{{ section.chunks_count }} passage{% if section.chunks_count > 1 %}s{% endif %}</span>
<span class="badge badge-similarity" style="margin-left: 0.5rem;">⚡ {{ section.similarity }}% similaire</span>
</h3>
<p class="text-muted" style="margin: 0.25rem 0; font-size: 0.9em;">📍 {{ section.section_path }}</p>
{% if section.section_path and section.section_path != section.title %}
<p class="text-muted" style="margin: 0.25rem 0; font-size: 0.9em;">📍 {{ section.section_path }}</p>
{% endif %}
{% if section.summary_text %}
<p class="summary-text" style="margin: 0.5rem 0; font-style: italic; color: #555;">{{ section.summary_text }}</p>
{% endif %}