fix: correct redirection causing intermediate 404#7400
Open
skmayya1 wants to merge 3 commits intoSigNoz:mainfrom
Open
fix: correct redirection causing intermediate 404#7400skmayya1 wants to merge 3 commits intoSigNoz:mainfrom
skmayya1 wants to merge 3 commits intoSigNoz:mainfrom
Conversation
|
Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗 |
Contributor
There was a problem hiding this comment.
❌ Changes requested. Reviewed everything up to e08fac3 in 2 minutes and 4 seconds
More details
- Looked at
23lines of code in1files - Skipped
0files when reviewing. - Skipped posting
3drafted comments based on config settings.
1. frontend/src/AppRoutes/index.tsx:63
- Draft comment:
The condition for 'shouldShowNotFound' is inverted. Currently it uses 'isFetchingUser || isFetchingLicenses || isFetchingFeatureFlags', which is true while data is still loading. This will cause the NotFound route to render during the async fetches (leading to an intermediate 404). It should instead check that all fetches are complete, e.g. '!isFetchingUser && !isFetchingLicenses && !isFetchingFeatureFlags'. - Reason this comment was not posted:
Marked as duplicate.
2. frontend/src/AppRoutes/index.tsx:316
- Draft comment:
The NotFound route is conditionally rendered based on 'shouldShowNotFound'. Due to the inverted logic, it may render prematurely. Once the condition is corrected, the NotFound route should only be available when fetches are complete and no route matches. - Reason this comment was not posted:
Marked as duplicate.
3. frontend/src/AppRoutes/index.tsx:274
- Draft comment:
Typographical errors in the comments: 'calls fails' should be 'calls fail' and 'indefinitive loading' should be 'indefinite loading'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_ddUO0hlKwSrkbl6b
Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.
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.
Summary
Intermediate 404 page on visiting deployment URL
Added state canShowNotFound .This state update enables the display of a "Not Found" page () when necessary.
Related Issues / PR's
#7384
Screenshots
Affected Areas and Manually Tested Areas
Important
Fixes intermediate 404 error by checking async fetching states before rendering NotFound component in
index.tsx.isFetchingUser,isFetchingLicenses, andisFetchingFeatureFlagsinApp()inindex.tsx.shouldShowNotFoundcondition to determine ifNotFoundcomponent should be rendered.<Route path="*" component={NotFound} />to render only ifshouldShowNotFoundis true inindex.tsx.This description was created by
for e08fac3. It will automatically update as commits are pushed.