Diffraction of wave on an edge

I'm recently taught that the angle of diffraction of waves depends on the barrier width relative to the wavelength. For example, if you have a plane wave of shorter wavelength, and if it hits a gap of an obstacle, the angle of diffraction will be smaller since the gap is bigger compared to the wavelength, and vice versa.

I got confused when considering a wave hitting an edge of an obstacle (of infinite width). I was taught that in this case, the angle of diffraction depends completely on the wavelength:
and

However, unlike the previous situation where you have a gap for size reference, there's nothing for the wavelength to compare with in this case! In other words, the two scenarios in the images are completely the same if you change your perspective a bit by "zooming in" the latter one! (Assuming the width of the barrier doesn't matter) So why do their angles of diffraction still differ?

I think that the pattern depends on the distance of the detector from the straight edge. At least this is what happens in the Fresnel approximation. In this case, then, the detected intensity at any angle depends on the ratio $$\lambda/d_{\rm detector}$$.

I think you may be creating an unphysical scenario. You drew wave propagating along the edge of the obstacle as if it is trivial. It is not.

What will happen is that as your plane wave hits the obstacle it will diffract at the first corner (on the left), as a result the wavefront of the wave close to the horizontal part of your of you obstacle will will keep bending. The exact shape of the wavefront near this obstacle will be hard to compute, but in case where obstacle is much longer or much shorter than the wavelength you will have approximate solutions.

Once the wave reaches the end of the horizontal part of the obstacle it will diffract again, and that diffraction will not be a diffraction of the plane wave. Instead it will be a diffraction of the wave that has allready been diffracted before at the first obstacle. So the length of the horizontal part of your obstacle will matter.

What if the horizontal part of the obstacle is infinitely long? In this case your comment sort of stands, but you will need to determine what is the wave that will happily propagate along the horizontal surface indefinitely. It will not be a plane wave. Such waves are known as surface waves. In electromagnetism examples include surface plasmons and Dyakonov waves. These waves rely on non-trivial material response (of the obstacle), and are thus inherently dispersive.

In case of the infinitely thin obstacle, IMHO, the correct way to approach this problem, is to consider the diffraction of the flat-wavefront wave from half-space. The solution will be given by the Fourier transform of the Heaviside step function, the P.V. component will give the non-trival diffraction.

In this case the diffraction pattern will be independent of the wavelength.