feat: align node list context menu to canonical 6-item order#5548
Conversation
🖼️ Preview staleness check — advisoryThis PR modifies UI composables but does not update any
Changed UI files: What to check:
Adding previews checklist:
If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the |
📄 Docs staleness check — advisoryThis PR modifies user-facing UI source files but does not update any page under
Changed source files: What to check:
New page checklist (if adding a new doc page):
If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the
|
22cfaa1 to
bc99a28
Compare
Reorder and expand the node list long-press context menu to match the cross-platform canonical order defined in the Menu Alignment Audit: 1. Add to favorites / Remove from favorites 2. Mute notifications / Unmute (renamed from 'Mute Always') 3. Message (NEW - navigates to DM conversation) 4. Trace Route (NEW - initiates trace route request) 5. Ignore / Remove from ignored 6. Remove - Add onMessage and onTraceRoute callbacks to NodeContextMenu - Add MessageMenuItem and TraceRouteMenuItem composables - Rename mute label from mute_always to mute_notifications - Add getDirectMessageRoute() and traceRoute() to NodeListViewModel - Wire navigateToMessages through NodeListScreen/AdaptiveNodeListScreen - Add trace_route string resource Closes #5544 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The new dependency added to NodeListViewModel was missing from the test constructor call, which would cause a compilation failure in allTests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bc99a28 to
81b4e3a
Compare
Summary
The node list long-press context menu was out of sync with the cross-platform canonical order defined in the Menu Alignment Audit. This PR reorders the menu and adds two new quick-access actions so users can message a node or trace a route without navigating to the detail screen first.
Approach
The
NodeContextMenucomposable is updated to accept two new callbacks (onMessage,onTraceRoute) and reorders its items into the canonical sequence:The ViewModel gains
getDirectMessageRoute(node)(reusing the same PKC-aware logic fromNodeDetailViewModel) andtraceRoute(node)which delegates to the existingNodeRequestActions.requestTraceroute. Navigation for the Message action is threaded throughNodeListScreen->AdaptiveNodeListScreen->backStack.add(ContactsRoute.Messages(key)), matching how the detail screen already handles it.Both new items are disabled for ignored nodes (consistent with the existing Favorite disabled behavior). The context menu remains suppressed entirely for the local node.
Notes
trace_route). Existingmessage,mute_notifications, and icon assets are reused.commonMain-- no platform-specific code.specs/20260520-153449-node-list-context-menu/.Fixes: #5544