Add missing pipeline steps to frontend status indicator#162
Conversation
Agent-Logs-Url: https://github.com/CyberSecDef/NovelForge/sessions/43b4819c-c524-44d5-80e6-7a3faac8b911 Co-authored-by: CyberSecDef <17597068+CyberSecDef@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the frontend’s LLM log “sticky status” inference so newer chapter-generation pipeline steps can display more specific progress text instead of falling back to a generic status.
Changes:
- Added new substring checks in
inferStatusFromRequestEntryfor: voice/dialogue differentiation, human oddities, metaphor reduction, and copy edit.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (combined.indexOf("voice & dialogue") !== -1 || combined.indexOf("voice and dialogue") !== -1) { | ||
| return "Differentiating character voices"; | ||
| } |
There was a problem hiding this comment.
This condition is effectively unreachable/inaccurate because an earlier check matches any combined containing "dialogue" and returns "Refining Chapter Dialog" first. Also, the rendered prompt text uses the phrase "dialogue and voice" (not "voice & dialogue" / "voice and dialogue"), so this may never match when inferring from payload.messages. Consider moving a more specific voice+dialogue detection above the generic "dialogue" check and matching the actual prompt wording (or using a bounded regex like voice.*dialogue / dialogue.*voice).
| if (combined.indexOf("human oddities") !== -1) { | ||
| return "Adding human texture"; | ||
| } |
There was a problem hiding this comment.
The human-oddities prompt text uses the singular phrase "human oddity" (see prompts.yml), so searching for "human oddities" in payload.messages won’t match and will still fall back to the generic status. Adjust the substring (e.g., match "human oddity") or include entry.action in the string you scan.
| if (combined.indexOf("metaphor reduction") !== -1) { | ||
| return "Reducing metaphor density"; | ||
| } |
There was a problem hiding this comment.
The metaphor-reduction prompt content does not contain the literal phrase "metaphor reduction"; it uses wording like "reduce the metaphor density" / "over-metaphorise". If you’re inferring from payload.messages, this check likely won’t match and will keep showing the fallback status. Consider matching the actual prompt phrasing or incorporating entry.action into the scanned text.
inferStatusFromRequestEntryinstatic/js/script.jshad no entries for four new pipeline steps, causing them to fall through to the generic "Prompting LLM" fallback instead of showing meaningful progress text.Changes
static/js/script.js: Added four new conditions toinferStatusFromRequestEntry:The voice/dialogue check uses a phrase match rather than two independent word checks to avoid false positives on unrelated content containing both words.