Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1d32af8 to
e5fc7fd
Compare
e5fc7fd to
3440e29
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates the Bridge “Transaction History” view from a legacy ?tab=tx_history query-param selection to a dedicated /bridge/tx-history pathname, and updates navigation/redirect behavior accordingly.
Changes:
- Adds
/bridge/tx-historyto shared path constants and updates links to use the new pathname. - Updates bridge UI routing logic to detect tx-history via pathname (instead of
tabquery param) and navigates to the new route after transfers. - Updates app shell subnav active-item logic + navigation config, adds middleware redirect for legacy
tab=tx_history, and introduces a new tx-history page route.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/arb-token-bridge-ui/src/constants.ts | Adds PathnameEnum.TX_HISTORY for canonical tx-history routing. |
| packages/arb-token-bridge-ui/src/components/Widget/WidgetTransactionHistory.tsx | Updates external “See full transaction history” link to use the new pathname. |
| packages/arb-token-bridge-ui/src/components/TransferPanel/TransferPanel.tsx | Navigates to /bridge/tx-history after transfers and adjusts query-param clearing. |
| packages/arb-token-bridge-ui/src/components/MainContent/MainContent.tsx | Switches tx-history detection from query param to pathname. |
| packages/app/src/middleware.ts | Redirects legacy tab=tx_history to /bridge/tx-history while preserving other params. |
| packages/app/src/components/AppShell/utils/getIsActiveSubNavItem.ts | Updates active subnav detection to be pathname-based for bridge subroutes. |
| packages/app/src/components/AppShell/utils/getIsActiveSubNavItem.test.ts | Adds tests for pathname-based active subnav detection. |
| packages/app/src/components/AppShell/config/navConfig.tsx | Updates Txns subnav href to /bridge/tx-history. |
| packages/app/src/components/AppShell/components/SubNav.tsx | Adjusts getIsActiveSubNavItem call signature after removing search-param dependency. |
| packages/app/src/app/(with-sidebar)/bridge/tx-history/page.tsx | Adds the /bridge/tx-history route page wrapper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -196,12 +198,12 @@ export function TransferPanel() { | |||
| const { handleError } = useError(); | |||
|
|
|||
| const resetAmountAndSwitchToTransactionHistoryTab = useCallback(() => { | |||
| // Determine which content to show based on route and query params | ||
| const isBuyPage = showBuyPanel && isBridgeBuyOrSubpages(pathname); | ||
| const isTxHistory = searchParams.get('tab') === TabParamEnum.TX_HISTORY; | ||
| const isTxHistory = pathname === PathnameEnum.TX_HISTORY; |
|
|
||
| export { generateMetadata }; | ||
|
|
||
| export default async function BridgeBuyPage({ searchParams }: Props) { |
| return NextResponse.redirect(url, 308); | ||
| } | ||
|
|
||
| // Redirect /?tab=tx_history to /bridge/tx-history and keep query params (without tab) |
chrstph-dvx
reviewed
Apr 21, 2026
|
|
||
| export { generateMetadata }; | ||
|
|
||
| export default async function BridgeBuyPage({ searchParams }: Props) { |
Contributor
There was a problem hiding this comment.
does this need to be async?
Member
Author
There was a problem hiding this comment.
ah this was a leftover from my WIP months ago. updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.