Skip to content

Conversation

AGMASO
Copy link
Collaborator

@AGMASO AGMASO commented Sep 16, 2025

General Changes

  • fixed Horizon banner redirection when navigating from the sGHO page

Developer Notes

  • Could currentMarket change while we’re on the /sGho page? This might be an edge case. I don’t think it’s possible.
    We can’t add currentMarket to the useEffect dependency array because it conflicts with the banner redirection.

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

@AGMASO AGMASO requested review from mgrabina and grothem September 16, 2025 16:26
Copy link

vercel bot commented Sep 16, 2025

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

Project Deployment Preview Comments Updated (UTC)
interface Ready Ready Preview Comment Sep 18, 2025 2:24pm

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1.42 MB (🟡 +13 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Six Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 59.59 KB (🟡 +2 B) 1.48 MB
/markets 33.63 KB (🟡 +3 B) 1.46 MB
/reserve-overview 23.02 KB (🟡 +1 B) 1.45 MB
/safety-module 37.02 KB (🟢 -4 B) 1.46 MB
/sgho 79.05 KB (🟡 +85 B) 1.5 MB
/staking 31.81 KB (-1 B) 1.46 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

console.log('Router path:', router.pathname);
// Automatically switch to mainnet if not already on mainnet when entering the sGHO page
// since sGHO only exists on Ethereum mainnet
// NOTE: Having currentMarket as a dependency in useEffect causes conflicts with the Horizon Banner interaction.
Copy link
Contributor

Choose a reason for hiding this comment

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

what exactly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When we click the link in the banner to go to the Horizon Markets page, the useEffect detects that currentMarket has changed and re-renders the component, preventing us from reaching the desired page. The solution is to remove currentMarket from the useEffect dependency array.


// Automatically switch to mainnet if not already on mainnet
const router = useRouter();
console.log('Router path:', router.pathname);
Copy link
Contributor

Choose a reason for hiding this comment

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

lets remove comment before merge

Copy link

Copy link

📦 Next.js Bundle Analysis for aave-ui

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1.42 MB (🟡 +13 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Six Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 59.59 KB (🟡 +2 B) 1.48 MB
/markets 33.63 KB (🟡 +3 B) 1.46 MB
/reserve-overview 23.02 KB (🟡 +1 B) 1.45 MB
/safety-module 37.02 KB (🟢 -4 B) 1.46 MB
/sgho 79.03 KB (🟡 +68 B) 1.5 MB
/staking 31.81 KB (-1 B) 1.46 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@AGMASO AGMASO requested a review from mgrabina September 18, 2025 16:47
@AGMASO AGMASO requested a review from foodaka September 25, 2025 07: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.

2 participants