|
3 | 3 | acknowledgeInsight, |
4 | 4 | confirmPending, |
5 | 5 | dismissInsight, |
6 | | - fetchAipEntities, |
7 | 6 | fetchInsights, |
8 | 7 | fetchState, |
9 | 8 | openInsightsStream, |
@@ -205,19 +204,6 @@ export default function App() { |
205 | 204 | const [streamLive, setStreamLive] = useState(false); |
206 | 205 | const textareaRef = useRef<HTMLTextAreaElement | null>(null); |
207 | 206 |
|
208 | | - // SATCOM/upstream status — driven by polling /aip/entities. We track |
209 | | - // three conditions to decide whether to red-flag the banner: |
210 | | - // - `aipConnected` — current connectivity (null until first probe). |
211 | | - // - `aipLastError` — server-side last-error string. NULL means AIP is |
212 | | - // genuinely "not configured" (no AIP_BASE_URL), |
213 | | - // NOT a failure. Don't scream red in that case. |
214 | | - // - `aipEverConnected` — sticky bit; once we've seen a healthy AIP, |
215 | | - // a subsequent disconnection IS jamming. |
216 | | - // Banner shows when (everConnected && !connected) OR (lastError set). |
217 | | - const [aipConnected, setAipConnected] = useState<boolean | null>(null); |
218 | | - const [aipLastError, setAipLastError] = useState<string | null>(null); |
219 | | - const aipEverConnectedRef = useRef(false); |
220 | | - |
221 | 207 | // Support strip toggle. Default closed so the primary view (queries + |
222 | 208 | // insights + reasoning + pending) gets the full screen. Click "SHOW |
223 | 209 | // DETAILS" to surface burndown / AIP / mesh / doctrine. |
@@ -419,35 +405,6 @@ export default function App() { |
419 | 405 | } |
420 | 406 | }, []); |
421 | 407 |
|
422 | | - // SATCOM status poll — drives the red "UPSTREAM: JAMMED" banner. Runs |
423 | | - // every 5s, mirrors AIPPanel's cadence so the two surfaces stay |
424 | | - // coherent. Initial state is `null` (unknown) so the banner stays |
425 | | - // hidden until we have a real signal. |
426 | | - useEffect(() => { |
427 | | - let alive = true; |
428 | | - const tick = async () => { |
429 | | - try { |
430 | | - const res = await fetchAipEntities("Unit"); |
431 | | - if (!alive) return; |
432 | | - setAipConnected(Boolean(res.connected)); |
433 | | - setAipLastError(res.last_error ?? null); |
434 | | - if (res.connected) aipEverConnectedRef.current = true; |
435 | | - } catch (e) { |
436 | | - if (!alive) return; |
437 | | - // Real network failure (backend unreachable) — surface it. |
438 | | - console.warn("[beacon][app] aip status poll failed", e); |
439 | | - setAipConnected(false); |
440 | | - setAipLastError(e instanceof Error ? e.message : String(e)); |
441 | | - } |
442 | | - }; |
443 | | - void tick(); |
444 | | - const id = window.setInterval(() => void tick(), 5000); |
445 | | - return () => { |
446 | | - alive = false; |
447 | | - window.clearInterval(id); |
448 | | - }; |
449 | | - }, []); |
450 | | - |
451 | 408 | // Mesh panel toggle. Default collapsed — keeps polling off until the |
452 | 409 | // operator intentionally opens it. |
453 | 410 | const [meshPanelOpen, setMeshPanelOpen] = useState(false); |
@@ -502,23 +459,6 @@ export default function App() { |
502 | 459 | <MeshStatusChip onClick={onMeshChipClick} /> |
503 | 460 | </header> |
504 | 461 |
|
505 | | - {/* Show the SATCOM banner ONLY when AIP genuinely failed (sticky-on |
506 | | - after we'd seen it healthy, OR a real last-error string came back). |
507 | | - AIP being unconfigured (last_error === null) is NOT jamming — that's |
508 | | - the dev-machine baseline, and red-flagging it constantly trains |
509 | | - operators to ignore the banner when it actually matters. */} |
510 | | - {(aipEverConnectedRef.current && aipConnected === false) || |
511 | | - (aipLastError !== null) ? ( |
512 | | - <div className="satcom-banner" role="alert" aria-live="polite"> |
513 | | - <span className="satcom-banner-headline mono"> |
514 | | - UPSTREAM: JAMMED · MESH: HEALTHY |
515 | | - </span> |
516 | | - <span className="satcom-banner-sub"> |
517 | | - Brigade still has the picture via mesh. AIP push queued. |
518 | | - </span> |
519 | | - </div> |
520 | | - ) : null} |
521 | | - |
522 | 462 | {/* Pending banner moved into the right "Actions" column. */} |
523 | 463 | {false && state.pending.length > 0 ? ( |
524 | 464 | <section |
|
0 commit comments