Skip to content

feat: align node list context menu to canonical 6-item order#5548

Merged
jamesarich merged 2 commits into
mainfrom
jamesarich/issue-5544-alignment-align-node-list-long-press-co-1d63b1
May 20, 2026
Merged

feat: align node list context menu to canonical 6-item order#5548
jamesarich merged 2 commits into
mainfrom
jamesarich/issue-5544-alignment-align-node-list-long-press-co-1d63b1

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

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 NodeContextMenu composable is updated to accept two new callbacks (onMessage, onTraceRoute) and reorders its items into the canonical sequence:

  1. Add to favorites / Remove from favorites -- unchanged
  2. Mute notifications / Unmute -- label renamed from "Mute Always"
  3. Message (NEW) -- navigates to the DM conversation
  4. Trace Route (NEW) -- initiates a traceroute request
  5. Ignore / Remove from ignored -- moved to position 5
  6. Remove -- stays last

The ViewModel gains getDirectMessageRoute(node) (reusing the same PKC-aware logic from NodeDetailViewModel) and traceRoute(node) which delegates to the existing NodeRequestActions.requestTraceroute. Navigation for the Message action is threaded through NodeListScreen -> 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

  • Only 1 new string resource added (trace_route). Existing message, mute_notifications, and icon assets are reused.
  • All changes are in commonMain -- no platform-specific code.
  • Includes speckit design artifacts in specs/20260520-153449-node-list-context-menu/.

Fixes: #5544

@github-actions github-actions Bot added the enhancement New feature or request label May 20, 2026
@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

🖼️ Preview staleness check — advisory

This PR modifies UI composables but does not update any *Previews.kt files.

Previews power screenshot tests and in-app docs screenshots. Keeping them current ensures visual regression coverage stays accurate.

Changed UI files:

feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeContextMenu.kt

What to check:

Pattern Preview file convention
feature/{name}/…/ui/ or component/ feature/{name}/…/*Previews.kt
core/ui/…/ core/ui/…/ (previews colocated)

Adding previews checklist:

  1. Create or update a *Previews.kt file in the same module with @PreviewLightDark
  2. Add @Suppress("PreviewPublic") if the preview is consumed by screenshot-tests
  3. Add corresponding @PreviewTest function in screenshot-tests/src/screenshotTest/
  4. Run ./gradlew :screenshot-tests:updateDebugScreenshotTest to generate reference images

If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the skip-preview-check label to dismiss.

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

📄 Docs staleness check — advisory

This PR modifies user-facing UI source files but does not update any page under docs/en/user/ or docs/en/developer/.

⚠️ Doc changes propagate to 3 consumers: in-app docs browser, Jekyll site (GitHub Pages), and meshtastic.org (Docusaurus sync). Updating a page in docs/en/ automatically flows to all three.

Changed source files:

feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/component/NodeContextMenu.kt

What to check:

Changed area Likely doc page
feature/messaging/ docs/en/user/messages-and-channels.md
feature/node/ docs/en/user/nodes.md or docs/en/user/node-metrics.md
feature/map/ docs/en/user/map-and-waypoints.md
feature/connections/ docs/en/user/connections.md
feature/settings/ docs/en/user/settings-radio-user.md or docs/en/user/settings-module-admin.md
feature/firmware/ docs/en/user/firmware.md
feature/intro/ docs/en/user/onboarding.md
feature/discovery/ docs/en/user/discovery.md
feature/docs/ Internal docs infrastructure
core/ui/ docs/en/developer/codebase.md or component-specific user pages

New page checklist (if adding a new doc page):

  1. Create the .md file in docs/en/user/ or docs/en/developer/ with last_updated frontmatter
  2. Register in DocBundleLoader.kt with string resources (in-app browser)
  3. Jekyll and Docusaurus sync pick up new pages automatically — no config change needed

If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the skip-docs-check label to dismiss this check.

Cross-platform note: This check is advisory while doc coverage matures. Both Android and Apple repos use the same skip-docs-check label and advisory severity. See meshtastic/design standards for shared conventions.

@jamesarich jamesarich force-pushed the jamesarich/issue-5544-alignment-align-node-list-long-press-co-1d63b1 branch from 22cfaa1 to bc99a28 Compare May 20, 2026 21:34
@jamesarich jamesarich added this pull request to the merge queue May 20, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch May 20, 2026
jamesarich and others added 2 commits May 20, 2026 17:01
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>
@jamesarich jamesarich force-pushed the jamesarich/issue-5544-alignment-align-node-list-long-press-co-1d63b1 branch from bc99a28 to 81b4e3a Compare May 20, 2026 22:02
@jamesarich jamesarich added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 9d5e20c May 20, 2026
16 checks passed
@jamesarich jamesarich deleted the jamesarich/issue-5544-alignment-align-node-list-long-press-co-1d63b1 branch May 20, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ALIGNMENT] Align node list long-press context menu to canonical order

1 participant