They can detain people upon a finding of probable cause. They are using the dog to obtain the probable cause, and the SCOTUS just said no.
The first cop had his dog there - why didn’t he just use his? And the court said that they can use dogs to sniff around the car - but just can’t make the person wait. Although perhaps the cop still needs to ask permission.