From 80464f9f6949032b3c485806b1ed3309138548de Mon Sep 17 00:00:00 2001 From: David Blanc Brioir Date: Thu, 1 Jan 2026 15:39:07 +0100 Subject: [PATCH] feat: Add author/work/hierarchy display and align colors with design charter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hierarchical search improvements: - Display author and work for each chunk using badge-author and badge-work - Show section hierarchy (sectionPath) in chunk metadata - Add 📍 icon for section path in headers Color alignment with charter: - Replace Bootstrap colors (#007bff, #28a745, #6c757d) with charter variables - section-group: border and shadow use accent colors (125,110,88) - section-header: border uses var(--color-accent) - chunk-item: border-left uses var(--color-accent-alt) - Mode badges: hierarchical=accent-alt, simple=accent - Concept badges: subtle beige background with accent border - Alert boxes: beige background instead of yellow Visual improvements: - Add hover transform effect on chunks (translateX) - Smoother color transitions using CSS variables --- generations/library_rag/templates/search.html | 49 +++++++++++-------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/generations/library_rag/templates/search.html b/generations/library_rag/templates/search.html index defc75b..d247415 100644 --- a/generations/library_rag/templates/search.html +++ b/generations/library_rag/templates/search.html @@ -6,23 +6,23 @@
@@ -138,11 +139,11 @@
{% if results_data.mode == "hierarchical" %} - + 🌳 Recherche hiérarchique ({{ results_data.sections|length }} sections) {% else %} - + 📄 Recherche simple {% endif %} @@ -162,7 +163,7 @@ {% if results_data.fallback_reason %} -
+
⚠️ Mode hiérarchique forcé : {{ results_data.fallback_reason }}
💡 Essayez une requête sur un sujet présent dans le corpus (ex: "croyance", "signe", "inférence") ou basculez en mode Auto-détection. @@ -178,17 +179,17 @@

📂 {{ section.title }} - {{ section.chunks_count }} passage{% if section.chunks_count > 1 %}s{% endif %} - ⚡ {{ section.similarity }}% similaire + {{ section.chunks_count }} passage{% if section.chunks_count > 1 %}s{% endif %} + ⚡ {{ section.similarity }}% similaire

-

{{ section.section_path }}

+

📍 {{ section.section_path }}

{% if section.summary_text %}

{{ section.summary_text }}

{% endif %} {% if section.concepts %}
{% for concept in section.concepts %} - {{ concept }} + {{ concept }} {% endfor %}
{% endif %} @@ -198,15 +199,21 @@ {% if section.chunks %}
{% for chunk in section.chunks %} -
-
- ⚡ {{ chunk.similarity }}% similaire +
+
+ {% if chunk.work and chunk.work.author %} + {{ chunk.work.author }} + {% endif %} + {% if chunk.work and chunk.work.title %} + {{ chunk.work.title }} + {% endif %} + ⚡ {{ chunk.similarity }}% similaire
"{{ chunk.text }}"
+ Section : {{ chunk.sectionPath or section.section_path or '—' }}  â”‚  Type : {{ chunk.unitType or '—' }}  â”‚  - Langue : {{ (chunk.language or '—') | upper }}  â”‚  - Index : {{ chunk.orderIndex or '—' }} + Langue : {{ (chunk.language or '—') | upper }}
{% if chunk.keywords %}