Skip to content

Add missing pipeline steps to frontend status indicator#162

Merged
CyberSecDef merged 2 commits into
mainfrom
copilot/fix-status-indicator-pipeline-steps
Apr 9, 2026
Merged

Add missing pipeline steps to frontend status indicator#162
CyberSecDef merged 2 commits into
mainfrom
copilot/fix-status-indicator-pipeline-steps

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

inferStatusFromRequestEntry in static/js/script.js had 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 to inferStatusFromRequestEntry:
if (combined.indexOf("voice & dialogue") !== -1 || combined.indexOf("voice and dialogue") !== -1) {
  return "Differentiating character voices";
}
if (combined.indexOf("human oddities") !== -1) {
  return "Adding human texture";
}
if (combined.indexOf("metaphor reduction") !== -1) {
  return "Reducing metaphor density";
}
if (combined.indexOf("copy edit") !== -1) {
  return "Copy editing";
}

The voice/dialogue check uses a phrase match rather than two independent word checks to avoid false positives on unrelated content containing both words.

Copilot AI requested review from Copilot and removed request for Copilot April 9, 2026 00:20
Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot April 9, 2026 00:22
Copilot AI changed the title [WIP] Fix frontend status indicator for new pipeline steps Add missing pipeline steps to frontend status indicator Apr 9, 2026
Copilot AI requested a review from CyberSecDef April 9, 2026 00:23
@CyberSecDef CyberSecDef marked this pull request as ready for review April 9, 2026 00:26
Copilot AI review requested due to automatic review settings April 9, 2026 00:26
@CyberSecDef CyberSecDef merged commit 9fe01fc into main Apr 9, 2026
7 checks passed
@CyberSecDef CyberSecDef deleted the copilot/fix-status-indicator-pipeline-steps branch April 9, 2026 00:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 inferStatusFromRequestEntry for: voice/dialogue differentiation, human oddities, metaphor reduction, and copy edit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread static/js/script.js
Comment on lines +263 to +265
if (combined.indexOf("voice & dialogue") !== -1 || combined.indexOf("voice and dialogue") !== -1) {
return "Differentiating character voices";
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment thread static/js/script.js
Comment on lines +266 to +268
if (combined.indexOf("human oddities") !== -1) {
return "Adding human texture";
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread static/js/script.js
Comment on lines +269 to +271
if (combined.indexOf("metaphor reduction") !== -1) {
return "Reducing metaphor density";
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend Status Indicator Missing New Pipeline Steps

3 participants