Skip to content

Conversation

@jingjing2222
Copy link
Contributor

@jingjing2222 jingjing2222 commented Sep 10, 2025

Summary

  • Add validation to return '_404' route when initialScheme doesn't start with the expected prefix

Changes

  • Modified useInitialRouteName hook to validate initialScheme against prefix before processing
  • Returns '_404' route for mismatched schemes instead of proceeding with invalid pathname extraction

Why

  • Prevents unexpected routing behavior when deep link schemes don't match the app's expected prefix
  • Provides better error handling and debugging information for invalid deep link scenarios

@changeset-bot
Copy link

changeset-bot bot commented Sep 10, 2025

🦋 Changeset detected

Latest commit: f5bd231

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@granite-js/react-native Patch
babel-preset-granite Patch
create-granite-app Patch
@granite-js/cli Patch
@granite-js/devtools-frontend Patch
@granite-js/image Patch
@granite-js/jest Patch
@granite-js/lottie Patch
@granite-js/mpack Patch
@granite-js/native Patch
@granite-js/plugin-core Patch
@granite-js/plugin-env Patch
@granite-js/plugin-hermes Patch
@granite-js/plugin-micro-frontend Patch
@granite-js/plugin-router Patch
@granite-js/plugin-sentry Patch
@granite-js/style-utils Patch
@granite-js/utils Patch
@granite-js/deployment-manager Patch
@granite-js/forge-cli Patch
@granite-js/pulumi-aws Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 10, 2025

@jingjing2222 is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.42%. Comparing base (d9b7d7c) to head (f5bd231).

Files with missing lines Patch % Lines
...ct-native/src/router/hooks/useInitialRouteName.tsx 0.00% 3 Missing ⚠️

❌ Your project check has failed because the head coverage (6.42%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##            main    #119      +/-   ##
========================================
- Coverage   6.42%   6.42%   -0.01%     
========================================
  Files        468     468              
  Lines      21521   21524       +3     
  Branches     734     734              
========================================
  Hits        1383    1383              
- Misses     19788   19791       +3     
  Partials     350     350              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jingjing2222 jingjing2222 changed the title Fix initial route length fix: return _404 when initialScheme doesn't match prefix Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant