Skip to content

Conversation

Excellencedev
Copy link

/claim #1717
/closes #1717

PR Description:

This PR fixes a bug where the package_name_with_version was being constructed incorrectly in useUpdatePackageFilesMutation.ts and edit-package-details-dialog.tsx. This caused issues with saving packages and managing package files. This PR corrects the construction of package_name_with_version in both files, ensuring that the API receives the correctly formatted package name and version.

@Excellencedev
Copy link
Author

@seveibar Please review this

@Excellencedev
Copy link
Author

@seveibar @imrishabh18 Please review this PR

Copy link
Member

@imrishabh18 imrishabh18 left a comment

Choose a reason for hiding this comment

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

I am not sure if it's the right fix. Last time I was looking at the issue, it looked something related to react-query cache

@Excellencedev
Copy link
Author

@imrishabh18 You are correct. The issue was that react-query was holding onto stale data. Here's the sequence
of events that caused the bug:
You change the package name in the dialog.

My newest commit targets this caching problem:

  I replaced window.history.replaceState with setLocation. This function, from the
  wouter library, triggers a proper client-side navigation. This forces the page components to re-render
  and re-run their data-fetching hooks (useCurrentPackageRelease, etc.) with the new, correct package name
  from the URL.

@seveibar
Copy link
Contributor

seveibar commented Oct 7, 2025

is there any proof this fixes the issue?

@Excellencedev
Copy link
Author

is there any proof this fixes the issue?

@seveibar I will create a test to prove it now

@Excellencedev
Copy link
Author

Excellencedev commented Oct 7, 2025

is there any proof this fixes the issue?

@seveibar I have added a test for it now

@seveibar
Copy link
Contributor

seveibar commented Oct 7, 2025

don't tag me for this one

@Excellencedev
Copy link
Author

Excellencedev commented Oct 7, 2025

don't tag me for this one

@imrishabh18 @ArnavK-09 Please review this

@Excellencedev
Copy link
Author

@imrishabh18 Please try to review again/ Thank you

Copy link
Member

@imrishabh18 imrishabh18 left a comment

Choose a reason for hiding this comment

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

We don't run the playwright test in the ci anymore. Do you have a video which shows this has fixed it?

@Excellencedev
Copy link
Author

We don't run the playwright test in the ci anymore. Do you have a video which shows this has fixed it?

Will add it

Copy link

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Oct 14, 2025
@Excellencedev
Copy link
Author

it is not stale

@github-actions github-actions bot removed the stale label Oct 15, 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.

Saving Broken Bug (can't save a package)

3 participants