Skip to content

feat: add Bridge LPT menu option#705

Merged
rickstaa merged 2 commits into
mainfrom
feat/bridge-lpt-menu-link
Jun 16, 2026
Merged

feat: add Bridge LPT menu option#705
rickstaa merged 2 commits into
mainfrom
feat/bridge-lpt-menu-link

Conversation

@rickstaa

@rickstaa rickstaa commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds a Bridge LPT option to the navigation menu, giving users an in-app path to move L1 (Ethereum) LPT to Arbitrum One, where staking happens. It sits alongside the existing Get LPT option and mirrors its behaviour:

  • Desktop popover — new-window link to the Arbitrum bridge.
  • Mobile drawer — embedded iframe modal of the Arbitrum bridge.

The bridge URL pre-fills the LPT token and the Ethereum → Arbitrum One route:

https://bridge.arbitrum.io/?destinationChain=arbitrum-one&sourceChain=ethereum&token=0x58b6a8a3302369daec383334672404ee733ab239

bridge.arbitrum.io sets no X-Frame-Options/frame-blocking CSP, so it embeds cleanly (verified locally). Note that portal.arbitrum.io/bridge does block framing — this uses bridge.arbitrum.io.

Cleanup

The shared modal LlamaswapModal now hosts both the DefiLlama swap and the Arbitrum bridge embeds, so it's renamed to a neutral EmbedModal.

Testing

  • Mobile drawer: Bridge LPT opens the embedded bridge with the LPT route pre-filled.
  • Desktop popover: Bridge LPT opens the bridge in a new window.

Closes #704

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added "Bridge LPT" option to the drawer, providing direct access to the Arbitrum bridge
    • Added "Bridge LPT" link to the desktop navigation's More menu for convenient bridge access
  • Refactor

    • Updated modal component implementation for consistency across embedded content

Add a "Bridge LPT" entry to the desktop nav popover (new-window link)
and mobile drawer (embedded bridge.arbitrum.io iframe modal), letting
users bridge LPT from Ethereum to Arbitrum One.

Rename LlamaswapModal -> EmbedModal since it now hosts both the
DefiLlama swap and the Arbitrum bridge embeds.

Closes #704

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rickstaa rickstaa requested a review from ECWireless as a code owner June 16, 2026 15:05
Copilot AI review requested due to automatic review settings June 16, 2026 15:05
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview, Comment Jun 16, 2026 3:59pm

Request Review

Copilot AI 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.

Pull request overview

Adds a Bridge LPT entry to the app’s navigation so users can move L1 (Ethereum) LPT to Arbitrum One (staking network), matching the existing “Get LPT” behavior across desktop (new window link) and mobile (embedded modal).

Changes:

  • Add “Bridge LPT” external link to the desktop “More” popover menu.
  • Rename the shared embed dialog component to EmbedModal.
  • Add “Bridge LPT” embedded iframe modal entry in the mobile drawer.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
layouts/main.tsx Adds a “Bridge LPT” popover item that opens the Arbitrum bridge in a new window.
components/EmbedModal/index.tsx Renames the generic embed dialog component to EmbedModal (default export).
components/Drawer/index.tsx Replaces LlamaswapModal usage with EmbedModal and adds a new “Bridge LPT” embedded bridge modal.
Comments suppressed due to low confidence (1)

components/Drawer/index.tsx:168

  • The modal trigger is rendered as Link styled component with as={Text}, which likely results in a non-interactive element (e.g. span) and makes the dialog inaccessible to keyboard users. Use a real button element (while keeping the same styling) so it is focusable and activates on Enter/Space.
                <A
                  as={Text}
                  css={{
                    cursor: "pointer",
                    fontSize: "$2",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/Drawer/index.tsx
Comment thread components/Drawer/index.tsx
Comment thread components/Drawer/index.tsx
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@rickstaa, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 6 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b83ec3e-1329-4855-922c-e49f6208aff7

📥 Commits

Reviewing files that changed from the base of the PR and between 0ac3ae2 and 7e052e1.

📒 Files selected for processing (3)
  • components/Drawer/index.tsx
  • constants/links.ts
  • layouts/main.tsx
📝 Walkthrough

Walkthrough

The PR renames LlamaswapModal to EmbedModal and adds a "Bridge LPT" entry in two places: a new embedded iframe modal in the mobile drawer pointing at the Arbitrum bridge URL, and a new external PopoverLink in the desktop navigation's "More" popover.

Changes

Bridge LPT Navigation Feature

Layer / File(s) Summary
EmbedModal component rename
components/EmbedModal/index.tsx, components/Drawer/index.tsx
Component function and default export renamed from Index to EmbedModal; Drawer import updated from LlamaswapModal to EmbedModal.
Bridge LPT drawer item and desktop nav link
components/Drawer/index.tsx, layouts/main.tsx
Get LPT drawer entry switched to EmbedModal; new Bridge LPT EmbedModal drawer item added with Arbitrum bridge iframe; new Bridge LPT external PopoverLink added to desktop More popover after the Get LPT link.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add Bridge LPT menu option' directly and concisely describes the main change—adding a new Bridge LPT menu option to the navigation.
Description check ✅ Passed The PR description covers the key changes, testing performed, and technical details, but lacks explicit sections matching the template structure such as Type of Change checkboxes and Impact/Risk assessment.
Linked Issues check ✅ Passed The code changes fully address all requirements from issue #704: Bridge LPT option added to desktop popover and mobile drawer with correct URL, LlamaswapModal renamed to EmbedModal, and EmbedModal used for both embeds.
Out of Scope Changes check ✅ Passed All changes directly support issue #704 objectives: adding the Bridge LPT menu option, refactoring the modal component, and updating the drawer and navigation layout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/bridge-lpt-menu-link

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 and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/Drawer/index.tsx (2)

178-186: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Embedded third-party iframes are missing isolation attributes

Problem: On Line 178 and Line 205, external iframes are embedded without sandbox and without referrerPolicy (and no title).

Why it matters: Unsandboxed third-party content has broader capabilities than needed and increases security/privacy risk if the remote page is compromised or changes behavior.

Suggested fix: Add a restrictive sandbox policy (allow only required capabilities), referrerPolicy="no-referrer" (or project standard), and a descriptive title for each iframe.

Also applies to: 205-213

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/Drawer/index.tsx` around lines 178 - 186, The iframe elements
embedded in this component lack essential security and accessibility attributes.
For each iframe element (including both occurrences in the file), add a
restrictive sandbox attribute that permits only necessary capabilities (such as
sandbox="allow-same-origin allow-scripts"), add referrerPolicy="no-referrer" to
protect user privacy, and add a descriptive title attribute for accessibility.
Apply these attributes to all iframe elements to prevent unsandboxed third-party
content from having broader capabilities than needed and to reduce security and
privacy risks if the remote content is compromised.

162-175: ⚠️ Potential issue | 🟠 Major

Use an interactive element for modal triggers

Problem: Lines 164–175 and 191–201 use <A as={Text}> for DialogTrigger asChild. This likely renders as a non-interactive element that cannot be keyboard-activated, breaking modal access for keyboard users. Other DialogTrigger asChild usages in the codebase (e.g., Search/index.tsx, EditProfile/index.tsx) correctly use Button or IconButton.

Why it matters: Keyboard users and screen reader users cannot open the "Get LPT" and "Bridge LPT" modals—a core accessibility failure.

Suggested fix: Replace <A as={Text}> with <Button> or <A> (without the as={Text} override) so DialogTrigger asChild receives a proper interactive element.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/Drawer/index.tsx` around lines 162 - 175, The EmbedModal and other
DialogTrigger components are using `<A as={Text}>` as their trigger element,
which renders as non-interactive text and blocks keyboard and screen reader
access. Replace the `<A as={Text}>` elements used as triggers for the "Get LPT"
and "Bridge LPT" modals with either `<Button>` or just `<A>` without the
`as={Text}` prop override, so that DialogTrigger asChild receives a proper
interactive element that supports keyboard activation and accessibility.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@layouts/main.tsx`:
- Around line 737-740: Extract the hardcoded Bridge URL that appears in the
PopoverLink component (the URL with
destinationChain=arbitrum-one&sourceChain=ethereum&token=0x58b6a8a3302369daec383334672404ee733ab239)
into a shared constant, such as BRIDGE_LPT_URL, in a common constants or config
module. Then replace the hardcoded URL string in the PopoverLink href attribute
with a reference to this constant. Additionally, locate the same hardcoded URL
in the Drawer component and replace it with the same shared constant reference
to ensure both locations stay in sync.

---

Outside diff comments:
In `@components/Drawer/index.tsx`:
- Around line 178-186: The iframe elements embedded in this component lack
essential security and accessibility attributes. For each iframe element
(including both occurrences in the file), add a restrictive sandbox attribute
that permits only necessary capabilities (such as sandbox="allow-same-origin
allow-scripts"), add referrerPolicy="no-referrer" to protect user privacy, and
add a descriptive title attribute for accessibility. Apply these attributes to
all iframe elements to prevent unsandboxed third-party content from having
broader capabilities than needed and to reduce security and privacy risks if the
remote content is compromised.
- Around line 162-175: The EmbedModal and other DialogTrigger components are
using `<A as={Text}>` as their trigger element, which renders as non-interactive
text and blocks keyboard and screen reader access. Replace the `<A as={Text}>`
elements used as triggers for the "Get LPT" and "Bridge LPT" modals with either
`<Button>` or just `<A>` without the `as={Text}` prop override, so that
DialogTrigger asChild receives a proper interactive element that supports
keyboard activation and accessibility.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b9771bbd-de5e-4786-84fe-a546e0390f55

📥 Commits

Reviewing files that changed from the base of the PR and between 3d7511a and 0ac3ae2.

📒 Files selected for processing (3)
  • components/Drawer/index.tsx
  • components/EmbedModal/index.tsx
  • layouts/main.tsx

Comment thread layouts/main.tsx
- Add title attributes to the Get LPT / Bridge LPT iframes.
- Render modal triggers as real buttons so they are keyboard-focusable.
- Extract the swap/bridge URLs into constants/links.ts to keep the
  desktop and mobile surfaces in sync.
- Use portal.arbitrum.io for the bridge link (the embeddable Arbitrum
  portal; the earlier framing concern was a Cloudflare bot-challenge
  artifact, not the real app's headers).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Copilot <copilot@github.com>
Co-Authored-By: coderabbitai[bot] <coderabbitai[bot]@users.noreply.github.com>
@rickstaa rickstaa merged commit 93e7edd into main Jun 16, 2026
9 checks passed
@rickstaa rickstaa deleted the feat/bridge-lpt-menu-link branch June 16, 2026 16:14
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.

Add a Bridge LPT option to the navigation menu

2 participants