Phase 16D.3 - Final Character Discovery Polish

This commit is contained in:
Nick Beckley 2026-06-27 20:52:02 +01:00
parent 1ee77d953d
commit 772a144d70
5 changed files with 45 additions and 45 deletions

View File

@ -51,7 +51,7 @@ public sealed class WordCompanionService(
"Don", "Won", "Could", "Would", "Should", "Do", "Does", "Had", "Has", "Was", "Were", "Is", "Am", "Don", "Won", "Could", "Would", "Should", "Do", "Does", "Had", "Has", "Was", "Were", "Is", "Am",
"Right", "Really", "Now", "Look", "Listen", "Sorry", "Thanks", "Fine", "Great", "Sure", "Course", "Right", "Really", "Now", "Look", "Listen", "Sorry", "Thanks", "Fine", "Great", "Sure", "Course",
"Thing", "Things", "Everyone", "Everything", "Anything", "Someone", "Nobody", "People", "Thing", "Things", "Everyone", "Everything", "Anything", "Someone", "Nobody", "People",
"Still", "Err", "Er", "Erm", "Alright", "Allright", "Alrite" "Still", "Err", "Er", "Erm", "Alright", "Allright", "Alrite", "New", "Somewhere", "Coke"
}; };
private static readonly HashSet<string> CharacterDiscoveryTemporalWords = new(StringComparer.OrdinalIgnoreCase) private static readonly HashSet<string> CharacterDiscoveryTemporalWords = new(StringComparer.OrdinalIgnoreCase)
{ {

View File

@ -408,39 +408,59 @@ body {
.word-companion-character-candidates { .word-companion-character-candidates {
display: grid; display: grid;
gap: 5px; align-content: start;
max-height: 190px; gap: 7px;
grid-auto-rows: max-content;
max-height: min(260px, 42vh);
overflow-y: auto; overflow-y: auto;
overflow-x: hidden;
padding-right: 2px;
} }
.word-companion-character-candidate { .word-companion-section .word-companion-character-candidate {
display: grid; display: flex;
grid-template-columns: auto 1fr auto; align-items: flex-start;
align-items: center; gap: 9px;
gap: 7px; min-height: 42px;
min-height: 31px;
border: 1px solid rgba(111, 75, 45, 0.18); border: 1px solid rgba(111, 75, 45, 0.18);
border-radius: 6px; border-radius: 6px;
padding: 5px 7px; padding: 7px 8px;
background: #fffdf8; background: #fffdf8;
} }
.word-companion-character-candidate input { .word-companion-character-candidate input {
flex: 0 0 auto;
width: 16px; width: 16px;
height: 16px; height: 16px;
margin: 0; margin: 2px 0 0;
accent-color: var(--companion-accent); accent-color: var(--companion-accent);
} }
.word-companion-character-candidate strong { .word-companion-section .word-companion-character-candidate-text {
font-size: 0.9rem; display: grid;
gap: 2px;
min-width: 0;
color: var(--companion-ink);
font-size: inherit;
font-weight: inherit;
overflow-wrap: anywhere;
text-transform: none;
} }
.word-companion-character-candidate em { .word-companion-section .word-companion-character-candidate strong {
color: var(--companion-ink);
font-size: 0.92rem;
line-height: 1.2;
text-transform: none;
}
.word-companion-section .word-companion-character-candidate em {
color: var(--companion-muted); color: var(--companion-muted);
font-size: 0.78rem; font-size: 0.76rem;
font-style: normal; font-style: normal;
font-weight: 800; font-weight: 700;
line-height: 1.25;
text-transform: none;
} }
.word-companion-connection .word-companion-message { .word-companion-connection .word-companion-message {

File diff suppressed because one or more lines are too long

View File

@ -1102,7 +1102,7 @@
const checkbox = document.createElement("input"); const checkbox = document.createElement("input");
checkbox.type = "checkbox"; checkbox.type = "checkbox";
checkbox.value = candidate.text || ""; checkbox.value = candidate.text || "";
checkbox.checked = String(candidate.confidence || "").toLowerCase() === "high"; checkbox.checked = String(candidate.confidence || "").trim().toLowerCase() === "high";
checkbox.addEventListener("change", updateFirstRunButtons); checkbox.addEventListener("change", updateFirstRunButtons);
const name = document.createElement("strong"); const name = document.createElement("strong");
@ -1111,10 +1111,14 @@
const mentions = document.createElement("em"); const mentions = document.createElement("em");
const reason = String(candidate.reason || "").trim(); const reason = String(candidate.reason || "").trim();
mentions.textContent = reason mentions.textContent = reason
? `${Number(candidate.mentionCount || 0).toLocaleString()} mentions, ${reason.toLowerCase()}` ? `${Number(candidate.mentionCount || 0).toLocaleString()} mentions · ${reason}`
: `${Number(candidate.mentionCount || 0).toLocaleString()} mentions`; : `${Number(candidate.mentionCount || 0).toLocaleString()} mentions`;
label.append(checkbox, name, mentions); const text = document.createElement("span");
text.className = "word-companion-character-candidate-text";
text.append(name, mentions);
label.append(checkbox, text);
firstRunCharacterCandidates.append(label); firstRunCharacterCandidates.append(label);
} }

File diff suppressed because one or more lines are too long