From fd61f6739125caef279dafb6ac67e9a9086083d7 Mon Sep 17 00:00:00 2001 From: Wolf Date: Wed, 30 Sep 2026 15:44:32 +0200 Subject: [PATCH] Return the viewing agent's vote from Fetch text and fall back to the teaser in the excerpt Co-Authored-By: Claude Fable 5.1 --- app/static/roles.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/static/roles.js b/app/static/roles.js index 8c597a5..96d5ade 100644 --- a/app/static/roles.js +++ b/app/static/roles.js @@ -864,7 +864,8 @@ is the only time this page ever sees a role's `summary` or `description` directly. */ function excerptOf(role) { - const text = (role.summary || role.description || "").replace(/\s+/g, " ").trim(); + /* The server's order (`_EXCERPT_SOURCE`): summary, description, teaser. */ + const text = (role.summary || role.description || role.teaser || "").replace(/\s+/g, " ").trim(); if (text.length <= 200) return text; const cut = text.slice(0, 200); const space = cut.lastIndexOf(" "); @@ -1458,7 +1459,7 @@ async function fetchText(button) { const uid = state.readingUid; const role = await busy(button, "Fetching…", - () => api(`/api/roles/${encodeURIComponent(uid)}/text`, { method: "POST" })); + () => api(roleUrl(uid).replace(/(\?|$)/, "/text$1"), { method: "POST" })); if (role) merge(role); }