Game guide
Set attack-on-sight
The Attack on sight fleet order is intended to respond to hostile fleets entering a nearby tile while your fleet remains stationary. Research and fleet state can restrict whether it appears.
This is an automatic behavior, not the same as selecting Attack against a chosen fleet. Historical order-activation code needs further verification, so check the fleet's saved orders and events.