From 6596a4e32fea4597e9b3e599345481409364673a Mon Sep 17 00:00:00 2001 From: David Blanc Brioir Date: Sun, 4 Jan 2026 16:47:28 +0100 Subject: [PATCH] fix: Resolve works filter display and encoding issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem 1: Only 3 works visible despite 8/10 badge - Added max-height: 300px and overflow-y: auto to .works-list - Now all 10 works are scrollable in the filter section Problem 2: UnicodeEncodeError with → character in console - Replaced Unicode arrow (→) with ASCII arrow (->) in print statements - Fixes 'charmap' codec error on Windows console 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- generations/library_rag/flask_app.py | 6 +++--- generations/library_rag/templates/chat.html | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/generations/library_rag/flask_app.py b/generations/library_rag/flask_app.py index 88571c9..e698332 100644 --- a/generations/library_rag/flask_app.py +++ b/generations/library_rag/flask_app.py @@ -1128,15 +1128,15 @@ def diverse_author_search( if num_authors == 1: # Only one author: take up to 'limit' chunks from that author adaptive_chunks_per_author = limit - print(f"[Diverse Search] Only 1 author found → taking up to {adaptive_chunks_per_author} chunks") + print(f"[Diverse Search] Only 1 author found -> taking up to {adaptive_chunks_per_author} chunks") elif num_authors <= 3: # Few authors (2-3): take more chunks per author adaptive_chunks_per_author = max(chunks_per_author, limit // num_authors) - print(f"[Diverse Search] Only {num_authors} authors → taking up to {adaptive_chunks_per_author} chunks per author") + print(f"[Diverse Search] Only {num_authors} authors -> taking up to {adaptive_chunks_per_author} chunks per author") else: # Many authors (4+): stick to original limit for diversity adaptive_chunks_per_author = chunks_per_author - print(f"[Diverse Search] {num_authors} authors → taking {adaptive_chunks_per_author} chunks per author") + print(f"[Diverse Search] {num_authors} authors -> taking {adaptive_chunks_per_author} chunks per author") final_chunks: List[Dict[str, Any]] = [] for author, avg_score in top_authors: diff --git a/generations/library_rag/templates/chat.html b/generations/library_rag/templates/chat.html index fd42165..45418be 100644 --- a/generations/library_rag/templates/chat.html +++ b/generations/library_rag/templates/chat.html @@ -713,6 +713,9 @@ display: flex; flex-direction: column; gap: 0.5rem; + max-height: 300px; + overflow-y: auto; + overflow-x: hidden; } .work-item {