Skip to content

feat: use tx history pathname#83

Open
fionnachan wants to merge 6 commits intomasterfrom
tx-history-tab
Open

feat: use tx history pathname#83
fionnachan wants to merge 6 commits intomasterfrom
tx-history-tab

Conversation

@fionnachan
Copy link
Copy Markdown
Member

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 8, 2025

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

Project Deployment Actions Updated (UTC)
arbitrum-portal Ready Ready Preview Apr 22, 2026 5:36pm

Request Review

@fionnachan fionnachan marked this pull request as ready for review April 21, 2026 18:37
Copilot AI review requested due to automatic review settings April 21, 2026 18:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-history to shared path constants and updates links to use the new pathname.
  • Updates bridge UI routing logic to detect tx-history via pathname (instead of tab query 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) {
Comment thread packages/app/src/middleware.ts Outdated
return NextResponse.redirect(url, 308);
}

// Redirect /?tab=tx_history to /bridge/tx-history and keep query params (without tab)

export { generateMetadata };

export default async function BridgeBuyPage({ searchParams }: Props) {
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.

does this need to be async?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ah this was a leftover from my WIP months ago. updated.

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.

3 participants