Skip to content

[Bug]: Mobile file links outside the workspace silently do nothing #7798

Description

@Adamulek123

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. Create or reference an image outside the current project workspace, such as a generated image in a temporary/output directory.
  2. Include it in an assistant message as a Markdown file link, for example [preview.png](file:///C:/temp/preview.png).
  3. Observe that mobile renders the destination as a tappable file link with an image icon.
  4. Tap the link.

Expected behavior

The image opens in a preview or download surface. If files outside the workspace are intentionally unsupported, the link should not appear actionable or tapping it should explain why it cannot be opened.

Actual behavior

Tapping the rendered file link does nothing. There is no navigation, haptic feedback, fallback, or error message.

The silent path appears to be in apps/mobile/src/features/threads/ThreadFeed.tsx:

const relativePath = resolveWorkspaceRelativeFilePath(
  props.workspaceRoot,
  presentation.path,
);
if (relativePath) {
  // navigate to ThreadFile
}
return;

resolveWorkspaceRelativeFilePath correctly returns null for an absolute path outside the workspace, but the caller then returns silently. Meanwhile, resolveMarkdownLinkPresentation has already classified the destination as a file and rendered it as actionable UI.

This is especially confusing for generated images or other downloadable artifacts that are saved outside the current project but linked in an assistant response.

Impact

Confusing broken interaction; users cannot preview or download linked generated files from mobile and receive no indication why.

Version or commit

main @ 8557150

Environment

T3 Code mobile on Android. The same code path may affect iOS.

Logs or stack traces

No error is shown or logged in the UI; the handler exits before navigation.

Workaround

Save the image inside the current workspace and link it using a workspace-relative path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions