Skip to content

Conversation

@harshneyy
Copy link

This PR fixes issue #5224.

Problem

On a fresh login, refreshing the page after navigating to a new tab (like "Environments") results in a blank screen. This is caused by the projectID not being persisted to localStorage because the utility function incorrectly treats an empty string as a falsy value.

Solution

I have updated the setUserDetails function in userDetails.ts to explicitly check for null or undefined. This ensures that a projectID (even if it's an empty string) is correctly saved to localStorage, preventing the redirect on page refresh.

Screenshots

Before Fix (Blank Screen on Refresh):
Screenshot from 2025-10-17 16-31-17

After Fix (Page Renders Correctly on Refresh):
Screenshot from 2025-10-17 16-37-59

Proposed changes

My PR fixes the blank screen issue by updating the setUserDetails utility function to correctly persist the projectID to localStorage

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • [ x] Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [ x] I have read the CONTRIBUTING doc
  • [ x] I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

@harshneyy harshneyy force-pushed the fix/portal-blank-page-5224 branch 2 times, most recently from 1bd278c to caa2e59 Compare October 23, 2025 15:56
The setUserDetails utility function used a falsy check (if (projectID))
which prevented an empty string projectID from being saved to
localStorage. This caused a redirect to a blank page on refresh
after the initial login.

This change modifies the check to explicitly allow an empty string
to be saved, ensuring the project state persists correctly across
refreshes.

Signed-off-by: Harshit Verma <[email protected]>
@harshneyy harshneyy force-pushed the fix/portal-blank-page-5224 branch from caa2e59 to 10d43c7 Compare October 23, 2025 16:32
@harshneyy
Copy link
Author

Hi maintainers (@PriteshKiri, @SahilKr24, @amityt),

I'm having trouble getting the frontend-checks CI job to pass and could use some guidance.

My local environment uses Node v20, and yarn install completes successfully. I initially pushed changes generated with this setup.

The frontend-checks failed. Looking at the CI logs for that job, it seems to be using Node v16 (as specified in .github/workflows/push.yml).

When I switched my local environment to Node v16 and tried a clean yarn install, it failed because the pretty-format dependency requires Node >=18.

Since yarn install doesn't work locally with Node 16 but does with Node 20, I've switched back to Node 20, performed a clean install, and pushed the resulting yarn.lock.

Could the Node version specified (node-version: 16) in the push.yml workflow for frontend-checks be outdated compared to the project's current dependencies, which seem to require Node 18+? Any advice on how to proceed would be appreciated! Thanks.

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