If you're seeing gnats already, get some of the yellow sticky traps and hang them in the tent to catch the live ones. If your growing medium is typically wet, get some Damascus Earth and cover the surface of the soil/coco. The gnats are likely whiteflies, not fruit flies. They need the moist soil to reproduce. I had an infestation last crop and I'm pretty sure the flies were dieing or pooping in my colas. When I harvested I didn't see any issues, but when I started dry trimming, I had bud rot in my biggest colas and ended up throwing out the entire crop. Fix your bug issue before it gets any worse.
Some browning can be normal, especially in autos, but stress can cause it too.