fix(mobile): report markdown link open failures - #5837
Conversation
ThreadFeed opened markdown links with three direct Linking.openURL calls. That promise rejects when the device has no handler for the URL, and the void operator discarded the rejection. The tap did nothing and the app logged nothing. Route all three call sites through tryOpenExternalUrl with the existing markdown-link target, so the thread feed matches FileMarkdownPreview and logs ExternalUrlOpenError. Resolves pingdotgg#5834 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
ApprovabilityVerdict: Approved 2f8f5cd This change wraps existing You can customize Macroscope's approvability policy. Learn more. |
|
Closing as superseded by #5872, which has merged and covers this change on the current architecture. Thanks for the contribution. |
Resolves #5839
What Changed
ThreadFeed.tsxroutes all three markdown link presses throughtryOpenExternalUrlwith the existingmarkdown-linktarget. The now unusedLinkingimport goes away. Four lines change, and no behavior changes on asuccessful tap.
Why
The three call sites called
Linking.openURLdirectly:Linking.openURLrejects when the device has no handler for the URL. Thevoidoperator discards that rejection, so a failed tap produced no log line.
tryOpenExternalUrlexists for this case and already declares amarkdown-linktarget.FileMarkdownPreview.tsxuses it on lines 60 and 191.The thread feed was the only markdown renderer that stayed silent, so this
makes the two agree.
UI Changes
None. The change only adds error reporting on the failure path.
Checklist
Verification
vp run --filter @t3tools/mobile typecheckpasses.vp run --filter @t3tools/mobile testpasses, 620 tests in 100 files.vp lint --report-unused-disable-directivesreports one pre-existing warningin
apps/web/src/components/settings/ThemeEditorPanel.tsx, untouched here.vp fmt --checkpasses.1a003e383.Written by Claude Opus 5 in Claude Code.