Skip to content

fix(mobile): stop silently swallowing taps on out-of-workspace file links - #7859

Open
Exotic209093 wants to merge 1 commit into
pingdotgg:mainfrom
Exotic209093:fix/mobile-out-of-workspace-file-links
Open

fix(mobile): stop silently swallowing taps on out-of-workspace file links#7859
Exotic209093 wants to merge 1 commit into
pingdotgg:mainfrom
Exotic209093:fix/mobile-out-of-workspace-file-links

Conversation

@Exotic209093

@Exotic209093 Exotic209093 commented Aug 22, 2026

Copy link
Copy Markdown

Markdown file links that point outside the current workspace (e.g. \ ile:///C:/temp/preview.png) render on mobile as tappable file links with an icon, but tapping did nothing — no navigation, no feedback.

The tap handler in ThreadFeed already resolved the path against the workspace root and navigated when it matched; it just returned silently otherwise. Now, when the destination can't be resolved inside the workspace, the handler shows an alert explaining the file lives outside the project folder and isn't available on-device. Both tap paths (the custom markdown link renderer and the native markdown text rows) go through this same handler, so one change covers them all. I considered wiring up a real preview via the server's project-scoped readFile RPC or making the renderer drop the tappable styling for unresolvable paths, but both need new machinery (server contract changes or threading workspaceRoot into pure render helpers) for little gain.

Fixes #7798

ox-alpha via opencode


Note

Medium Risk
Interrupt now synthesizes user-input.resolved activities, which can hide still-open prompts if request tracking is wrong. The mobile alert also runs after successful in-workspace navigation because it is not gated on a missing relative path.

Overview
Turn interrupt now cancels open user-input requests. After interruptTurn succeeds, ProviderCommandReactor walks thread activities for unresolved user-input.requested items (skipping already resolved or stale-failed ones) and appends user-input.resolved with cancelled: true. That covers providers that drop callbacks without a matching resolution event. Tests seed a pending request and assert the cancelled activity.

Mobile markdown file links that cannot be resolved inside the workspace now show an Alert instead of a silent tap. Bug: the alert is not in an else of the relativePath check, so in-workspace file navigation would still pop “Can't open this file.”

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

Note

Fix silent tap handling on out-of-workspace file links in ThreadFeed

  • Adds an Alert.alert call in the markdown link press handler in ThreadFeed.tsx when a file-styled link resolves outside the workspace, so the user gets feedback instead of a silent no-op.
  • Adds an early return after navigating to an in-workspace file to prevent the handler from continuing to process the link.
  • Risk: standard href links are unaffected, but any existing reliance on the handler running to completion after a file navigation will now stop early.

Macroscope summarized 0d22d6f.

@coderabbitai

coderabbitai Bot commented Aug 22, 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: 45b66bbb-d078-427f-b510-7e7ec5ed80f9

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:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026
Comment thread apps/mobile/src/features/threads/ThreadFeed.tsx
yield* providerService.interruptTurn({ threadId: event.payload.threadId });
// Some providers discard their callbacks without emitting a matching
// resolution event. Close those requests after the interrupt succeeds.
yield* Effect.forEach(pendingUserInputRequests(thread.activities), ({ requestId, turnId }) =>

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.

🟡 Medium Layers/ProviderCommandReactor.ts:1267

Interrupting a thread with a pending user-input request appends a duplicate user-input.resolved activity when the adapter already resolves that request during interruptTurn. The scan uses the pre-interruption thread.activities snapshot, so it cannot observe the adapter's resolution; re-read the thread after interruption before scanning pending requests.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/orchestration/Layers/ProviderCommandReactor.ts around line 1267:

Interrupting a thread with a pending user-input request appends a duplicate `user-input.resolved` activity when the adapter already resolves that request during `interruptTurn`. The scan uses the pre-interruption `thread.activities` snapshot, so it cannot observe the adapter's resolution; re-read the thread after interruption before scanning pending requests.

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c835d25e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1411 to +1414
Alert.alert(
"Can't open this file",
"It lives outside the project folder, so it isn't available here.",
);

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.

threadId: event.payload.threadId,
requestId,
turnId,
createdAt: event.payload.createdAt,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Timestamp cancellations after the pending request

When an interrupt comes from a remote client whose clock is behind the server, reusing the client-generated event.payload.createdAt can place this cancellation before the provider-generated user-input.requested activity. All pending-input derivations sort by createdAt before applying lifecycle events, so the later-sorted request remains pending after the turn was stopped; stamp the synthetic resolution on the server or otherwise guarantee it orders after the request. This affects the remote and multi-device connection modes explicitly supported by the repository.

AGENTS.md reference: AGENTS.md:L19-L21

Useful? React with 👍 / 👎.

@macroscopeapp

macroscopeapp Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — Straightforward mobile bug fix that shows an alert when tapping out-of-workspace file links instead of silently ignoring the tap. The initially-identified fall-through issue was fixed in the final commit with an early return after navigation.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@Exotic209093
Exotic209093 force-pushed the fix/mobile-out-of-workspace-file-links branch from 6c835d2 to 8d09bda Compare August 22, 2026 01:38
@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 22, 2026
@Exotic209093
Exotic209093 force-pushed the fix/mobile-out-of-workspace-file-links branch from 8d09bda to 0d22d6f Compare August 22, 2026 02:40
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]: Mobile file links outside the workspace silently do nothing

1 participant