Skip to content

Commit cf25459

Browse files
committed
chore(dashboard): remove SATCOM 'UPSTREAM: JAMMED' banner
The big red banner above the header (driven by /aip/entities polling) fired on the dev box's baseline 'AIP not configured' state, so operators saw it constantly and learned to ignore it. The signal value was negative. Drops: - the JSX banner block in App.tsx - aipConnected / aipLastError / aipEverConnectedRef state - the 5s AIP-status polling useEffect that fed them - the now-unused fetchAipEntities import (still used by AIPPanel.tsx) The CSS rules (.satcom-banner*) are kept in place — harmless dead style, will be reaped in a future css cleanup pass.
1 parent 0e60e89 commit cf25459

1 file changed

Lines changed: 0 additions & 60 deletions

File tree

dashboard/src/App.tsx

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
acknowledgeInsight,
44
confirmPending,
55
dismissInsight,
6-
fetchAipEntities,
76
fetchInsights,
87
fetchState,
98
openInsightsStream,
@@ -205,19 +204,6 @@ export default function App() {
205204
const [streamLive, setStreamLive] = useState(false);
206205
const textareaRef = useRef<HTMLTextAreaElement | null>(null);
207206

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-
221207
// Support strip toggle. Default closed so the primary view (queries +
222208
// insights + reasoning + pending) gets the full screen. Click "SHOW
223209
// DETAILS" to surface burndown / AIP / mesh / doctrine.
@@ -419,35 +405,6 @@ export default function App() {
419405
}
420406
}, []);
421407

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-
451408
// Mesh panel toggle. Default collapsed — keeps polling off until the
452409
// operator intentionally opens it.
453410
const [meshPanelOpen, setMeshPanelOpen] = useState(false);
@@ -502,23 +459,6 @@ export default function App() {
502459
<MeshStatusChip onClick={onMeshChipClick} />
503460
</header>
504461

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-
522462
{/* Pending banner moved into the right "Actions" column. */}
523463
{false && state.pending.length > 0 ? (
524464
<section

0 commit comments

Comments
 (0)