Change of function. And, in contrast to birds, wings seem totally new. The most primitive insects are wingless and a few of these have thoracic flanges that might indicate how you could get outgrowths from the thorax. Did tests of gliding, parachuting, and attitude control with different wing length. Found that the long wings helped, but that the shortest wings were useless Makes sense, the wing tip is where turbulence air flow is generated, and turbulence hinders flight.
Short wings are all tip.
Change of function. Short wings were very useful for transferring heat to the body, and long wings added little more. Again, this makes sense. Heat transfer works best over short distance. If it has to go a long distance, much of it will be lost.