[sentence (plain)] + と見るや
と見るや is a literary expression meaning "the moment (someone) saw/realized that…" or "as soon as (someone) confirmed that…". It describes a situation where, immediately upon perceiving or recognizing something, an action follows without any delay. The emphasis is on the instantaneous nature of the reaction – the second action happens so quickly it seems almost simultaneous with the perception.
This grammar point combines the conditional particle と with the verb みる見る ("to see/perceive") and the particle や, which here functions similarly to やいなや否や ("no sooner than"). The literal sense is something like "upon seeing that…, immediately…"
The clause before と見るや describes what was perceived or recognized, and the clause after describes the immediate action or reaction that followed.