Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
set -euo pipefail
dest="$1"
mkdir -p "$dest"
for f in rptrs.json tafl_min.json airports_min.json radioid-users.csv; do
for f in rptrs.json radioid-users.csv; do
# A branch that no longer has a dataset (one moved off the site) must
# not stop the deploy of every other preview and of the site itself.
[ -f "src/data/$f" ] || { echo "::notice::$f not in this checkout, skipped"; continue; }
Expand Down Expand Up @@ -140,6 +140,13 @@ jobs:
run: |
/tmp/copy-data.sh dist_root
/tmp/copy-data.sh dist_dev
# Licensed sites and airports now come from data.ferritefw.dev. Builds up
# to 2026.10.1, including every offline copy of one, still fetch these
# two from https://neonplug.app/, so the root keeps serving them, frozen
# at that release. Only the root: /dev/ and the previews don't need them.
for f in tafl_min.json airports_min.json; do
git show "v2026.10.1:src/data/$f" > "dist_root/$f"
done

- name: List open PRs and build previews
env:
Expand Down
14 changes: 10 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,28 @@ the site wholesale):
| `/` | the **latest release asset**, downloaded not rebuilt — falls back to `main` until the first tag |
| `/dev/` | latest `main` |
| `/test/<branch>/` | every open PR |
| `/rptrs.json`, `/tafl_min.json`, `/airports_min.json`, `/radioid-users.csv` | always from `main` |
| `/rptrs.json`, `/radioid-users.csv` | always from `main` |
| `/tafl_min.json`, `/airports_min.json` | root only, frozen at `v2026.10.1`, for builds up to that release |

Two deliberate decisions there. **The root is the published artifact, not a rebuild of the tag** — for
software that writes to radios, the file users download offline and the file the site serves must be
byte-identical. **Datasets are not pinned to a release** — every loader tries
`https://neonplug.app/<file>` *first*, so this data is already "latest from main" by design; pinning
would freeze repeater/DMR-user data at tag time and add ~31 MB to every release.

**The dataset fallback chains are not symmetric** — `jsonLoader.ts` (`rptrs.json`, `tafl_min.json`,
`airports_min.json`) falls back through relative paths to `raw.githubusercontent.com` on `main`.
**Airports, licensed sites (TAFL + FCC) and amateur repeaters come from
[data.ferritefw.dev](https://data.ferritefw.dev)** (`services/ferrite/`), fetched tile by tile around
the search, straight from the browser (it sends `Access-Control-Allow-Origin: *`). Not in the repo,
not deployed, and like the datasets below they need the internet.

**The dataset fallback chains are not symmetric** — `jsonLoader.ts` (`rptrs.json`)
falls back through relative paths to `raw.githubusercontent.com` on `main`.
`ContactsTab.tsx` is the *only* loader for `radioid-users.csv` (16 MB, the largest) and has **no
GitHub fallback at all** — `neonplug.app` plus four relative paths, then it throws. Don't assume the
GitHub safety net covers contacts.

Because the absolute `neonplug.app` URL always wins, the per-PR and `/dev/` dataset copies are
**unreadable dead weight** (~31 MB each, against Pages' 1 GB site limit) — see `TODO-RELEASE.md` D4.
**unreadable dead weight** (~19 MB each, against Pages' 1 GB site limit) — see `TODO-RELEASE.md` D4.

**Two independent version numbers — don't conflate them:**

Expand Down
52 changes: 21 additions & 31 deletions src/components/about/AboutTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,46 +314,36 @@ export const AboutTab: React.FC = () => {
</div>

<div>
<SectionTitle as="h4" size="sm" className="mb-1">TAFL Database</SectionTitle>
<SectionTitle as="h4" size="sm" className="mb-1">Ferrite data</SectionTitle>
<p className="text-sm mb-2">
Canadian radio frequency license data from the Technical Acceptance and Frequency List (TAFL),
maintained by Innovation, Science and Economic Development Canada (ISED).
The Channel Wizard's airports, licensed sites and amateur repeaters come from Ferrite's channel data,
rebuilt daily from each source's own public download.
</p>
<ul className="text-sm mb-2 list-disc list-inside space-y-1">
<li>
Contains information licensed under the Open Government Licence – Canada. Source: Innovation, Science
and Economic Development Canada, Spectrum Management System authorization data extract.
</li>
<li>
Source: US Federal Communications Commission, Universal Licensing System public access data (land
mobile). Not endorsed by the FCC.
</li>
<li>Airport data from OurAirports (ourairports.com), public domain.</li>
<li>Repeater data from HearHam.com (user-contributed).</li>
</ul>
<p className="text-sm mb-2">
Not an official product of ISED, the FCC, OurAirports or HearHam. For finding frequencies, not
runways: never use it for navigation.
</p>
<a
href="https://ised-isde.canada.ca/site/spectrum-management-telecommunications/en"
href="https://data.ferritefw.dev"
target="_blank"
rel="noopener noreferrer"
className="link-accent text-sm"
>
ISED Spectrum Management
https://data.ferritefw.dev
</a>
</div>

<div>
<SectionTitle as="h4" size="sm" className="mb-1">Airport Frequency Data</SectionTitle>
<p className="text-sm mb-2">
Airport communication frequencies and location data from open aviation databases,
including ICAO-compliant frequency information.
</p>
<div className="space-y-1">
<a
href="https://frequency.icao.int"
target="_blank"
rel="noopener noreferrer"
className="link-accent block text-sm"
>
ICAO Frequency Finder
</a>
<a
href="https://airportmap.de/data"
target="_blank"
rel="noopener noreferrer"
className="link-accent block text-sm"
>
Airportmap Open Databases
</a>
</div>
</div>
</div>

<div className="mt-4 pt-3 border-t border-neon-cyan border-opacity-20">
Expand Down
58 changes: 47 additions & 11 deletions src/components/import/SmartImportTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { formatPlural } from '../../utils/formatPlural';
import { ChirpSource } from './sources/ChirpSource';
import { AirportSource } from './sources/AirportSource';
import { TaflSource } from './sources/TaflSource';
import { AmateurRepeaterSource } from './sources/AmateurRepeaterSource';
import { findNearbyAmateurRepeaters, type AmateurRepeater } from '../../services/amateurRepeaterChannels';
import { RptrsSource } from './sources/RptrsSource';
import { MmdvmSource } from './sources/MmdvmSource';
import { FixedChannelsSource } from './sources/FixedChannelsSource';
Expand All @@ -34,6 +36,7 @@ export const SmartImportTab: React.FC = () => {
const [error, setError] = useState<string | null>(null);
const [searchAirports, setSearchAirports] = useState(true);
const [searchTafl, setSearchTafl] = useState(true);
const [searchAmateurRepeaters, setSearchAmateurRepeaters] = useState(true);
const [searchDmrRepeaters, setSearchDmrRepeaters] = useState(true);
const [isSearchingAll, setIsSearchingAll] = useState(false);

Expand All @@ -49,6 +52,9 @@ export const SmartImportTab: React.FC = () => {
const [taflLoadProgress, setTaflLoadProgress] = useState<{ percent: number; loaded: number; total: number } | null>(null);
const [isSearchingTafl, setIsSearchingTafl] = useState(false);

// Amateur (analog FM) repeater search results
const [amateurRepeaters, setAmateurRepeaters] = useState<AmateurRepeater[]>([]);

// Rptrs search results
const [rptrs, setRptrs] = useState<(RptrData & { distance?: number })[]>([]);
const [rptrsLoadProgress, setRptrsLoadProgress] = useState<{ percent: number; loaded: number; total: number } | null>(null);
Expand All @@ -62,15 +68,16 @@ export const SmartImportTab: React.FC = () => {
setError(msg || null);
};

// Whether any search type is ticked; the button and the handler both ask.
const hasSearchType =
searchAirports || searchTafl || searchAmateurRepeaters || (supportsDigital && searchDmrRepeaters);

// Unified search handler that searches all selected types
const handleSearchAll = async () => {
const hasSearchType = supportsDigital
? (searchAirports || searchTafl || searchDmrRepeaters)
: (searchAirports || searchTafl);
if (!hasSearchType) {
setError(supportsDigital
? 'Please select at least one search type (Airports, TAFL, or DMR Repeaters)'
: 'Please select at least one search type (Airports or TAFL)');
? 'Please select at least one search type (Airports, Licensed sites, Amateur repeaters, or DMR Repeaters)'
: 'Please select at least one search type (Airports, Licensed sites, or Amateur repeaters)');
return;
}

Expand All @@ -91,6 +98,9 @@ export const SmartImportTab: React.FC = () => {
if (searchDmrRepeaters) {
setRptrs([]);
}
if (searchAmateurRepeaters) {
setAmateurRepeaters([]);
}

try {
const { lat, lon, radius } = await resolveCoordinates();
Expand Down Expand Up @@ -128,7 +138,17 @@ export const SmartImportTab: React.FC = () => {
);
setTaflEntries(nearbyTafl);
setIsSearchingTafl(false);
return ['TAFL entries', nearbyTafl.length];
return ['licensed sites', nearbyTafl.length];
})()
);
}

if (searchAmateurRepeaters) {
searchPromises.push(
(async (): Promise<[string, number]> => {
const nearby = await findNearbyAmateurRepeaters(lat, lon, radius);
setAmateurRepeaters(nearby);
return ['amateur repeaters', nearby.length];
})()
);
}
Expand Down Expand Up @@ -192,8 +212,8 @@ export const SmartImportTab: React.FC = () => {
<SectionTitle as="h3" size="lg" className="mb-4">Location-Based Search</SectionTitle>
<p className="text-sm text-cool-gray mb-4">
{supportsDigital
? 'Search for nearby airports, TAFL entries, and DMR repeaters based on your location'
: 'Search for nearby airports and TAFL entries based on your location'}
? 'Search for nearby airports, licensed sites, amateur repeaters and DMR repeaters based on your location'
: 'Search for nearby airports, licensed sites and amateur repeaters based on your location'}
</p>

<div className="mb-4">
Expand Down Expand Up @@ -327,7 +347,16 @@ export const SmartImportTab: React.FC = () => {
onChange={(e) => setSearchTafl(e.target.checked)}
className="mr-2"
/>
<span className="text-cool-gray">TAFL (Transport Canada)</span>
<span className="text-cool-gray">Licensed sites (Canada TAFL, US FCC)</span>
</label>
<label className="flex items-center">
<input
type="checkbox"
checked={searchAmateurRepeaters}
onChange={(e) => setSearchAmateurRepeaters(e.target.checked)}
className="mr-2"
/>
<span className="text-cool-gray">Amateur repeaters (analog FM, HearHam)</span>
</label>
{supportsDigital && (
<label className="flex items-center">
Expand All @@ -345,7 +374,7 @@ export const SmartImportTab: React.FC = () => {

<Button
onClick={handleSearchAll}
disabled={isSearchingAll || (supportsDigital ? (!searchAirports && !searchTafl && !searchDmrRepeaters) : (!searchAirports && !searchTafl))}
disabled={isSearchingAll || !hasSearchType}
className="w-full"
>
{isSearchingAll
Expand All @@ -368,7 +397,7 @@ export const SmartImportTab: React.FC = () => {
{isSearchingTafl && taflLoadProgress && (
<div>
<div className="flex justify-between items-center mb-1">
<span className="text-sm text-cool-gray">Loading TAFL data...</span>
<span className="text-sm text-cool-gray">Loading licensed sites...</span>
<span className="text-sm text-cool-gray">{taflLoadProgress.percent.toFixed(1)}%</span>
</div>
<div className="w-full bg-black rounded-full h-2 border border-neon-cyan">
Expand Down Expand Up @@ -428,6 +457,13 @@ export const SmartImportTab: React.FC = () => {
onGenerationResult={setGenerationResult}
/>

{/* Amateur repeaters (analog FM, any radio) */}
<AmateurRepeaterSource
repeaters={amateurRepeaters}
onError={handleSetError}
onGenerationResult={setGenerationResult}
/>

{/* 7. RptrsSource (only if supportsDigital) */}
<RptrsSource
rptrs={rptrs}
Expand Down
94 changes: 94 additions & 0 deletions src/components/import/sources/AmateurRepeaterSource.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import React, { useState } from 'react';
import { formatPlural } from '../../../utils/formatPlural';
import { useImportStores } from '../../../hooks/useImportStores';
import { getNextChannelNumber, selectionCardClass } from '../../../utils/importHelpers';
import {
describeRepeater,
generateAmateurRepeaterChannels,
type AmateurRepeater,
} from '../../../services/amateurRepeaterChannels';
import { SelectAllButtons } from '../SelectAllButtons';
import { Button } from '../../ui/Button';
import { Card } from '../../ui/Card';
import { SectionTitle } from '../../ui/SectionTitle';

interface AmateurRepeaterSourceProps {
repeaters: AmateurRepeater[];
onError: (msg: string) => void;
onGenerationResult: (r: { channels: number; zones: number }) => void;
}

/** Analog FM amateur repeaters found near the search, from HearHam via data.ferritefw.dev. */
export const AmateurRepeaterSource: React.FC<AmateurRepeaterSourceProps> = ({ repeaters, onError, onGenerationResult }) => {
const { channels, setChannels, zones, setZones } = useImportStores();
const [selected, setSelected] = useState<Set<number>>(new Set());

if (repeaters.length === 0) return null;

const toggle = (index: number) => {
const next = new Set(selected);
if (next.has(index)) next.delete(index);
else next.add(index);
setSelected(next);
};

const handleAdd = () => {
const chosen = [...selected].sort((a, b) => a - b).map((i) => repeaters[i]).filter(Boolean);
if (chosen.length === 0) {
onError('Please select at least one repeater');
return;
}
onError('');
const result = generateAmateurRepeaterChannels(getNextChannelNumber(channels), chosen);
setChannels([...channels, ...result.channels]);
setZones([...zones, ...result.zones]);
onGenerationResult({ channels: result.channels.length, zones: result.zones.length });
setSelected(new Set());
};

return (
<Card padding="tight" className="mb-4">
<SectionTitle as="h3" size="lg" className="mb-4">Amateur Repeaters</SectionTitle>
<div className="flex justify-between items-center mb-4">
<SectionTitle as="h4" size="md">
Found {repeaters.length} {formatPlural(repeaters.length, 'Repeater')}
</SectionTitle>
<SelectAllButtons
onSelectAll={() => setSelected(new Set(repeaters.map((_, i) => i)))}
onDeselectAll={() => setSelected(new Set())}
/>
</div>
<div className="space-y-2 max-h-96 overflow-y-auto mb-4">
{repeaters.map((r, index) => (
<div
key={`${r.name}|${r.mhz}|${r.lat}|${r.lon}`}
className={selectionCardClass(selected.has(index))}
onClick={() => toggle(index)}
>
<div className="flex items-center gap-2">
<input
type="checkbox"
checked={selected.has(index)}
onChange={() => toggle(index)}
onClick={(e) => e.stopPropagation()}
className="mr-2"
/>
<span className="font-semibold text-neon-cyan">{r.name}</span>
<span className="text-sm text-cool-gray">{describeRepeater(r)}</span>
<span className="text-xs text-cool-gray ml-auto">{r.distance.toFixed(1)} miles away</span>
</div>
</div>
))}
</div>
{selected.size > 0 && (
<Button onClick={handleAdd} variant="accent" className="w-full">
Add {selected.size} {formatPlural(selected.size, 'Repeater')}
</Button>
)}
<p className="text-xs text-cool-gray mt-2">
Repeater data from HearHam.com (user-contributed), via data.ferritefw.dev. Check a repeater's tone before you
rely on it.
</p>
</Card>
);
};
Loading
Loading