fix(messages): prevent preview links from intercepting navigation - #2221
fix(messages): prevent preview links from intercepting navigation#2221RCGV1 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughMessage previews now use a shared ChangesMessage preview rendering
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Meshtastic/Views/Messages/MessagePreviewText.swift (1)
1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the required file header.
MessagePreviewText.swiftstarts directly withimport SwiftUI; add// MARK: MessagePreviewTextor a file-level copyright comment before the import.As per coding guidelines: add
// MARK: FileNameor a file-level copyright comment at the top ofMeshtastic/**/*.swiftfiles.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Meshtastic/Views/Messages/MessagePreviewText.swift` at line 1, Add the required file-level header at the top of MessagePreviewText.swift, before the SwiftUI import, using either the // MARK: MessagePreviewText marker or the project’s standard copyright comment.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Meshtastic/Views/Messages/MessagePreviewText.swift`:
- Around line 15-30: Update the preview/markdown formatting section in
docs/user/messages.md to state that message previews preserve markdown
formatting but disable link interaction, while opened message bubbles keep links
clickable. Keep the existing “Link Appearance” documentation focused on opened
message bubbles.
---
Nitpick comments:
In `@Meshtastic/Views/Messages/MessagePreviewText.swift`:
- Line 1: Add the required file-level header at the top of
MessagePreviewText.swift, before the SwiftUI import, using either the // MARK:
MessagePreviewText marker or the project’s standard copyright comment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bfd9fe29-d7aa-4997-9c92-d4b3a38f274c
📒 Files selected for processing (4)
Meshtastic/Views/Messages/ChannelList.swiftMeshtastic/Views/Messages/MessagePreviewText.swiftMeshtastic/Views/Messages/UserList.swiftMeshtasticTests/MessagePreviewTextTests.swift
|
Thanks! |
Summary
Why
Conversation rows are already
NavigationLinks. Parsing the latest message as an interactive Markdown link created a nested action, so tapping a URL preview opened the web view instead of the conversation.This keeps links interactive inside an opened conversation while reserving all taps in conversation-list previews for row navigation.
Closes #2217
Validation
MeshtasticTests/MessagePreviewTextTests: 2 passedMeshtasticTests/NavigationStateTests: 6 passedhttps://meshtastic.org/docs; tapping the URL preview opened the channel and did not open a web viewSummary by CodeRabbit