Robin Carr had a dinner reservation last Sunday night at Original Joe’s, a favorite spot near her North Beach home. But the restaurant called her midafternoon to tell her dinner was canceled.

The beloved restaurant, like pretty much all of San Francisco, was about to shut down. The 80-year-old classic, known for its heaping portions of Italian food and its who’s-who clientele, had reopened after a 2007 fire destroyed its previous location, but it couldn’t withstand the coronavirus.

Carr rushed over for one last glass of Chardonnay. Soon, the bartender rang the gold bell, signaling last call — not just for the night, but indefinitely.

“They looked at us and said, ‘Do you want one more?’ It’s on the house,” recalled Carr, a public relations executive. Of course, she accepted.

The restaurant staff downed shots and blasted music — R.E.M.’s “It’s the End of the World as We Know It.”

And it is. A week later, nothing’s the same. And in some ways, that’s OK.

For the first time in years, San Francisco can be proud of itself — and has become a city to emulate, not scorn.

Just weeks ago, it was the city mocked by seemingly every national and international media outlet for its total inability to solve any of its major problems — homelessness, filthy streets, a rampant drug crisis — despite boasting a $12.3 billion budget.

It was a place where busy commuters on their way to fancy jobs rushed past other humans sprawled on the sidewalks, too desensitized to even notice the misery anymore. It was the place where the streets were so busy and chaotic, drivers mowed down and killed 18 pedestrians last year, and the city mostly shrugged. It was the place where city leaders could mull over any topic for months or even years, accomplishing next to nothing.

It was a place where we kept our heads down, stuck to our overly packed schedules and rarely bothered to meet our neighbors. It was a place constantly billed as progressive while making no progress at all.

Many of us considered leaving, wondering whether the exorbitant cost of living here was even worth it anymore. Now we can’t leave, and I, for one, wouldn’t want to.

Nowhere is safe from the coronavirus, but San Francisco has set itself apart for taking the first and biggest steps of any American city to stem its devastation. Dr. Grant Colfax, director of the Department of Public Health, began tracking the cases in China in December and has been adamant that the city take strong, bold action. When we spoke, he repeated the phrase, “data, science and facts,” again and again.

In a city that so valiantly weathered the AIDS crisis, “data, science and facts” matter. Not politics. Not pointing fingers. Not prejudice against who got the virus first and how. Instead, our leaders are focused on doing whatever it takes to minimize illness and death during this pandemic.

“My hypervigilance is built in, particularly having been trained during the HIV crisis,” said Colfax, who pushed for the city’s activation of its emergency operations center in January, its emergency declaration in February and its shelter-in-place order last week, one so necessary the entire state of California followed suit three days later. “The early action is required, and many places retroactively are asking why they didn’t take aggressive action earlier.”

Now the calls from other cities to the mayor’s office aren’t from reporters asking about unfettered sidewalk poop, but from other mayors asking how they, too, can help their residents stay healthy.

“I’m getting calls from mayors all over the country, and we’re sharing with them what we did,” said Mayor London Breed. “We don’t want them to have to reinvent the wheel.”

Colfax and Breed praised the city’s excellent hospitals, doctors and nurses — those on the front lines in this battle.

The politicians and medical staff have risen to the occasion, and so have regular San Franciscans. Every time I check my email or Twitter account, there’s another story of an average Joe or Jane doing something so heroic or heartfelt, it makes me want to cry. It seems that all of a sudden, we’ve realized our own lives are more secure and happy if other people’s lives are too.

One of the best stories I’ve heard all week occurred on the fifth floor of a Nob Hill high-rise apartment building. Stephan Dalal, who rents No. 508, moved here in September for a job at a law firm. Last weekend, he spent hours testing pianos so he could buy one and rediscover the joy he’d always felt playing when he was younger.

When Dalal heard about Breed’s shutdown orders, which came at noon Monday and warned residents they’d mostly be confined to their homes as of midnight, he frantically called the piano store. Could a 1972 Yamaha be delivered immediately? They agreed, and he’s been practicing “Autumn Leaves” all week.

He found a note slipped under his door Tuesday and figured it was from a cranky neighbor, telling him to keep the annoying music down. But it wasn’t.

“Thank you for the music,” the note reads. “I can hear it down the hall, and it made me happy. Keep playing.”

It was from Meta Pasternak, a 76-year-old widow in No. 501. She’d heard the music and walked to Dalal’s door, listening from outside. Dalal slipped a return note under her door, reading something like: “Thanks for bearing with me. I’m a little rusty, but I will keep playing.”

They’ve since met in the hallway, chatting 6 feet apart. And Dalal keeps playing for his neighbor.

Across the city, kids are using their suddenly empty days to create art and hang it in the window for a sort of outdoor art gallery. In Glen Park, a little girl and her mom hung a hand-painted sign in their window reading, “Hello neighbors, how are you?” The next morning, they awoke to find a sign in their neighbor’s window across the street reading, “We’re good! How are you?” They’ve never met the other family.

Other efforts are more targeted at filling concrete needs.

Like Jamiee Roesch, a stay-at-home mom in San Francisco’s NoPa neighborhood, who has made it her new life’s mission to find as many masks, gloves, goggles and hand sanitizers as she can and deliver the goods to hospitals in desperately short supply.

She’s encouraging us all to call nail salons, veterinary offices, construction companies, dentist’s offices and anywhere else that might have extra supplies. Kaiser and other hospitals are accepting the goods, as is the GNC store on Chestnut Street in the Marina. If you can’t drive to those locations, e-mail Roesch at sanfranciscotoddler@gmail.com for pickup.

On Thursday, Roesch drove around the city with her small children in the backseat for several hours, collecting donated items off people’s porches. Her 4-year-old sat in the back seat wearing a superhero mask.

“I kept telling her, ‘If we can be anything right now, if I can teach you anything, it’s to be brave and to be kind and to think about other people,’” Roesch said, her voice wavering with emotion and exhaustion.

Over in the Lower Haight, Dan Johnson, a project manager for a tech consulting company, couldn’t be blamed if he just decided to do his work, care for his 3-year-old daughter, Fiona, and call it a day. But along with other neighbors, he’s organizing his neighborhood, finding a captain for each of the 50 blocks to ensure no resident goes unchecked when the expected crush of coronavirus cases hits.

“We need to check on and help our neighbors who are isolated, sick and lonely,” he said. “I’m looking forward to telling my daughter all the stories of this city in 10, 15 years. We’re all going to look back and ask ourselves, ‘What did we do? Are we proud of ourselves?’”

But for now, we wait. And wonder. How bad will this virus get? When we can leave our homes once again without restrictions, will we recognize the city outside?

It’s almost certain lives will be lost. It’s very certain the economy will be in shambles. The city’s coffers won’t look like that of the high-rolling, tech-fueled bonanza of the past decade, and painful cuts will be made to city services that were already spotty. Controller Ben Rosenfield said the loss in tax revenue will be “profound” and we should expect the biggest downturn most of us have ever seen.

But I’m optimistic there will be some lasting changes for the better.

Maybe businesses will realize they can function with their employees working from home, and navigating our roads and bridges won’t be the nightmare it is now. Maybe we can finally set aside more streets for pedestrians and bicyclists — why not make JFK Drive in Golden Gate Park car-free every day and not just Sunday?

Maybe we’ll actually support our independent movie theaters, independent bookstores and struggling artists rather than forgetting them and then taking it as a personal affront when they’re gone. Maybe homeschooling our children for weeks or longer will give us a new appreciation for teachers who aren’t just handling our own energetic kids like we are, but 20 or 30 others, as well.

Maybe City Hall’s quick action can be sustained. It’s renting hotel rooms for homeless people and placing more hand-washing stations and bathrooms around the city. It’s hiring nurses on the spot rather than waiting the average six to nine months for hiring city employees. Why can’t that fast-acting creativity continue?

Mostly, I hope the new kindness we’re showing to each other lasts, and the new connections we’re forming live on.

It was 114 years ago that San Francisco endured its greatest challenge — the 1906 earthquake and fires that killed more than 3,000 people and left half the population homeless. Just five years later, at the groundbreaking for the 1915 World’s Fair, President William Howard Taft dubbed San Francisco the City that Knows How.

We haven’t been that city in a long time, but like the phoenix on our flag, we can rise to the challenge once more. Together, I know we will.

San Francisco Chronicle columnist Heather Knight appears Sundays and Tuesdays. Email: hknight@sfchronicle.com Twitter: @hknightsf