What happens when the congressional representative of this uber-liberal enclave — who also happens to be leader of House
The next day, at Pelosi's behest, the president tweeted reassurance to "Dreamers" — immigrants brought to America illegally as children — that they needn't worry about deportation during the six months Congress works to resolve their ambiguous state.
And Wednesday night, "Nancy and Chuck," as the president chummily called the pair, joined the president for dinner at the White House, where Democrats said they reached agreement with Trump to permanently protect the Dreamers as part of a larger border security package.
Trump failed to win a measly 10% of the vote here in November but, even so, many said they were just fine with Pelosi's new BFF.
"If Democrats can work with him to accomplish something, they should," said Marie Mansi, a cheery 80-year-old who retired years ago as a legal secretary. "I don't think it should be a fight."
"Even though," she added with a gale of laughter, "I think he's an idiot."
Fabian Namgalies is no Pelosi fan — "too long in office" — and doesn't like Trump either, but he concurred.
"I think politicians should always be working toward a solution, whether it's with the wrong guy or not," said the 38-year-old management consultant. "It's much better than what the Republicans did under [President] Obama."
In fact, in nearly two dozen random interviews with constituents — an admittedly nonscientific survey — not one person objected to Pelosi and fellow Democrats cutting deals with the president. Trump admirers (yes, they exist in San Francisco), Trump haters, supporters of Pelosi and critics of the Democratic leader were unanimous.
As attorney Daniel Stern, a 51-year-old Trump voter, put it, "Anything that encourages bipartisanship is a good thing, absolutely."
Politically, Pelosi enjoys plenty of leeway — at least within these 47 square miles hugging the Pacific. Since her first election in 1987, Pelosi has routinely been returned to Washington with about 80% support.
And while a primary opponent has stepped up, challenging Pelosi from the left, his odds of success appear to fall somewhere between exceedingly unlikely and vanishingly small.
Speaking from Washington, Pelosi was blunt and far more pragmatic than the loopy-lefty portrayal her critics like to present. "We have our responsibility to find our common ground," she said in an interview. "We have our responsibility to stand our ground if it goes beyond a certain point."
There have been times, she noted, when her role as Democratic leader left her crossways with some of her more combustible constituents. The called-for impeachment of President George W. Bush was one such occasion. (Her refusal to go along resulted in Pelosi being picketed in her district as a right-wing warmonger.)
This, however, does not seem to be one of those out-of-step occasions.
Shelley Handler, lunching on a chicken and feta salad at a sidewalk cafe in Russian Hill, said she didn't have enough bad words in her vocabulary to describe her feelings toward Trump.
Even so, the 67-year-old former chef went on, "people need help when their homes are blown away or flooded. It's not a partisan issue. It's getting the work done that has to happen."
Yes, some suggested, there was a concern that Democrats, by working with Trump, will "normalize" or "legitimize" his presidency, to use two of the words popular with the anti-Trump "resistance."
“On the one hand, I’d like to see him crash and burn as quickly as possible, so we can get on with it,” restaurateur John Lamkin, 59, said behind a woolly white beard. “On the other hand, if he’s going to be in there, let’s get something done. This anything-for-the-sake-of-the-party that’s been going on for the last 20 years” is hooey.
Recently Democratic Sen. Dianne Feinstein appeared in her hometown and set the left-wing afire by allowing as how, maybe, Trump might not be so horribly terrible after all.
Actually, Feinstein said — with enough caveats to employ a decent-sized law firm — Trump could end up being a good president, given time, patience and a thoroughgoing personality transplant.
The statement was the rhetorical equivalent of packing peanuts, the kind of airy bromide that fills space and keeps relations between politicians at least minimally decent. Naturally, liberal activists were prepared to string the former San Francisco mayor from the Golden Gate Bridge because, well, Donald Trump.
For most politicians the inclination is to play to their base, which, for California Democrats, means competing to see who can be most extravagantly opposed to the president. That helps explains why Feinstein's hope-he-doesn't-fail aside created such an uproar, especially among those who would like to see her step down after 2018 to give someone less centrist a shot at the Senate.
But negotiation, compromise and settling for the proverbial half-loaf are the essence of politics, and a remedy for the gridlock so many in both parties profess to abhor. If the sentiments in this anti-Trump stronghold are any indication, voters may be ahead of the politicians and political activists when it comes to setting aside animosities for the sake of accomplishment.
Even if it means dealing with the devil.
@markzbarabak on Twitter