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: correct redirection causing intermediate 404 #7400

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

skmayya1
Copy link

@skmayya1 skmayya1 commented Mar 21, 2025

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.

  • Behavior:
    • Fixes intermediate 404 error by checking isFetchingUser, isFetchingLicenses, and isFetchingFeatureFlags in App() in index.tsx.
    • Adds shouldShowNotFound condition to determine if NotFound component should be rendered.
  • Routing:
    • Updates <Route path="*" component={NotFound} /> to render only if shouldShowNotFound is true in index.tsx.

This description was created by Ellipsis for e08fac3. It will automatically update as commits are pushed.

@skmayya1 skmayya1 requested a review from YounixM as a code owner March 21, 2025 21:09
Copy link

welcome bot commented Mar 21, 2025

Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to e08fac3 in 2 minutes and 4 seconds

More details
  • Looked at 23 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted 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.

@skmayya1 skmayya1 closed this Mar 21, 2025
@skmayya1 skmayya1 deleted the fix-7384 branch March 21, 2025 21:31
@skmayya1 skmayya1 restored the fix-7384 branch March 21, 2025 21:46
@skmayya1 skmayya1 reopened this Mar 21, 2025
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