Skip to content

[Bug]: thread markdown links discard openURL failures #5839

Description

@fe-franco

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Open a thread that holds a markdown link with a scheme the device cannot open.
  2. Tap the link.
  3. Read the app log.

Expected behavior

The app logs ExternalUrlOpenError. tryOpenExternalUrl handles this case, and it already declares a markdown-link target:

// apps/mobile/src/lib/openExternalUrl.ts:36
export async function tryOpenExternalUrl(url: string, target: ExternalUrlTarget): Promise<boolean>

FileMarkdownPreview.tsx calls it on lines 60 and 191:

void tryOpenExternalUrl(href, "markdown-link");

Actual behavior

Nothing opens, and the log stays empty. ThreadFeed.tsx opens markdown links with three direct calls:

// apps/mobile/src/features/threads/ThreadFeed.tsx:274
void Linking.openURL(props.href);
// :604
void Linking.openURL(linkHref);
// :1406
void Linking.openURL(presentation.href);

Linking.openURL rejects when the device has no handler for the URL. The void operator discards that rejection. The two markdown renderers therefore disagree. The file preview reports the failure. The thread feed stays silent.

Impact

Minor bug or occasional failure

Version or commit

main @ 1a003e3

Environment

apps/mobile, both platforms. Android reaches the same code through the fallback in ThreadFeed.tsx:1062.

Logs or stack traces

(no output)

The empty log is the defect. A guarded call site prints this instead:
Failed to open markdown-link URL with the https scheme.

Screenshots, recordings, or supporting files

No response

Workaround

None inside the app. Copy the link text and open it by hand.

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Aug 9, 2026
  2. added a commit that references this issue on Aug 9, 2026
    5d9030a
  3. added a commit that references this issue on Aug 10, 2026
    236cc0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions