If the triggering attack's windup is canceled, Hail of Blades will not grant the stacks and reset its availability, causing its visual effects to play the effect ready animation that also plays when the cooldown ends naturally.
If an attack's windup is canceled while Hail of Blades' bonuses are active, the buff duration is refreshed. This only happens once on the second attack and once on the third.
Jhin gains an enormous attack damage boost with Hail of Blades, as his passive converts the attack speed gained into AD. His triggering attack, however, is special cased to not benefit from Hail of Blades.
Since basic attacks from effects that resets the basic attack timer don't remove any Hail of Blades stacks, those types of attacks can extend the duration. This is useful for champions that have abilities that scale with attack speed.
Hail of Blades has a very similar effect to Lethal Tempo (such as allowing to surpass the attack speed cap), with a few differences:
Hail of Blades lasts for a limited amount of attacks, whereas Lethal Tempo lasts for any number of attacks over a duration.
Hail of Blades activates immediately, whereas Lethal Tempo's activation is delayed.