Can't get app-bridge to reflect the URL after a redirect

Hey!

I have a Remix (React Router 7) app that has this code in an action:

const { redirect, session } = await context.shopify.authenticate.admin(request);

return redirect(`/app/my-url/${validationResult.data.id}`);

This works totally fine in the sense that the app within the iFrame redirects and the data is loaded on the new URL. However, the URL in the admin remains at /new instead of /my-new-object-id. So if I refresh it takes me back to the new page.

I’ve tried doing it client side with useNavigation as well to no luck.

I’ve banged my head against the wall with this one for days at this point. Anyone got any ideas as to what is going wrong? Is it potentially anything to do with /my-url/:id going from /new to the new-id not detecting a change because it things it’s the same URL?

There is already an issue tracking this App Navigation Not Reflecting The Correct URL On Inital Click · Issue #369 · Shopify/shopify-app-template-remix · GitHub

My initial clicks do seem to work, unlike that issue. It’s just attempting any kind of redirect after a POST request