Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Closedfe-franco(GitHub profile, opens in a new tab) opened this issue 0 comments

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 @ 1a003e383

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.

  1. fe-franco(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. juliusmarminge closed this

Sign in to join this conversation.