Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/mobile/src/features/threads/ThreadFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from "react-native-nitro-markdown";
import {
ActivityIndicator,
Alert,
Image,
Platform,
type LayoutChangeEvent,
Expand Down Expand Up @@ -1403,7 +1404,15 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
path: relativePath.split("/").filter((segment) => segment.length > 0),
...(presentation.line ? { line: String(presentation.line) } : {}),
});
return;
}
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
// The link renders as a file (icon + label) but points outside the
// workspace, so there is nothing on-device to navigate to. Say so
// instead of swallowing the tap.
Alert.alert(
"Can't open this file",
"It lives outside the project folder, so it isn't available here.",
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alert shown after successful navigation

High Severity

Alert.alert runs after the relativePath check with no else, so every in-workspace file tap still navigates and then shows “Can't open this file.” Only unresolved out-of-workspace paths should trigger the alert.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6c835d2. Configure here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in 0d22d6f - the handler returns right after navigation, so only unresolved out-of-workspace paths trigger the alert.

Comment on lines +1412 to +1415

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Return before showing the out-of-workspace alert

For every valid in-workspace file link, the handler navigates to ThreadFile and then falls through to this unconditional alert, so ordinary file taps falsely report that the file is outside the project and leave a modal over the destination. Return after navigation.navigate or place this alert in an else branch.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, real bug. Fixed in 0d22d6f - early return after navigate, alert fires only when the path can't be resolved inside the workspace.

return;
}

Expand Down
Loading