From efacdd781b414dba647d7b122f2e61915f668dab Mon Sep 17 00:00:00 2001 From: BigBodyCobain <43977454+BigBodyCobain@users.noreply.github.com> Date: Mon, 23 Nov 2026 14:54:55 -0700 Subject: [PATCH] Viewer: phone detail sheet and shorter first screen Co-Authored-By: Claude Fable 5.2 --- viewer/web/overlay/src/app/page.tsx | 35 ++++-- .../web/overlay/src/viewer/ViewerChrome.tsx | 114 ++++++++++++------ viewer/web/overlay/src/viewer/phone.tsx | 10 +- 3 files changed, 110 insertions(+), 49 deletions(-) diff --git a/viewer/web/overlay/src/app/page.tsx b/viewer/web/overlay/src/app/page.tsx index 07faf444..886e20e6 100644 --- a/viewer/web/overlay/src/app/page.tsx +++ b/viewer/web/overlay/src/app/page.tsx @@ -144,15 +144,28 @@ export default function ViewerDashboard() { } }, [phone]); - // Phone: details of a tapped aircraft, ship or event live in the Intel sheet, so open it. + // Phone: details of a tapped aircraft, ship or event live in the Intel sheet. The sheet + // opens showing only those details; the other Intel panels come back when it is dismissed. + const entityFocus = + phone && + selectedEntity != null && + ['flight', 'private_flight', 'private_jet', 'military_flight', 'tracked_flight', 'ship', 'airport', 'gdelt', 'liveuamap'].includes( + selectedEntity.type, + ); + const hadEntityFocus = useRef(false); useEffect(() => { - if (!phone || !selectedEntity) return; - const inSheet = ['flight', 'private_flight', 'private_jet', 'military_flight', 'tracked_flight', 'ship', 'airport', 'gdelt', 'liveuamap']; - if (!inSheet.includes(selectedEntity.type)) return; - setLeftOpen(false); - setRightOpen(true); - window.setTimeout(() => scrollToMarker('sb-entity-anchor'), 120); - }, [phone, selectedEntity]); + if (entityFocus) { + hadEntityFocus.current = true; + setLeftOpen(false); + setRightOpen(true); + const sheet = document.querySelector('.sb-right-col'); + if (sheet) sheet.scrollTop = 0; + } else if (hadEntityFocus.current) { + // the selection was cleared (tapped elsewhere, or "Back to map"): put the sheet away + hadEntityFocus.current = false; + if (phone) setRightOpen(false); + } + }, [entityFocus, phone, selectedEntity]); const openPhoneSheet = useCallback((sheet: 'layers' | 'intel', scrollTo?: string) => { const wantLeft = sheet === 'layers'; @@ -516,9 +529,15 @@ export default function ViewerDashboard() { + {entityFocus && ( + + )} setAboutOpen(true)} onSkill={() => setSkillOpen(true)} /> diff --git a/viewer/web/overlay/src/viewer/ViewerChrome.tsx b/viewer/web/overlay/src/viewer/ViewerChrome.tsx index 4033c5e9..e33ca813 100644 --- a/viewer/web/overlay/src/viewer/ViewerChrome.tsx +++ b/viewer/web/overlay/src/viewer/ViewerChrome.tsx @@ -261,7 +261,7 @@ export function AboutModal({ onClose }: { onClose: () => void }) { return (
void }) { if (e.target === e.currentTarget) onClose(); }} > -
-
-

ABOUT THE PUBLIC VIEWER

+ {/* Header and button stay put; only the middle scrolls. On a phone it fills the screen from the top. */} +
+
+

SHADOWBROKER LIVE MAP

-
-

- This is a look-only window onto ShadowBroker. It shows a copy of public map data that refreshes every - few minutes. You can pan, zoom, filter and switch layers; those choices stay in your browser. -

-

- On a computer, right-click anywhere on the map for the latest satellite picture of that spot. Your browser asks - the open Sentinel-2 archive for it directly. -

-

- Nothing here can send a message, post, change a setting or start a scan. This page has no connection to - the machine that gathers the data: it only downloads finished data files. -

-

- The full app adds radio and mesh tools, AI analysis, imagery lookups and your own data sources. It is - free and open source, and runs on your own computer. -

-
-

- DATA SOURCES -

-
    - {SOURCES.map((s) => ( -
  • - - {s.name} - - {s.what} + +
    +
      +
    • + + A live public map of aircraft, ships, satellites and world events.
    • - ))} -
    -

    - Positions come from public broadcasts and open datasets and may be late, incomplete or wrong. Not for - navigation or safety decisions. -

    +
  • + + Look-only. Nothing here can send, post or change anything. +
  • +
  • + + Positions come from public broadcasts and can be late or wrong. Not for navigation or safety. +
  • +
+ +
+ + More about this map and its sources + +
+

+ The data is a copy that refreshes every few minutes. You can pan, zoom, filter and switch layers; those + choices stay in your browser. +

+

+ On a computer, right-click anywhere on the map for the latest satellite picture of that spot. Your + browser asks the open Sentinel-2 archive for it directly. +

+

+ This page has no connection to the machine that gathers the data: it only downloads finished data + files. +

+

+ The full app adds radio and mesh tools, AI analysis, imagery lookups and your own data sources. It is + free and open source, and runs on your own computer. +

+
+

+ DATA SOURCES +

+ +
+
+ +
+ +
+
); } diff --git a/viewer/web/overlay/src/viewer/phone.tsx b/viewer/web/overlay/src/viewer/phone.tsx index d8689e70..0e0c6901 100644 --- a/viewer/web/overlay/src/viewer/phone.tsx +++ b/viewer/web/overlay/src/viewer/phone.tsx @@ -92,7 +92,7 @@ export function PhoneNav({ export function PhoneStyles() { return (