The border agents didn't act in good faith, regardless of what they're empowered to do. They wanted the data for one reason and fabricated another to prompt the device search. The data they were interested in pertained to protest activity protected under the constitution but the lie they told was about something criminal. That anything within 100 miles of the border is constitution free tosses that out, I guess, but is extremely problematic on its own.
Having lived near the US border most my life, the way it was explained to me years ago, is that there is a strip of land at the border crossing, where you are in neither country. In this space, you are not privy to any of the protections you would be allowed were you in either the US or Canada. This is where you are taken when you are forced to leave your car. Part of the current controversy is that the US government is trying to treat this literal no man’s land as both international land as as federal land with the disparate charges they are applying.
Fun fact. Lack of parking is not a legitimate reason to attempt to drive past this region. I was once flagged crossing into canada on a day they were interviewing a lot of travelers. I spotted parking in what looked to me like an overflow lot on the other side of a fence, and when I slowly drove that direction sirens blasted and guns were drawn. Nothing gives you clarity like a gun pointed at you.
I'd heard in another article around this, that in this particular situation they had said it was a routine border search. Not even something criminal, just routine procedure. Then that under neath all that they did in fact suspect something criminal and were using the standard stop as a pretext for criminal investigation is the constitutional violation.
Interesting that all that rules don't apply to water. The moment you stepped on a boat, coastal guard can (and do regularly) board it and conduct a search without any reasoning. They don't need any probable causes, warrants, nothing.
Seems like so far it didn't create any problems, so public is ok with that.
> That anything within 100 miles of the border is constitution free tosses that out
That's a misconception. Border/immigration agents can operate inside this zone, including making stops with reasonable suspicion or running checkpoints where everyone is stopped with no suspicion. The checkpoints are limited in scope, and do not provide authority for searching electronic devices. Some people, including a couple dissenting supreme court justices do feel the checkpoint part violates the constitution.
That's distinct from the border search exemption, which allows inspection of everyone and everything crossing the border. It only exists when someone is actually crossing the border and does not allow CBP to stop or search people who are not crossing the border.
Edit: https://www.aclu.org/know-your-rights/border-zone