Skip to content

Commit 0a535a3

Browse files
staticoclaude
andcommitted
Add color mappings for all port types
Maps all Meshtastic port types from portnums.proto to distinct neon colors in the cypherpunk palette. Previously unlabeled ports (like PORT_35) now display with proper names and unique colors for better packet identification. Port colors added: - STORE_FORWARD_PLUSPLUS: Purple - ADMIN: Red-orange - AUDIO: Magenta - ALERT: Bright red - SERIAL: Turquoise - RANGE_TEST: Yellow - NEIGHBORINFO: Bright orange - ATAK_PLUGIN: Dark green - And 15+ more port types 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 4011dd4 commit 0a535a3

3 files changed

Lines changed: 55 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@meshtastic/cli-viewer",
3-
"version": "1.6.1",
3+
"version": "1.6.2",
44
"type": "module",
55
"scripts": {
66
"dev": "bun run src/index.ts",

src/ui/components/PacketList.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,38 @@ export function PacketList({ packets, selectedIndex, nodeStore, height = 20, isF
112112
function getPortColor(portnum?: Portnums.PortNum): string {
113113
if (portnum === undefined) return theme.packet.encrypted;
114114
switch (portnum) {
115+
case Portnums.PortNum.UNKNOWN_APP: return theme.packet.unknown;
115116
case Portnums.PortNum.TEXT_MESSAGE_APP: return theme.packet.message;
117+
case Portnums.PortNum.REMOTE_HARDWARE_APP: return theme.packet.remoteHardware;
116118
case Portnums.PortNum.POSITION_APP: return theme.packet.position;
117-
case Portnums.PortNum.TELEMETRY_APP: return theme.packet.telemetry;
118119
case Portnums.PortNum.NODEINFO_APP: return theme.packet.nodeinfo;
119120
case Portnums.PortNum.ROUTING_APP: return theme.packet.routing;
121+
case Portnums.PortNum.ADMIN_APP: return theme.packet.admin;
122+
case Portnums.PortNum.TEXT_MESSAGE_COMPRESSED_APP: return theme.packet.compressed;
123+
case Portnums.PortNum.WAYPOINT_APP: return theme.packet.waypoint;
124+
case Portnums.PortNum.AUDIO_APP: return theme.packet.audio;
125+
case Portnums.PortNum.DETECTION_SENSOR_APP: return theme.packet.detectionSensor;
126+
case Portnums.PortNum.ALERT_APP: return theme.packet.alert;
127+
case Portnums.PortNum.KEY_VERIFICATION_APP: return theme.packet.keyVerification;
128+
case Portnums.PortNum.REPLY_APP: return theme.packet.reply;
129+
case Portnums.PortNum.IP_TUNNEL_APP: return theme.packet.ipTunnel;
130+
case Portnums.PortNum.PAXCOUNTER_APP: return theme.packet.paxcounter;
131+
case Portnums.PortNum.STORE_FORWARD_PLUSPLUS_APP: return theme.packet.storeForwardPP;
132+
case Portnums.PortNum.SERIAL_APP: return theme.packet.serial;
133+
case Portnums.PortNum.STORE_FORWARD_APP: return theme.packet.storeForward;
134+
case Portnums.PortNum.RANGE_TEST_APP: return theme.packet.rangeTest;
135+
case Portnums.PortNum.TELEMETRY_APP: return theme.packet.telemetry;
136+
case Portnums.PortNum.ZPS_APP: return theme.packet.zps;
137+
case Portnums.PortNum.SIMULATOR_APP: return theme.packet.simulator;
120138
case Portnums.PortNum.TRACEROUTE_APP: return theme.packet.traceroute;
139+
case Portnums.PortNum.NEIGHBORINFO_APP: return theme.packet.neighborinfo;
140+
case Portnums.PortNum.ATAK_PLUGIN: return theme.packet.atakPlugin;
141+
case Portnums.PortNum.MAP_REPORT_APP: return theme.packet.mapReport;
142+
case Portnums.PortNum.POWERSTRESS_APP: return theme.packet.powerstress;
143+
case Portnums.PortNum.RETICULUM_TUNNEL_APP: return theme.packet.reticulumTunnel;
144+
case Portnums.PortNum.CAYENNE_APP: return theme.packet.cayenne;
145+
case Portnums.PortNum.PRIVATE_APP: return theme.packet.privateApp;
146+
case Portnums.PortNum.ATAK_FORWARDER: return theme.packet.atakForwarder;
121147
default: return theme.packet.unknown;
122148
}
123149
}

src/ui/theme.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,35 @@ export const theme = {
1818
routing: "#666666",
1919
traceroute: "#ffff00",
2020
encrypted: "#ff0040",
21-
unknown: "#404040",
21+
unknown: "#ff00ff",
2222
direct: "#00ff00",
2323
config: "#8080ff",
24+
// Additional port type colors - cypherpunk neon palette
25+
remoteHardware: "#ff0099", // Hot pink for hardware control
26+
admin: "#ff3300", // Red-orange for admin commands
27+
compressed: "#00ff66", // Bright green for compressed messages
28+
waypoint: "#00ccff", // Cyan for waypoints
29+
audio: "#ff00cc", // Magenta for audio
30+
detectionSensor: "#ffcc00", // Gold for sensors
31+
alert: "#ff0000", // Bright red for alerts
32+
keyVerification: "#00ff00", // Lime for security
33+
reply: "#99ff00", // Yellow-green for replies
34+
ipTunnel: "#0099ff", // Blue for network tunnels
35+
paxcounter: "#ff9933", // Orange for paxcounter
36+
storeForwardPP: "#9900ff", // Purple for S&F++
37+
serial: "#00ffcc", // Turquoise for serial
38+
storeForward: "#cc00ff", // Violet for S&F
39+
rangeTest: "#ffff33", // Yellow for range tests
40+
zps: "#33ff99", // Mint for position estimation
41+
simulator: "#ff3399", // Pink for simulator
42+
neighborinfo: "#ff6600", // Bright orange for neighbors
43+
atakPlugin: "#009933", // Dark green for ATAK
44+
mapReport: "#0066ff", // Blue for map reports
45+
powerstress: "#ff6666", // Light red for power testing
46+
reticulumTunnel: "#6600ff", // Deep purple for reticulum
47+
cayenne: "#ff9900", // Orange for Cayenne
48+
privateApp: "#666666", // Gray for private apps
49+
atakForwarder: "#00cc66", // Sea green for ATAK forwarder
2450
},
2551
// Cypherpunk palette for data differentiation
2652
data: {

0 commit comments

Comments
 (0)