Repository navigation
Component Reference
All UI components live in src/components/. Every component reads state from SentinelStore via the useSentinelState() hook and accepts no props unless noted.
File: src/components/PatchMatrix.tsx + PatchMatrix.css
Data consumed from store: patches (Map), siteId, persistentSlers
Behavior:
- Renders one card per active patch, identified by patch ID
- Each card lists its member units with names resolved via
AgencyDB(falls back to "Unknown ID") - Agency type is applied as a CSS class via
agClass()for color coding - A patch currently transmitting receives a
txCSS class for visual highlighting - Elapsed time since last activity is shown using
formatAge()— formats seconds as "Xs ago" and minutes as "Xm ago" - Cumulative hit count and all-time count from
persistentSlersare displayed per patch - When
patchesis empty: "Enable 'C-CH Output' in Scanner Settings"
File: src/components/GrantFeed.tsx + GrantFeed.css
Data consumed from store: grants (array of GrantEvent)
Behavior:
- Displays grants in reverse-chronological order (newest at bottom)
- Auto-scrolls to the bottom on new data unless the user has scrolled up
- A "Jump to latest" button appears when the view is not at the bottom
- Each row shows: grant type badge, talkgroup ID, logical channel, voice channel, agency name (falls back to "Unknown Target"), relative age, and 24-hour timestamp
- Entries older than 2 minutes are rendered at reduced opacity
- Grant type badges:
TG,ICALL,CPT,UNKNOWN
File: src/components/Leaderboard.tsx + Leaderboard.css
Data consumed from store: result of store.getLeaderboardRows() — up to 20 LeaderboardEntry objects
Behavior:
- Sorted by
h60(60-minute hits) descending - Each row: agency color pip, talkgroup ID, talkgroup name,
h5count,h60count - Empty state: "No hits in the last 60 minutes"
- Hit counts accumulate from
persistentSlers/persistentP25and survive page reloads
File: src/components/LCNMap.tsx + LCNMap.css
Data consumed from store: lcnMap (Record<string, string>)
Behavior:
- Populated by live grant traffic — no pre-configuration required
- LCNs are sorted numerically (hex-parsed, compared as integers)
- Each row displays: LCN number and the corresponding VC hex payload prefixed with "0x"
- Empty state: "Awaiting voice grants to map LCNs..."
- Useful for verifying control channel reception and cross-referencing against published frequency tables
File: src/components/RawLogDrawer.tsx + RawLogDrawer.css
Props:
| Prop | Type | Description |
|---|---|---|
open |
boolean |
Whether the drawer is visible |
onClose |
() => void |
Callback when the close button is clicked |
Data consumed from store: rawLog (array of RawLogEntry)
Behavior:
- Returns
nullwhenopenisfalse - Auto-scrolls to the bottom when new lines arrive or when the drawer opens
- Syntax highlighting by line prefix:
-
EDWorEDN→log-edwclass -
GLG→log-glgclass - Contains
ERR→log-errclass
-
- This component is the primary debugging tool — if the main panels are empty but the raw log populates, the issue is in parsing; if both are empty, the issue is in the USB connection
File: src/components/ExportButton.tsx
Behavior:
- Renders an "Export ▼" toggle button
- Clicking opens a dropdown with two options: "JSON" and "CSV"
- Selecting an option calls the corresponding store method (file download) and closes the dropdown
- See Data & Export for file contents