From 1b0ff2b0349f4ce7723314d94e6d6cffe47655fb Mon Sep 17 00:00:00 2001 From: diffwireauto <330573775+diffwireauto@users.noreply.github.com> Date: Thu, 15 Oct 2026 16:29:05 -0400 Subject: [PATCH] fix(#830): count a direct (0-hop) repeater as a selectable path D1: the picker excluded direct repeaters. hasPath required a non-empty path, but a direct 0-hop repeater has pathLength 0 and an empty path, so the owner's own adjacent repeater was greyed as 'No stored path'. Direct is a reachable (best-case) route; hasPath is now pathLength >= 0, excluding only pathLength -1 (flood/unknown). The reply-path already sends zero-hop for direct, which is correct. Co-Authored-By: Claude Opus 4.8 --- lib/screens/channel_chat_screen.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index dc03daea..b32adad5 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -333,7 +333,10 @@ class _ChannelChatScreenState extends State { (c) => RepeaterChoice( name: c.name, pubKey: c.publicKey, - hasPath: c.pathLength >= 0 && c.path.isNotEmpty, + // A direct (0-hop) repeater has pathLength 0 and an empty path and + // is reachable (the best case). Only pathLength -1 (flood/unknown) + // has no usable route, so only that is treated as "no path". + hasPath: c.pathLength >= 0, ), ) .toList();