Skip to content

Add button to open PR link on mobile#7879

Merged
AmethystLiang merged 1 commit into
mainfrom
add-way-to-open-pr-link-on-mobile
Jul 9, 2026
Merged

Add button to open PR link on mobile#7879
AmethystLiang merged 1 commit into
mainfrom
add-way-to-open-pr-link-on-mobile

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Adds an external link button (ExternalLink icon) in the MobilePrViewPanel header, allowing users to open the current pull request's web URL in their mobile browser.

Screenshots

Adds an ExternalLink button to the right of the 'Pull Request' title in the mobile PR view header.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI Review Report

Reviewed the mobile-specific UI additions. The review verified layout behavior on mobile and confirmed proper React Native accessibility props (accessibilityRole="link" and descriptive accessibilityLabel incorporating the PR number when available). Touch target enhancement is handled via hitSlop of 8. Desktop/Electron cross-platform compatibility checks are not applicable since this change is strictly within the mobile package.

Security Audit

Reviewed the use of openMobilePrUrl for opening external browser links. URL handling safely handles deep links to standard pull request hosts. No secrets, command execution, or sensitive IPC channels are touched.

Notes

None.

Introduce an external link action in the header of the Mobile PR View
Panel. This provides a persistent and easily accessible shortcut to open the
current pull request's canonical URL in the system browser.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6a34ffdb-84de-4d36-96d6-98b3fa5a411b

📥 Commits

Reviewing files that changed from the base of the PR and between 7e1a777 and 0efbacb.

📒 Files selected for processing (2)
  • mobile/src/components/pr-sidebar/MobilePrViewPanel.tsx
  • mobile/src/components/pr-sidebar/PRSidebarHeader.tsx

📝 Walkthrough

Walkthrough

MobilePrViewPanel now includes an "open pull request on the web" control in both its embedded and full-screen headers. It imports ExternalLink and ChevronLeft icons plus an openMobilePrUrl helper, derives the PR URL and number when the sidebar state is ready, and conditionally renders a Pressable that opens the PR URL via the helper. Additionally, explanatory comments in PRSidebarHeader were updated to clarify that the existing badge/#number external-link control opens the PR using pr.url in the phone browser. No exported or public API declarations were altered.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly describes the main mobile PR link button change.
Description check ✅ Passed The description follows the template and covers summary, testing, AI review, security, and notes, though the screenshots section is not explicit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@AmethystLiang AmethystLiang merged commit 7f3e851 into main Jul 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant