A California appeals court continued to chisel out the circumstances in which courts can impose warrantless electronic device searches as a condition of probation, after a juvenile was ordered to hand over access to her texts and social media accounts for dragging a classmate down a staircase and stomping her face.

On Friday, the First District Court of Appeal reversed and remanded a ruling from Contra Costa Superior Court requiring Amber K. to submit her electronic devices for searches to ensure she is complying with all the terms of her probation, including cutting off all communication with the girl she assaulted, who is referred to as B. in the opinion.