Skip to content

fix(mobile): report markdown link open failures - #5837

Closed
fe-franco wants to merge 1 commit into
pingdotgg:mainfrom
fe-franco:fix/markdown-link-open-failures
Closed

fix(mobile): report markdown link open failures#5837
fe-franco wants to merge 1 commit into
pingdotgg:mainfrom
fe-franco:fix/markdown-link-open-failures

Conversation

@fe-franco

@fe-franco fe-franco commented Aug 9, 2026

Copy link
Copy Markdown

Resolves #5839

What Changed

ThreadFeed.tsx routes all three markdown link presses through
tryOpenExternalUrl with the existing markdown-link target. The now unused
Linking import goes away. Four lines change, and no behavior changes on a
successful tap.

-        void Linking.openURL(props.href);
+        void tryOpenExternalUrl(props.href, "markdown-link");

Why

The three call sites called Linking.openURL directly:

// :274 MarkdownExternalLink, :604 link renderer, :1406 onMarkdownLinkPress
void Linking.openURL(props.href);

Linking.openURL rejects when the device has no handler for the URL. The void
operator discards that rejection, so a failed tap produced no log line.

tryOpenExternalUrl exists for this case and already declares a
markdown-link target. FileMarkdownPreview.tsx uses 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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Verification

  • vp run --filter @t3tools/mobile typecheck passes.
  • vp run --filter @t3tools/mobile test passes, 620 tests in 100 files.
  • vp lint --report-unused-disable-directives reports one pre-existing warning
    in apps/web/src/components/settings/ThemeEditorPanel.tsx, untouched here.
  • vp fmt --check passes.
  • Rebased onto 1a003e383.

Written by Claude Opus 5 in Claude Code.

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>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 067fcf25-8658-429a-b7c1-39f1fc337963

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 9, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 2f8f5cd

This change wraps existing Linking.openURL calls with a helper that adds error handling and structured logging. The core behavior remains unchanged—failures that previously threw are now caught and reported. Low-risk error handling improvement.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge

Copy link
Copy Markdown
Member

Closing as superseded by #5872, which has merged and covers this change on the current architecture. Thanks for the contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: thread markdown links discard openURL failures

2 participants