fix(console): blank lead page — statusStrip glued to a split stalled ternary

When statusStrip was moved (fda1247), the regex that placed it after `const
stalled` matched only the FIRST line of stalled's multi-line ternary. The
`? { mins, nudge } : null` continuation was left dangling right after
`const statusStrip = (…)`, so statusStrip parsed as `<jsx> ? {mins,nudge} : null`
— a truthy JSX condition — and evaluated to the object {mins, nudge}. Rendering
that object threw React #31 and blanked the page for any stalled instance;
`stalled` itself was left a bare boolean.

Restored stalled to its object form and removed the orphaned ternary. statusStrip
is a clean JSX expression again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Yashas 2026-09-09 12:28:46 +05:30
parent ee57184fa2
commit 818ef871ba

View File

@ -379,6 +379,8 @@ export default function Lead() {
// the way out rather than going on promising two minutes. // the way out rather than going on promising two minutes.
const stillFor = row.updated_at ? now - Date.parse(row.updated_at) : 0 const stillFor = row.updated_at ? now - Date.parse(row.updated_at) : 0
const stalled = !blocked && stage?.kind === 'auto' && stillFor > STALL_AFTER_MS const stalled = !blocked && stage?.kind === 'auto' && stillFor > STALL_AFTER_MS
? { mins: Math.round(stillFor / 60000), nudge: nudgeFor(stage, row) }
: null
/* WHAT IS HAPPENING NOW, lifted above the numbers. An operator's first /* WHAT IS HAPPENING NOW, lifted above the numbers. An operator's first
question about a lead is "what is going on / what do I do", not "what is question about a lead is "what is going on / what do I do", not "what is
@ -456,9 +458,6 @@ blocked ? (
) : null ) : null
) )
? { mins: Math.round(stillFor / 60000), nudge: nudgeFor(stage, row) }
: null
return ( return (
<section> <section>