2015 Macbook Air screen gradually dimming and dying
Solution 1:
...suddenly the screen dims to about 50% of normal... In the past the problem easily goes away if I close the lid and reopen it.
Your back light is failing and it is a known and common problem with the LVDS cable connector known as "flexgate" (micro rant: I hate that every issue nowadays gets "-gate" added to the end a la Watergate) This issue also manifests as the display going completely black when opened past a certain point.
Basically, as you open and close the lid, the strain on the cable causes it to wear and ultimately fail. Unfortunately, you can't just replace the cable. Since the entire display assembly is sealed, you will need to replace the whole item and it is quite expensive - $650+ USD.
If it's not addressed, the issue will continue to get worse until the display stays black permanently.
I would still take it into Apple and see if they'll help you out, but this is unlikely to be resolved without incurring some expense.