fix: Resolve works filter display and encoding issues
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 <noreply@anthropic.com>
This commit is contained in:
@@ -1128,15 +1128,15 @@ def diverse_author_search(
|
|||||||
if num_authors == 1:
|
if num_authors == 1:
|
||||||
# Only one author: take up to 'limit' chunks from that author
|
# Only one author: take up to 'limit' chunks from that author
|
||||||
adaptive_chunks_per_author = limit
|
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:
|
elif num_authors <= 3:
|
||||||
# Few authors (2-3): take more chunks per author
|
# Few authors (2-3): take more chunks per author
|
||||||
adaptive_chunks_per_author = max(chunks_per_author, limit // num_authors)
|
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:
|
else:
|
||||||
# Many authors (4+): stick to original limit for diversity
|
# Many authors (4+): stick to original limit for diversity
|
||||||
adaptive_chunks_per_author = chunks_per_author
|
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]] = []
|
final_chunks: List[Dict[str, Any]] = []
|
||||||
for author, avg_score in top_authors:
|
for author, avg_score in top_authors:
|
||||||
|
|||||||
@@ -713,6 +713,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.work-item {
|
.work-item {
|
||||||
|
|||||||
Reference in New Issue
Block a user