OSM notes: autolink comment URLs in dismissible web panel#14
Conversation
Detect URLs in note history text and present them in a dismissible sheet web view instead of leaving links non-interactive. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5825743. Configure here.
| } | ||
| PanelWebViewController.present(url: url, from: self) | ||
| return false | ||
| } |
There was a problem hiding this comment.
All link interactions open panel, including long-press
Low Severity
The textView(_:shouldInteractWith:in:interaction:) delegate method presents the PanelWebViewController for all UITextItemInteraction types without checking the interaction parameter. This means a long-press (.presentActions) — which normally shows a context menu with "Copy Link", "Share", etc. — instead immediately opens the web panel. Users lose the ability to copy a URL from a note comment without fully loading the page.
Reviewed by Cursor Bugbot for commit 5825743. Configure here.


Problem
Go Map!! can display OpenStreetMap notes from the OSM Notes API. Note comments often contain plain-text URLs—for example links to StreetComplete photos or other mapping resources—but today those strings are shown as non-interactive text in the note history.
As a mapper, when I read an OSM note that includes a link, I want to tap the URL and view the page inside the app in a panel I can open and dismiss quickly, so I can check referenced photos or documentation without leaving the note context or switching to Safari for every link.
Implementation notes (by Cursor)
cursor/osm-notes-autolink-webview-panelNotesTableViewController.swiftUITextViewcells usedataDetectorTypes = [.link]sohttp/httpsURLs in comment text are detected and styled as tappable links (autolinker viaNSDataDetector).textView(_:shouldInteractWith:in:interaction:)intercepts link taps on history comments only and opens the URL in a panel instead of the system browser.PanelWebViewController.swift(new)WKWebViewpresented as.pageSheet.setUserAgent()on the initial request.SFSafariViewController; new-comment text field behavior is unchanged.Testing notes (@tordans)
https://…(e.g. a StreetComplete image URL). The URL should appear as a link-colored, tappable string in the comment bubble.Made with Cursor
Note
Low Risk
Localized notes UI change; WKWebView loads user-supplied http/https URLs from comments with no change to auth or OSM upload flows.
Overview
OSM note history comments now treat
http/httpsstrings as tappable links and open them in a new in-app sheet instead of leaving them as plain text or using the system browser by default.NotesTableViewControllerconfigures historyUITextViewcells with link detection and styling, and only intercepts link taps on those rows to presentPanelWebViewController. Username taps still useSFSafariViewController; the new-comment field is unchanged.PanelWebViewControlleris a programmaticWKWebViewin a.pageSheet(medium/large detents and grabber on iOS 15+), with Done to dismiss and Safari to open the current page externally, using the app’s existing user agent on the initial load. The Xcode project registers the new source file.Reviewed by Cursor Bugbot for commit 5825743. Bugbot is set up for automated code reviews on this repo. Configure here.