It was a hazy afternoon what with the fires and all, but San Francisco’s political future had just grown that much clearer.

Standing outside a nondescript Irving Street storefront that, until moments earlier, had served as his campaign headquarters, Supervisor-elect Gordon Mar declared victory. “We knocked on every door in the Sunset,” he exclaimed.

Mar, twin brother of former supe Eric Mar, spoke in a calm monotone as he gave his victory speech late Thursday afternoon — a speech somewhat overshadowed by workmen loudly and enthusiastically breaking down the former HQ. Hundreds of jailbreak-orange Gordon Mar signs were heaped into piles; it looked like a bomb went off in there.

“We did what many said couldn’t be done,” Mar continued. “Against $1 million and the odds, we won for working people and an independent voice in District 4.”

Afterward, Mar’s young staff — campaign workers: You and I get older, they stay the same — danced to 1980s hip-hop and sipped champagne. They’d worked hard. So had Mar, who lost 15 pounds on the campaign trail.

But, make no mistake: This should not have happened. This outcome required a Chernobyl-like concatenation of missteps to lead to Jessica Ho being the anointed standard-bearer of the city’s establishment players — and then running a lackluster campaign.

Mar, at his victory announcement, told Mission Local that he was “only going to run to win.” And it was the weakness and vulnerability of Ho that led him to believe he could win — and “do what many said couldn’t be done.” That would be a progressive (and Eric Mar’s brother) winning in District 4 — an unlikelihood only a little less ridiculous than a Democrat taking a senate seat in Alabama.

District 4 Supervisor Katy Tang, who hired Ho to be her legislative aide in early 2018, thinks very highly of her friend and employee: “I saw her in action. I thought she could do this.” A pause. “Of course, I realized she did have some shortcomings.”

Shortest of all, Ho registered to vote in this city on March 27 and began working in City Hall in April. You can buy aged cheddar cheese at the Grocery Outlet that’s been around longer than she has. “I guess my belief in human kindness and respect led me to believe that someone who was so hardworking could overcome that,” Tang continued.” She offered a wan grin. “I guess not.”

Mayor Ed Lee appointed Tang to the board in 2013. She was previously a legislative aide for Supervisor Carmen Chu, whom Lee subsequently appointed Assessor-Recorder. Chu had been appointed D4 supe by Mayor Gavin Newsom after Ed Jew was removed from office (he’d later go to prison for extortion charges — and, also, because he lived in Burlingame while serving as D4 supe).

That’s a lot of appointing. Tang is respected by her colleagues for her smarts and her diligence. She is a good and responsive district supe. But she’s never run a contested race for office. Neither has Chu.

When you’ve only run uncontested races, the political operation and ability to recruit volunteers and raise money and run a ground game grow atrophied. If they ever existed in the first place. It turns out that it’s simply not enough for a sitting supervisor, that supervisor’s predecessor, and the mayor to anoint a political cipher — who has little knowledge of nor ties to the neighborhood — and count on a semi-coherent endorsement in the newspaper of record and a wave of PAC money to see them through.

To win, you’ve got to, as Mar did, knock on every door in the Sunset. And, when you do, you’ve got to tell them who you are and what you’ve done.

If Katy Tang could do it differently, yes, she would do it differently. She has apologized to many moderate political figures for her role in what turned into a debacle.

Tang, in June, announced she would not be running for a second term — on the very day of the filing deadline for new candidates. This led to a five-day filing extension, which allowed Mar and others to join the race. But with Ho quickly endorsed by the powers-that-be, any other viable moderate candidates, stayed in their chairs.

Does Tang wish she’d announced her intentions earlier? Yes. “In retrospect,” she admits, “I should have.” But it was complicated. This has been a complicated year (and can you believe it’s been nearly a year since Ed Lee died?). “I had been so focused on helping London win the mayoral election, I didn’t want to distract from it. I didn’t want to take away from her campaign. I was trying to be respectful, so it’s sad to see people think I was being devious.”

Tang has, for quite some time, been considering an exit from public life. But, she says, she didn’t consult any of her colleagues about this, for two reasons: One, the news would get out; and, two, they’d probably have talked her out of it.

“I loved the work. The only thing I didn’t have going for me was a passion for politics,” Tang admits. “But the job I loved best was legislative aide. You don’t have to sit in meetings for hours. You just do the work. I love making other people look good.”

Ho, incidentally, was not Tang’s first choice. She was, purportedly, her sixth, but other would-be successors have kids in college and couldn’t handle a pay cut or simply didn’t want to work supervisor hours.

Tang additionally notes that while Mayor London Breed was kind and understanding when Tang informed her she was bowing out, the mayor’s office did let it be known that Tang could resign — so a replacement could be appointed in her place and run as an incumbent. Tang declined: “The people of the Sunset would not want to have a mayoral appointee for the third-straight time.”

Well, evidently.

There has been no small degree of rancor directed Tang’s way now that the city’s moderates have lost the Sunset. (Hours after Ho on Thursday conceded, and just prior to Mar declaring victory, journalists were hit en masse with an e-mail claiming Tang lives out-of-district with her boyfriend — which would be a remarkably brazen and stupid move in Ed Jew’s old stamping ground. Long story short: Tang all but certainly lives in her district, and this has all the markings of a spite-fueled attempt to defame her on her way out of public life).

You will feel the effects here in the Mission when a progressive supermajority of supervisors potentially clashes with the mayor on land use, development, corporate tax policy, police reform, and other issues. You will feel it when Hillary Ronen — rather likely — becomes your next board president.

If you’re so inclined, you can blame Tang for taking too long to announce her intentions. But you can blame so many people, including all the San Francisco establishment figures who backed an obviously unsuitable candidate. No matter how dedicated or intelligent Ho is, she simply hasn’t been here long enough to run for a high-level, consequential office. Her campaign felt like an experiment in how many voters you could glean with an affable tabula rasa of a candidate, a decent array of endorsements, and loads of outside cash. Quick answer: Not enough. Only 4,900 people had thrown in for Ho as of Friday.

Back at Gordon Mar’s quickly emptying headquarters, the young staffers and their boss knocked back a bit more of the bubbly while furniture, posters, and shelves were piled up on the floor or hauled out the door. The label on the champagne, in a nice touch, matched Mar’s orange theme.

Was that planned? No. What kind of champagne was it? “Oh, I don’t know,” says Mar. “Whatever was popular at BevMo.”

Let the record show it was a bottle of Veuve Cliquot. Mar clearly didn’t put much thought into what manner of champagne he’d pop if he won.

And that, when you think about it, was one of the few things about this race that made some sense.