I've been reading about recent reports regarding COCONUTS-2B, a planet with the longest orbital period known - 1.1 million years. As a previous question asked, What precisely leads to planets like COCONUTS-2B to orbit so far away from their host stars, 6000 AU in its case?, I'm wondering about a wider problem - the effects of supernova shockwaves and/or gravitational waves on the orbit of a celestial body. At what distance would be needed so that such a transient event would noticeably affect the orbit of a planet, perhaps by a mile?
I'm going to break this up into two parts.
The effect a supernova will have on a planet is, as one would expect, dependent on a lot of factors. Like how close a planet is to the supernova if it's far away then how long will it take for the remnant to pass by it, etc. But a couple of guiding principles boil down to the following:
Once the mass interior of the orbit starts decreasing (let's say a remnant like a white dwarf or neutron star is left) then the size of the orbit will increase, which makes sense, less gravity to pull on it, looser orbit (perhaps if the orbit was loose, to begin with, it could lose the body). This comes with exceptions from the anisotropic nature of supernovae, but if your planet wasn't destroyed by the supernova, then it's reasonably safe to ignore these.
Radiation pressure isn't something we normally consider in orbits, but in the case of cataclysmic events, things get a little weird. It's feasible, given the sheer amount of mass flowing outwards, that this could have an effect ranging from planetary annihilation to orbital changes. It just kind of depends. And it depends too wildly on the conditions of the star and the planet; it would be near impossible to make a generalizing statement about how far it would be to be or not be affected. It's just too situation-dependent.
Final note, in case this was an implication, supernovae are not an appreciable source of gravitational waves. In a useless, theoretical way one could argue that any moving thing has gravitational waves, but it's just not something that would have an effect on anything.
Now, this is a question that seems to be pretty tough to figure out. A lot of guesses in this regard end up being 0th order approximations with the main issue arising from a similar problem we have with the supernovae: this is ridiculously situation-dependent. Is it intermediate-mass black holes causing the gravitational waves? Is it neutron stars? At what point in their waveform do we want to consider (since the strain is steadily increasing)? How close is our planet? All of these questions make it really hard to get a definitive answer. It also makes it really hard to generalize, but like with the supernovae, there are some guiding principles that can kind of give us an idea:
Spacetime is incredibly stiff. Like really, really, really stiff. It takes an enormous amount of stuff moving around really really fast to get anything to happen, and when it does, it's pretty tiny. My understanding is that unlike one might expect, gravitational wave strain drops off as 1/r, and since it's pretty stiff to begin with, you're going to have to get really, really close to start noticing some effects, and at that point with a binary system moving at unholy speeds, you might find yourself in more of a dynamical pickle that will end with being ejected or destroyed before you can notice your gravitational wave effects. However, one really rough estimate I've seen is the strain getting to about as much as affecting .1% of the dimensions of the object. For a planet, this is appreciable and could cause some potential problems. But for where in the system this happens? Entirely dependent on the individual system.
I'm sorry I couldn't give you more of a quantitative, definitive answer. These things just have such a wide range of possibilities that it makes it hard to generalize with just about anything. Hopefully this helps.