Files
2026-11-23 15:57:08 -07:00

151 lines
8.4 KiB
JSON

{
"_comment": [
"Small text cuts applied to the build copy of frontend/ (never to frontend/ itself).",
"Each cut must match exactly `count` times (default 1) or the build fails,",
"so an app change can never silently bring a removed control back."
],
"cuts": [
{
"why": "hide layer switches the viewer does not offer",
"file": "src/components/WorldviewLeftPanel.tsx",
"find": " {sections.map((section) => {",
"replace": " {sections.map((section) => ({ ...section, layers: section.layers.filter((layer) => !VIEWER_HIDDEN_LAYERS.has(layer.id)) })).filter((section) => section.layers.length > 0).map((section) => {",
"prepend": "import { VIEWER_HIDDEN_LAYERS } from '@/viewer/config';"
},
{
"why": "remove the Meshtastic 'scan planet' button (starts a scan on the owner's server)",
"file": "src/components/WorldviewLeftPanel.tsx",
"find": "{active && layer.id === 'sigint_meshtastic' && (",
"replace": "{false && active && layer.id === 'sigint_meshtastic' && ("
},
{
"why": "remove the OSM basemap (its tiles come through the owner's tile proxy)",
"file": "src/components/DisplayMenu.tsx",
"find": " { id: 'OSM' as MapStyle, label: 'OSM' },\n",
"replace": ""
},
{
"why": "place-name search is off in the viewer; say so plainly",
"file": "src/app/LocateBar.tsx",
"find": "Place search unavailable — check backend connection",
"replace": "Place names are off in the public viewer. Enter coordinates, e.g. 48.85, 2.35",
"count": 2
},
{
"why": "hide the AI Intelligence Brief button (runs the owner's AI on demand)",
"file": "src/components/NewsFeed.tsx",
"find": " title=\"AI Intelligence Brief\"",
"replace": " hidden\n title=\"AI Intelligence Brief\""
},
{
"why": "hide the MKT switch (turns market fetching on for the whole server)",
"file": "src/components/NewsFeed.tsx",
"find": " title={\n marketsCorrelationEnabled\n ? 'Prediction market correlation on intercept stories (clearnet Polymarket/Kalshi)'",
"replace": " hidden\n title={\n marketsCorrelationEnabled\n ? 'Prediction market correlation on intercept stories (clearnet Polymarket/Kalshi)'"
},
{
"why": "layer switches stay in the browser; never try to sync them to a server",
"file": "src/lib/layerPreferences.ts",
"find": "function ensureLayerBackendSync(): void {\n",
"replace": "function ensureLayerBackendSync(): void {\n // Public viewer: there is no backend to sync layer switches with.\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction unusedLayerBackendSync(): void {\n"
},
{
"why": "receiver popup: drop TRACK (the in-app tracker is not in the viewer)",
"file": "src/components/MaplibreViewer.tsx",
"find": "className=\"flex-1 text-center px-2 py-1.5 rounded bg-amber-950/40 border border-amber-500/30",
"replace": "hidden className=\"flex-1 text-center px-2 py-1.5 rounded bg-amber-950/40 border border-amber-500/30"
},
{
"why": "receiver popup: the remaining button opens the receiver's own site in a new tab",
"file": "src/components/MaplibreViewer.tsx",
"find": "<Play size={10} /> TUNE IN",
"replace": "<Play size={10} /> OPEN RECEIVER ↗"
},
{
"why": "scanner popup: drop TRACK (the in-app player streams through the owner's server)",
"file": "src/components/MaplibreViewer.tsx",
"find": "className=\"flex-1 text-center px-2 py-1.5 rounded bg-red-950/40 border border-red-500/30",
"replace": "hidden className=\"flex-1 text-center px-2 py-1.5 rounded bg-red-950/40 border border-red-500/30"
},
{
"why": "scanner popup: the remaining button opens the provider's own site in a new tab",
"file": "src/components/MaplibreViewer.tsx",
"find": "<Play size={10} /> OPEN PLAYER",
"replace": "<Play size={10} /> LISTEN ON OPENMHZ ↗"
},
{
"why": "sub-folder hosting: the map worker file sits next to the viewer, not at the top of the site",
"file": "src/components/MaplibreViewer.tsx",
"find": "maplibregl.setWorkerUrl('/maplibre-gl-worker.mjs');",
"replace": "maplibregl.setWorkerUrl(`${process.env.NEXT_PUBLIC_SB_BASE_PATH || ''}/maplibre-gl-worker.mjs`);"
},
{
"why": "sub-folder hosting: the cable map file sits next to the viewer, not at the top of the site",
"file": "src/components/MaplibreViewer.tsx",
"find": "fetch('/data/submarine-cables.json')",
"replace": "fetch(`${process.env.NEXT_PUBLIC_SB_BASE_PATH || ''}/data/submarine-cables.json`)"
},
{
"why": "region panel: the viewer has no country lookup, so the country block is shown only when there is one",
"file": "src/components/NewsFeed.tsx",
"find": " {/* COUNTRY */}",
"replace": " <div className={d.country ? 'flex flex-col gap-2' : 'hidden'}>{/* COUNTRY */}"
},
{
"why": "region panel: closes the country block opened above",
"file": "src/components/NewsFeed.tsx",
"find": " {/* LOCAL */}",
"replace": " </div>{/* LOCAL */}"
},
{
"why": "region panel: the pin label on the map, in plain words",
"file": "src/components/MaplibreViewer.tsx",
"find": "{regionDossierLoading ? 'COMPILING...' : '▶ INTEL TARGET'}",
"replace": "{regionDossierLoading ? 'LOOKING...' : 'SATELLITE VIEW'}"
},
{
"why": "label tidy-up: the viewer shows many more clustered layers (cameras, fishing, mesh), and their bubbles were hiding aircraft and carrier names a second after they appeared. In the viewer a name yields only to a panel, an alert box or another name.",
"file": "src/components/map/MapMarkers.tsx",
"find": ".filter((l) => l.type === 'circle' && /cluster/.test(l.id) && !/pulse|bg|halo/.test(l.id))",
"replace": ".filter(() => false)"
},
{
"why": "label tidy-up: cluster count bubbles no longer hide names either (see the cut above)",
"file": "src/components/map/MapMarkers.tsx",
"find": "if (r.width > 0) boxes.push(new DOMRect(r.left - 6, r.top - 4, r.width + 12, r.height + 8));",
"replace": "void r;"
},
{
"why": "radar watch areas come with the published data; the viewer has no server to ask for them",
"file": "src/components/MaplibreViewer.tsx",
"find": " const res = await fetch(`${API_BASE}/api/sar/aois`, {\n credentials: 'include',\n });",
"replace": " const res = new Response('{}');"
},
{
"why": "draw the radar watch areas from the published coverage list",
"file": "src/components/MaplibreViewer.tsx",
"find": " () => (activeLayers.sar ? buildSarAoisGeoJSON(sarAoisList) : null),\n [activeLayers.sar, sarAoisList],",
"replace": " () => (activeLayers.sar ? buildSarAoisGeoJSON(sarAoisList.length ? sarAoisList : viewerSarAois(data?.sar_aoi_coverage)) : null),\n [activeLayers.sar, sarAoisList, data?.sar_aoi_coverage],",
"prepend": "import { viewerSarAois } from '@/viewer/sarAois';"
},
{
"why": "the viewer has no sign-up; say plainly when there are no radar alerts",
"file": "src/components/WorldviewLeftPanel.tsx",
"find": "? `Catalog only · ${data.sar_scenes.length} Sentinel-1 passes · Alerts: sign up →`",
"replace": "? `NASA OPERA · no alerts right now · ${data.sar_scenes.length} Sentinel-1 passes`"
},
{
"why": "the viewer has no sign-up; say plainly when there are no radar alerts",
"file": "src/components/WorldviewLeftPanel.tsx",
"find": ": 'Catalog only (free) · Alerts: sign up →')),",
"replace": ": 'NASA OPERA · no alerts right now')),"
},
{
"why": "the map must also receive the radar coverage list, which carries the watch areas",
"file": "src/components/MaplibreViewer.tsx",
"find": " 'sar_anomalies',\n",
"replace": " 'sar_anomalies',\n 'sar_aoi_coverage',\n"
}
]
}