For a no-flash, longtime city bureaucrat who had to be cajoled into running San Francisco, Mayor Ed Lee will be remembered for dramatically reshaping the city, but not changing himself at all.

In his seven years in Room 200, Lee, who died early Tuesday morning of a heart attack at age 65, remained the hardworking, jovial guy known for his bushy mustache, corny dad jokes, mean pingpong skills, and distaste for the limelight and political spats.

The mayor was such a nice, normal guy, he was buying apple juice at Safeway with his wife, Anita, when he suffered the heart attack Monday night.

He died at San Francisco General Hospital hours later, his wife beside him and city officials and staff keeping vigil in a room nearby. His daughters flew in from the East Coast Tuesday morning.

“Steady Eddie,” as he was dubbed at City Hall, was just your average guy, making it all the more unlikely that he would be the one to quietly overhaul San Francisco, leaving today’s city vastly different from the one he inherited in January 2011.

Lee’s term arguably coincided with the second-fastest pace of change in San Francisco history — second only to the Gold Rush. It was a great seven years for tech companies, real estate agents, developers and contractors, but not so great for plenty of San Franciscans left behind or squeezed out entirely by the success of the city.

Seven years ago, when longtime city administrator Lee reluctantly agreed to fill the one-year vacancy that was a result of then-Mayor Gavin Newsom’s being elected the state’s lieutenant governor, San Francisco was still reeling from the Great Recession. Newsom had projected a $380 million deficit in the city’s $6.8 billion budget. The unemployment rate was 9.4 percent.

“There were literally articles people were writing saying, ‘Is San Francisco done? Is it just a boutique city now where tourists will come to ride the cable cars?’” recalled Tony Winnicker, who left his post as senior adviser to Lee but remained a political ally and confidant. “Now it’s the preeminent economic center of the state and the world.”

And that’s no overstatement. Lee came into office and focused immediately on “jobs, jobs, jobs,” as he said, but nobody could have predicted just how successful he’d be on that front. He leaves behind a city with a tiny unemployment rate — virtually nonexistent at about 2.7 percent — and an annual city budget of $10 billion, more than the budgets of many states.

His staff said Tuesday that his administration oversaw the creation of 140,000 jobs. His passage of the “Twitter tax break,” which lured tech companies to the gritty Mid-Market, helped set San Francisco on the road to becoming a major tech capital. Uber, Airbnb, Pinterest and other tech companies and startups are based here.

The glass behemoth known as Salesforce Tower has easily surpassed the only-in-San Francisco Transamerica Pyramid as our tallest building, which kind of says it all.

“Silicon Valley moved north because of Ed Lee,” said Ken Cleaveland, vice president for public policy for the Building Owners and Managers Association. “He did a wonderful job in creating the economic engine San Francisco has now become.”

Can you imagine a crystal ball back in 2011 predicting that white tech shuttles would become a new, fought-over symbol of the city? That two dozen cranes would dot the city skyline just a year later? That finding a gas station in San Francisco would become difficult because so many would be demolished to build condos? That the Golden State Warriors would build a new arena in Mission Bay? You would have asked the psychic for your money back.

Nobody — least of all Lee — could have predicted that his laser focus on jobs and the economy would be so wildly successful. Or have so many unintended consequences.

When he took office, the median price of a single-family home was about $650,000. Now, it’s approaching $1.5 million, according to Paragon Real Estate.

Rents have shot up dramatically, even in previously poor neighborhoods, gentrifying them and squeezing out the poor and people of color in the process. Seven years ago, nobody would have believed the average rent in the Tenderloin today would be $2,390 or that you’d have to pay $2,700 to rent in the Bayview.

Artists, nonprofit workers, teachers, families with kids — and, let’s face it, the entire middle class — now struggle to make it in San Francisco. The small-business community also struggles, and many beloved clubs, restaurants and stores have shut down because of economic issues — including the Lexington Club bar, Empress of China restaurant and Lombardi Sports.

“He was the victim of his own success,” said City Administrator Naomi Kelly, who knew Lee for 21 years and was at the hospital when he died. “It went from jobs, jobs, jobs to how do we get affordable housing?”

According to the city’s “housing meter,” which tracks the progress of Lee’s pledge to build 30,000 new units of housing by 2020 — which would have been the end of his second term — 17,466 of those units had been completed as of May. Of those, 37 percent are affordable. Kelly said she believes the city will meet the goal of 30,000.

Kelly said that because of Lee’s press-shy, low-profile demeanor, it wasn’t obvious that he cared desperately about ensuring that those who were struggling had homes and that all San Franciscans could share in the city’s success.

Lee vowed that his second term would center on affordable housing and addressing the city’s stubborn homeless problem, which became far more visible as development pushed homeless people out of their old hideaways. Entire sidewalks in Potrero Hill, South of Market and the Mission became tent-filled shantytowns.

Lee created the city’s first stand-alone department to address homelessness and a Fix-It Team to solve neighborhood quality-of-life concerns. He was backing a safe injection site in which drug users could legally shoot up inside, which should have meant fewer dirty needles littering our sidewalks.

Kelly said these were all top-of-mind concerns for Lee, and that she noticed a real sense of urgency on the part of the mayor in addressing them in the past six months.

“It was, ‘Put the foot on the gas pedal,’” she said. “He always said ‘I’ve got a lot of work to do, a lot of work to do.’ He wasn’t flashy about it, but he cared about it behind the scenes.”

She said she figured the urgency came from having just two years left in office, and she never sensed he knew his health was failing. Winnicker said Lee suffered from gout, but otherwise seemed healthy and energetic over their breakfast Monday morning.

Newsom said he saw Lee at a holiday party just a couple of days ago and that the two chatted for 45 minutes about homelessness. Newsom said Lee’s “honor, decency, character and quiet leadership” were what persuaded him to push his city administrator to fill his shoes as mayor — and what made Lee a successful mayor in his own right.

“No one thought he’d give his life to this job,” the lieutenant governor said, shaking his head.

The last time I talked to Lee was when I joined him and his Fix-It Team on a cleanup of the Tenderloin on Nov. 29. Plenty of people on the sidewalks had no idea the guy in the neon yellow vest picking up a seemingly endless supply of cigarette butts with his metal grabber was their mayor.

I asked him at the end of our walk what his priorities would be for his final two years in office. I remember thinking it was odd that he corrected my assumption he’d have two years, saying you never know how long you have and it could just be six months or a year.

It turned out to be just 12 more days.

I’ve filled many notebooks with the mayor’s quotes over the past seven years. The last one I wrote down, from that Tenderloin cleanup, was, “When the end comes and that’s it, I’m going to feel OK — that I did everything I could to help the city.”

In some ways for better and in some ways for worse, San Francisco will be forever changed because of Ed Lee.

Heather Knight is a San Francisco Chronicle columnist. E-mail: hknight@sfchronicle.com Twitter: @hknightsf