Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit a6f0452

Browse files
staticoclaude
andcommitted
Add colored ACK notifications
Show "✓ ACK from NodeName" in bright green when receiving ACKs from other nodes. Notifications now support custom colors. Self-to-self ACKs are filtered out. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent dea311f commit a6f0452

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

src/ui/App.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export function App({ address, packetStore, nodeStore, skipConfig = false, skipN
180180
const [showEmojiSelector, setShowEmojiSelector] = useState(false);
181181
const [emojiSelectorIndex, setEmojiSelectorIndex] = useState(0);
182182
const [channels, setChannels] = useState<Map<number, ChannelInfo>>(new Map());
183-
const [notification, setNotification] = useState("");
183+
const [notification, setNotification] = useState<{ message: string; color?: string } | null>(null);
184184

185185
// DM state
186186
const [dmConversations, setDmConversations] = useState<db.DMConversation[]>([]);
@@ -445,6 +445,11 @@ export function App({ address, packetStore, nodeStore, skipConfig = false, skipN
445445
m.packetId === packet.requestId ? { ...m, status: newStatus } : m
446446
)
447447
);
448+
// Show ACK notification (but not for self-to-self)
449+
if (isAck && mp.from !== myNodeNum) {
450+
const nodeName = nodeStore.getNodeName(mp.from);
451+
showNotification(`✓ ACK from ${nodeName}`, theme.packet.direct);
452+
}
448453
}
449454
}
450455

@@ -639,9 +644,9 @@ export function App({ address, packetStore, nodeStore, skipConfig = false, skipN
639644
}
640645
}, [transport]);
641646

642-
const showNotification = useCallback((msg: string) => {
643-
setNotification(msg);
644-
setTimeout(() => setNotification(""), 2000);
647+
const showNotification = useCallback((msg: string, color?: string) => {
648+
setNotification({ message: msg, color });
649+
setTimeout(() => setNotification(null), 2000);
645650
}, []);
646651

647652
const sendMessage = useCallback(async (text: string) => {
@@ -2667,8 +2672,8 @@ export function App({ address, packetStore, nodeStore, skipConfig = false, skipN
26672672
<Text color={theme.fg.muted}> | </Text>
26682673
<Text color={theme.fg.secondary}>{nodeCount} nodes</Text>
26692674
<Text color={theme.fg.muted}> | </Text>
2670-
<Text color={notification ? theme.fg.accent : theme.fg.muted}>
2671-
{notification || helpHint}
2675+
<Text color={notification ? (notification.color || theme.fg.accent) : theme.fg.muted}>
2676+
{notification?.message || helpHint}
26722677
</Text>
26732678
</Box>
26742679

0 commit comments

Comments
 (0)