Take a walk east from the gold-plated cupola of San Francisco City Hall and the landscape transforms into the Tenderloin, a patchwork of residential hotels, small delis and social service clinics that cater to the poor. It winds into the city’s main tourist corridor, and, farther along, a glossy cluster of condominium towers where upper-story penthouses cost millions.

These symbols of extreme poverty and prosperity are wedged together in District Six, which serves both as a portal for visitors and a cauldron where San Francisco’s most pressing political issues simmer.

For 20 years, District Six voters have reliably concluded that the solutions to those issues come from the progressive viewpoint. And while it’s more than a year until the next election for supervisor, the contest is already shaping up as a test of whether that is still true.

From the Tenderloin to the Mission Bay waterfront, District Six has seen a rush of development over the past two decades, and residents are complaining about the aftereffects: Uber and Lyft cars tying up traffic, the city not running enough Muni lines to ease congestion, and the sidewalks filled with homeless people in obvious despair.

The result of the November 2018 election will ripple beyond the district’s boundaries. Supervisor Jane Kim, the two-term progressive who is ineligible to run again, calls District Six a “testing ground” for the rest of the city because of its mix of issues — poverty and homelessness, supercharged development and pedestrian safety.

“We have the poorest residents, the wealthiest residents, the tech companies, many of the supportive services, and close to 50 percent of the city’s homeless count,” Kim said.

The district has long had more than its share of homeless camps, drug dealers and single-room-occupancy hotels, the lowest rung on the housing ladder. What has changed since Kim’s first election is the influx of tech workers and the commercial and residential building boom.

In 2011, San Francisco offered temporary tax breaks to lure tech startups into the rundown Mid-Market area. South of Market has become the spiritual home of tech, and development spurred by the new Transbay Transit Center has made it the highest-valued neighborhood in the city — yet a large number of destitute residents remains.

“The first time I went door-knocking we were in the depths of the recession, and jobs were the most important issue,” Kim said. “Now it’s affordable housing and homelessness, and those are both outcomes of this growing income gap.”

The candidates lining up to run will determine whether Kim’s progressive politics will outlast her time in office, or whether the changes that have swept over SoMa in recent years have changed the electorate as well.

The demographics appear to be shifting toward Sonja Trauss, a tech- and real estate-backed candidate whose “Yes In My Backyard” committee — YIMBY — drew a large following on social media and support from Yelp CEO Jeremy Stoppelman. Trauss, who sued the East Bay city of Lafayette for scrapping a high-density apartment plan, is fixated on building housing, at all price levels — not the sort of policy that traditionally has attracted progressive backing in San Francisco.

To some political observers, that bullish emphasis on urban planning is the key to her candidacy.

“There’s a defining issue in every race, and in this one, it’s development,” said political consultant Jim Ross, noting that each District Six candidate will have to pick a side — keep the neighborhood the way it is, or pack it with tall, dense buildings.

Trauss, a SoMa resident, wants to spread that development pattern to the rest of the city, including the quiet west-side pockets where homeowners generally oppose height and population growth. The YIMBYs were enthusiastic supporters of west-side Supervisor Katy Tang’s “Home-SF” density ordinance, which allows developers to build taller structures in exchange for making 30 percent of the units affordable.

“All the population growth in San Francisco cannot be contained only in District Six,” Trauss said. “Other districts need to start building more. That’s going to be part of my legislative agenda.”

Such ideas earned Trauss an early endorsement from Democratic state Sen. Scott Wiener, perhaps the most prominent of San Francisco’s moderate officeholders after Mayor Ed Lee.

To older progressives such as former Mayor Art Agnos, the big challenge in District Six is preserving neighborhood character. But the district is among the least cohesive in the city, with the most newcomers. That may make it welcoming of Trauss and of another candidate whom Agnos is trying to draft — Sunny Angulo, who lives in the Western Addition and will have to move to District Six if she enters the race.

Angulo is also the challenger likely to inherit the support of the tenant advocates and leftist coalitions that backed Kim and previous District Six Supervisor Chris Daly. She worked for Kim and is currently the chief of staff to Supervisor Aaron Peskin, who steers the board’s progressive wing.

In Peskin’s office, Angulo has served as a behind-the-scenes architect of policies that would boost affordable housing stock and raise fees for developers — two primary aims of the city’s left.

“That area ... from Third Street to South Van Ness, which is currently one-, two- and three-story industrial buildings and auto body shops, that’s where all the action is going to be for the next 10 years,” Agnos said. “And the questions are: Will we build affordable housing in sufficient amounts to deal with the crisis we have today?”

Angulo, who has not yet decided whether she will be a candidate, said she would try to shield District Six tenants from Ellis Act evictions and real estate speculators. She would push for more parks and better Muni service, and ask that other neighborhoods pick up some of the social services that are concentrated in SoMa and the Tenderloin.

“In the years that I convened neighborhood meetings in District Six, people wanted social services in other parts of the city so that we weren’t absorbing all the burden,” she said.

The other candidate likely to vie for progressive votes is Matt Haney, a Board of Education member since 2012 who endeared himself to the left by working for school district changes he said would improve conditions for students of color. He pushed disciplinary policies in 2014 that cut down on suspensions and expulsions, and he introduced a resolution the next year to bring computer science into classrooms, particularly in low-income neighborhoods.

“I trust the work that Matt is doing,” said BART board Director Lateefah Simon, a close friend of Haney’s who began her career working with sexually exploited women in the Tenderloin.

To Simon, income inequality is the most salient issue in District Six. It’s also the great curse for anyone trying to run a campaign there.

“Whoever wins that race is going to have to create a unifying vision for the woman who works cleaning hotels and has four babies, and for the 22-year-old data scientist who makes $220,000 a year,” she said.

Haney, who lives in the Tenderloin, is wrestling with that vision.

“You have more venture capital coming into the two ZIP codes (in District Six) than anywhere else in the world,” Haney said. “And the question is, how do we harness that?”

Haney, however, also is undecided about whether to run. So far, Trauss’ only declared opponent is Jason Lee Jones, a longtime Tenderloin resident who works in a coffee shop.

As the district grows more affluent, political discussions are veering away from social issues like affordable housing and more toward the sort of quality-of-life issues that middle- and upper-class people care about — traffic jams, homelessness and clean sidewalks.

Those debates have given hope to moderates, who view the area as a swing district, even though it tilted left in the past five elections.

“What’s fascinating about this district is that it’s changed so much with all that construction happening South of Market and along the ballpark,” Ross said. “The more moderate voices have begun to see District Six as a place where they could get someone elected.”

But it’s unclear whether newer residents will show up to polling places or have as strong a presence as the multigenerational immigrant families in SoMa and the neighborhood activists in the Tenderloin.

Then there’s the specter of an intra-neighborhood battle, now that development is moving west into the heart of downtown.

While residents in the eastern areas of Rincon Hill and South Beach generally embraced density and height, the Planning Department’s new blueprint for central SoMa is running into opposition, said Jim Lazarus, senior vice president of public policy at the San Francisco Chamber of Commerce.

“The planning staff proposed higher heights in the central SoMa plan, and condo owners in that area are pushing back,” he said.

And District Six is right on the cusp of another big transformation: the Central Subway under construction along Fourth Street, where more development is planned along its route.

Such changes seem auspicious to Maggie Muir, a veteran consultant who ran campaigns for Wiener, District Attorney George Gascón and board President London Breed, and who now works for Trauss.

“You have a lot of new residents in that district,” Muir said. “I think the race is wide open.”

Rachel Swan is a San Francisco Chronicle staff writer. Email: rswan@sfchronicle.com Twitter: @rachelswan