Shannon Liss-Riordan rolls a small black suitcase out of the ugly federal courthouse in San Francisco. She’s smiling, just a fraction. No wonder: She just won a little victory against Uber.

Minutes earlier, in an oak-paneled courtroom 17 floors above the city’s streets, she tried to cut in — “May I? May I?” — as Uber’s attorney bobbed and weaved and attempted to persuade the judge that he should slow down the case that Liss-Riordan is working.

The judge, Edward Chen, who had already declared that the case was heading to a jury trial, finally tired of Uber’s pleas and brusquely cut the company’s lawyer short. “We’re moving forward,” he declared. Prepare for a next round of hearings in August — like it or not.

Why, exactly, does a $40 billion company built on efficiency want to draw out these legal wranglings as long as bureaucracy will allow? Maybe it’s because this suit presents a greater threat to Uber’s future than any angry city government or riled-up taxi union. Liss-Riordan wants Uber to turn its thousands of drivers into employees.

And not just Uber. She’s also taking on its competitor Lyft, the homecleaning company Homejoy, the food delivery service Caviar, and the courier service Postmates. Liss-Riordan is suing all those companies — and warns of more lawsuits for those using the same model. She wants them to pay back wages and expenses for all those hours worked. For an industry preaching that everything should be frictionless, Liss-Riordan is providing an awful lot of friction.

Like most American industries, tech has spent a lot of time — and an awful lot of money — finding shortcuts around labor rules to help it cut costs. The drivers steering buses full of engineers up and down Silicon Valley campuses work for third-party companies without the benefits of the coders they chaperone, and have talked of unionizing. Workers who wipe phone screens with toxic chemicals are employed in a web of Chinese factories iffy on regulation compliance. Industry giants were busted for no-poaching agreements — tamping down salaries and competition for engineers. Companies contract with crooked labor brokers who bring over Indian immigrants on temp visas, workers who are usually paid less than U.S. market rates and sued by the brokers if they leave their jobs.

But the on-demand economy makes its own labor loophole very visible: Many of these companies are built with workers who are not even considered workers at all. In a twist of business logic that drives much of the sharing economy, these delivery people, drivers, and maids aren’t employees — they’re entrepreneurs.

They come out of college or the recession or day jobs and fly down a venture capital–slicked chute into McGigs that begin when they open an app on their smartphone and end when they swipe out. The companies don’t pay them wages or benefits. They don’t pay overtime, and they don’t pay most expenses — a biggie when your job requires you to guzzle gas. And they refute liability if, as in Uber’s case, a driver hits a passenger in the face with a hammer, or runs over a 6-year-old on New Year’s Eve. After all, Uber has argued, the drivers weren’t employees.

Uber — and the many on-demand hopefuls following its lead — says its drivers are actually its customers: Independent business owners who pay to access an app that links them with rides, while Uber takes a cut. (Judge Chen blasted that bit, writing: “Uber does not simply sell software; it sells rides.”)

While saving millions, the companies pitch this setup as empowerment. (Uber’s recruiting page: “Be your own boss and get paid in fares for driving on your own schedule.”) They also say they’re offering an economist’s dream of elastic, supply-and-demand labor — Uber and Lyft’s surge-pricing motivates workers to drive when market demand is the highest. On-demand cheerleaders see the volley of lawsuits as not just a legal challenge, but a clash of orthodoxies: They say Liss-Riordan is a carpetbagger who doesn’t get their pioneering model (or is just trying to get rich off them). She shoots right back that they don’t get labor law — or are just gaming it for their own profits.

Liss-Riordan argues that, actually, the on-demand companies aren’t disrupting much at all: In fact, they’re just copying the behavior of other industries — ones that she has continually sued over this very issue, and beat time and time again. Including strip clubs.

In 2007, a woman walked into Liss-Riordan’s Boston law offices with a potential case. Lucienne Chavez gave lap dances at King Arthur’s Lounge, a notorious strip club in Chelsea, Massachusetts. Chavez, like all the women who danced at the club, was classified as a contractor: earning no wages, getting no benefits, for tips and her cut of lap dance fees — a deal similar to those in strip clubs all across the country.

Yet King Arthur’s also told her when to work and how much she’d get paid, and, she claimed, prevented her from dancing at other clubs. In fact, she actually had to pay for the privilege of not being an employee, as the club charged her $35 for each shift and took 30 percent of all money she made from private dances.

Liss-Riordan filed suit, representing Chavez and 69 other women. In court documents, the club argued its main business was selling alcohol. The dancers, they said, were the equivalent of TV screens at a sports bar. (Inherent in the argument seemed to be that the strip club wasn’t in the business of offering lap grinding, but a platform — a literal platform, this time — in which entrepreneurial dancers could be introduced to beer-swigging clients.)

The court ruled in favor of Chavez and her colleagues. The club started having to pay a “tipped” minimum wage to dancers — as restaurants pay waiters — and couldn’t ask the strippers to share their tips with the bouncers and security. (“It didn’t mean they weren’t waiting for it, they just couldn’t ask for it,” one dancer who worked at the club after the lawsuit told me.) King Arthur’s eventually closed down. Liss-Riordan went on to sue strip clubs across the country for having the same setup.

Liss-Riordan was well schooled in what the legal industry calls misclassification suits — in which a worker seems to do the job of a W-2 employee, but instead operates as a 1099-filing contractor without wages or benefits.

Her first case of this type was against FedEx Ground in 2005. Delivery drivers were contractors who had to buy or lease their own van, but wrap it in FedEx’s logo and buy their uniform. They paid insurance, gas, and all their expenses while getting all their work instructions from FedEx. In court filings, FedEx argued it wasn’t in the business of making deliveries, but a “sophisticated information and distribution network” that the drivers used to make deliveries. A Massachusetts state judge ruled against the company — a decision that has been repeated in other states. (The Massachusetts judgment now hangs in the balance, after FedEx successfully challenged it under a federal law. Liss-Riordan is appealing. After lawsuits across the country, FedEx responded by distancing itself further by contracting with third-party companies that employ the drivers. She is already plotting new lawsuits against them.)

In 2012, some Massachusetts drivers working for a fast-growing Silicon Valley startup contacted her. Then their counterparts in California did. It was time to take on Uber.

Liss-Riordan doesn’t think she’ll take a company as rich as Uber down, but — with that company touting the creation of 50,000 “jobs” in its European expansion, and many startups following its lead — she does want the industry to have to take stock before it expands further. “It’s really frightful how fast this is growing,” she says. “They’re passing themselves off as doing great things for the world, when really they’re creating these jobs that don’t even have the basic protections that have been put in place over decades to make sure workers get some minimum standards.”

She isn’t the only attorney suing the on-demand companies — Handy and Instacart face challenges, too — but she has the most cases, and the most high-profile ones. Opponents have called her a press hound and an ambulance chaser, given that she earns 30 percent of whatever settlement she wins (that’s higher than Uber’s roughly 20 percent take of its drivers’ fares).

Yet their depiction of her as a cynical, grasping attorney doesn’t easily stick. In her early days, Liss-Riordan organized voting drives and women’s rights rallies in New York. A few years ago, she and investors made a bid to buy The Boston Globe from the New York Times Company to make it a reporter-owned newspaper (they didn’t win). Now 45, she has made a career on chasing down practices that shortchanged the bottom of the labor food chain: In 2011 she won a Massachusetts case against Starbucks for forcing baristas to share their tips, resulting in a $14 million settlement and a $3-an-hour raise for managers. In 2008 she successfully sued American Airlines for skimming $2 from the skycaps picking up luggage at the curb of Boston’s airport.

After an overtime suit against a Boston-area pizza chain pushed the place into bankruptcy, she and her husband bought one restaurant at an auction and renamed it the Just Crust. Today, the mostly Brazilian staff shares in the pizzeria’s profits.

Liss-Riordan gets the sex appeal of the on-demand economy. She hailed a few Ubers in its early days (“Don’t tell my cab driver clients”) and was wowed by its ease. As a working mother of three, she needed all the efficiency she could get. But the industry’s employment models — she calls them “schemes” — make her angry. Yet she’s adamant that “it really doesn’t have to be this way. They don’t have to screw over their workers while being so successful.”

The streets surrounding the San Francisco federal courthouse are a beehive swarming with on-demand workers — the very people at stake in Liss-Riordan’s lawsuits. Students and DJs and ex–cab drivers zoom their morning fares around in pink mustachioed cars. Postmates couriers hand $6.95 Chipotle burritos to office workers. Homejoy maids arrive with Windex they’ve bought to homes of the busy for $38 cleanings. Caviar delivery people tote artisanal hush puppies to remote workers in glass residential towers. The HQs of all those companies sit within two miles.

Not all of these workers want things to change. Chat up a Lyft or Uber driver, and most will say they like the flexibility and the extra cash. (They also have a reason to sound sunny about the job: Riders are asked to rate them at ride’s end, which affects their ability to get future fares and stay on the platform, since Lyft and Uber can kick them off the app at any time.) A Lyft poll found that half its drivers drove less than five hours a week. One poll of the country’s growing ranks of freelancers found that Millennials most often prize freedom over stable nine-to-fives. But another study of independent workers pins the amount of “reluctant independents” across industries — those who would rather just have a real job already — at 30 percent.

Whether they’re happy or not, these workers are at the center of a complicated legal landscape in which federal and state laws and years of court cases spell out different tests for whether a worker is a employee or a contractor.

Generally, the IRS advises that employers can control the method of work, while businesses hiring contractors can only control the result. Yet running a successful business means the customer’s experience has to be controlled pretty tightly. So the app industry is contorting itself to keep workers content, loyal, on-message and on their best behavior, all while steering clear of employer-like traits — even if only in semantics. Uber calls itself a car service in its ads, but it calls drivers “partners” and makes them pay for a driving skills course. It also offers them various “suggestions,” as Uber put it in court filings: how to dress, how clean to keep their car, to play NPR or jazz on the radio. Homejoy cleaners make an hourly rate while cleaning, but no overtime or compensation for travel time between jobs. Postmates offers “soft” benefits: liability insurance tailored for couriers, free enrollment in a medical care service, and bike gear.

Federal judges have questioned whether a new class of worker may be needed for these people who can work whenever they want, perhaps even for two competing apps at once (something that’s frowned upon by the companies but frequently done). In one Lyft ruling, a judge wrote that “the jury in this case will be handed a square peg and asked to choose between two round holes…. Perhaps Lyft drivers who work more than a certain number of hours should be employees, while the others should be independent contractors. Or perhaps Lyft drivers should be considered a new category of worker altogether, requiring a different set of protections.”

There already is a third hole of sorts: the part-time job. Several on-demand companies have decided to go this safer-but-more-expensive route, including Alfred, Zirtual, Munchery, Parcel, FlyCleaners, and Managed by Q. It may cost more, but it also gives them greater control over the quality and branding of the service — no small thing when, say, you’re having workers enter people’s houses while they’re gone.

But the rest of the on-demand industry says that solution won’t do. Even if workers could sign up for their own hours, or the companies could schedule more shifts for peak hours, the utter flexibility of the current system would be lost — and with it would go the workers who saw that as the major selling point of the gig. Uber could probably survive having to pay out if it lost the case, but no others have the same resources. (The other suits sue for some combination of back-wages, expenses, and attorney fees.) Liss-Riordan says companies do not have to go under; they could increase their cut to cover the additional costs of employment.

Whatever the result — whether there’s no change, a shift toward employment (either full- or part-time), or some new classification that hasn’t been thought of yet — it’s going to take a while. “They’re gearing up for a battle ’til the death,” she says.

Shortly before she filed the California case in 2013, Uber got its drivers to sign a new clause when they swiped into work, agreeing not to join a class action lawsuit against the company. Judge Chen later ruled that Uber had to allow workers to opt out of the agreement by email (rather than hand-deliver or send a letter with overnight delivery, as the clause requested). Liss-Riordan claims “hundreds” of drivers are now calling her office to join the suit.

Last week, Liss-Riordan walked back into court for another showdown. Instead of her regular opponent, who had been on the Uber case for two years, she faced a new set of lawyers.

Uber had switched out its previous legal team to a crew led by Theodore J. Boutrous, Jr, a Los Angeles attorney. Boutrous had previously defended Walmart at the Supreme Court in a discrimination suit brought by 1.5 million women employees, who claimed they had been denied opportunities at the company because of their gender. Boutrous argued that they didn’t actually have enough in common to group together in a class action. He convinced the court — a win that saved Walmart a potential $11 billion in damages. And now his first order of business against Liss-Riordan is to do the exact same thing for Uber: arguing there are too many differences between the drivers, from the amount of hours they work to whether they’re operating simultaneously on other driving apps, to be a coherent class of plaintiffs.

Despite the unexpected move from Uber, the hearing was more cordial. Afterwards, Liss-Riordan walked down the courthouse hallway — amused by the turn of events. “I was beating them,” she whispered to me, with a smile. “So they brought in another team.”

Log in to Medium and “recommend” this story.

Follow Matter on Twitter | Like us on Facebook | Subscribe to our newsletter