Skip to content

fix(calm-hub-ui): reload resource when the hash is edited by hand - #3531

Open
Mittalnew wants to merge 1 commit into
finos:mainfrom
Mittalnew:fix-hub-ui-hash-navigation
Open

Mittalnew wants to merge 1 commit into
finos:mainfrom
Mittalnew:fix-hub-ui-hash-navigation

Conversation

@Mittalnew

Copy link
Copy Markdown

Fixes #3504

When the URL hash is edited by hand, React Router has no history state for the new location and gives it the key "default", the same key as a first page load. useResourceNavigationKey only compared location.key, so it did not see a navigation and Hub kept the previously loaded resource on screen.

For locations with the key "default", the hook now also uses the pathname to tell navigations apart. A query-only change under that key still keeps the resource, as before.

Testing: added two regression tests for locations without history state (a path change changes the key, a query-only change keeps it). The path change test fails without the fix. The existing tests in src/hub/hooks still pass and eslint is clean. I did not run the full hub with a backend locally, so I have not checked the exact steps from the issue in a browser.

@Mittalnew
Mittalnew requested a review from a team as a code owner October 27, 2026 09:46
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Mittalnew / name: Mittal Chauhan (7c7cdda)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

calm-hub-ui Affects `calm-hub-ui`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

calm-hub-ui: a URL that you edit by hand keeps the previous resource on screen

1 participant