Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't trim trailing slashes from safe apps #4348

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Oct 9, 2024

What it solves

Resolves #4347

How this PR fixes it

  • Doesn't remove the trailing slash anymore when fetching manifest.json and when adding custom safe apps

How to test it

  1. Open safe apps from the list
  2. Observe that they should still open
  3. Add a custom safe app with a trailing slash
  4. Observe that it should still open

Screenshots

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@usame-algan usame-algan requested a review from schmanu October 9, 2024 13:17
Copy link

github-actions bot commented Oct 9, 2024

Copy link

github-actions bot commented Oct 9, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

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

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
/apps 48.39 KB (🟢 -11 B) 1009.56 KB
/apps/custom 40.02 KB (🟢 -11 B) 1001.19 KB
/apps/open 53.11 KB (-4 B) 1014.27 KB
/home 58.12 KB (-4 B) 1019.28 KB
/settings/safe-apps 23.92 KB (🟢 -4 B) 985.08 KB
/share/safe-app 9.72 KB (🟢 -6 B) 970.88 KB
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.

Copy link

github-actions bot commented Oct 9, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
74.43% (-0% 🔻)
12882/17307
🔴 Branches 52.85% 3106/5877
🔴 Functions 58.62% 1894/3231
🟡 Lines
76.15% (-0% 🔻)
11706/15372
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / manifest.ts
40.48% (-1.38% 🔻)
4.17% 28.57%
45.95% (-1.42% 🔻)

Test suite run success

1504 tests passing in 204 suites.

Report generated by 🧪jest coverage report action from e77f5d2

@usame-algan
Copy link
Member Author

We should decide what the expected behaviour is if a custom safe app without a trailing slash is added.

@francovenica
Copy link
Contributor

LGTM

@katspaugh
Copy link
Member

We keep adding this trimming and removing it. It fixes one thing and breaks another.
@usame-algan can you please find or write documentation on where the URL must be trimmed and where not?

@katspaugh katspaugh marked this pull request as draft November 18, 2024 06:58
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.

Custom safe apps don't load unless they contain a trailing slash
4 participants