The Democratic Party’s eight months of internal debate, recriminations and soul searching that followed Donald Trump’s win and Kamala Harris’ loss in last year’s presidential duel got another jolt last month, when an otherwise obscure 33-year-old state legislator finished first in New York City’s mayoral primary.

Many Democratic leaders have concluded that Trump’s win was rooted in the image of their party reflecting priorities of college-educated coastal elitists rather than everyday issues affecting blue-collar families, such as inflation, crime and immigration.

The remedy, many concluded, lies in turning a bit to the right, downplaying such issues as climate change and paying more attention to bread-and-butter concerns.

However, the surprise primary win in New York by declared “democratic socialist” Zohran Mamdani, making him the favorite to become mayor of the nation’s largest city, creates a new wrinkle in the Democrats’ post-election debate.

Mamdani stressed the cost of living and other working class issues, promising that if elected he would make life easier for New Yorkers. He’s advocated for rent freezes, increases in minimum wages and having the city open its own grocery stores to drive down food costs.

Mamdani’s emergence as a new party leader with a pronounced left-of-center campaign resonates a continent away in California, a one-party state whose dominant Democrats are often divided along ideological lines, pitting Mamdani-like progressives against business-oriented moderates.

In the main, progressives have been losing ground to the mods, even in the San Francisco Bay Area, the bluest region in a deep-blue state. Daniel Lurie’s recent election as mayor of San Francisco, on pledges to balance the city’s deficit-ridden budget and crack down on street crime, is one indication of that trend. The recall or rejection of other Bay Area progressive officeholders in recent elections is another.

As the political website Politico noted recently, “Zohran Mamdani’s rise in New York enraptured progressives across the country. But for activists in San Francisco, it’s a sobering reminder of just how far they’ve fallen in this onetime bastion of progressivism.”

The conflict is also very evident in the state Capitol, with the political arc of Gov. Gavin Newsom a pithy example.

While running for governor in 2018 Newsom — the former mayor of San Francisco — paddled his political canoe to the left, embracing such leftist iconic causes as single-payer health care.

However, over the next six years Newsom slowly drifted rightward in policy terms, calling for tougher attitudes toward encampments of homeless people, dispatching Highway Patrol officers to fight street crime and, most recently, opposing transgender women competing in women’s sports.

Newsom even dropped his advocacy of single-payer health care in favor of wider coverage by the state’s Medi-Cal program, then sought to cut back on that coverage to close a state budget deficit this year.

As Newsom distanced himself from the progressive agenda — perhaps to make himself more viable as a presidential candidate in 2028 — its advocates found that the Legislature became less amenable as well. Progressive agenda bills could often gain passage in one legislative house only to die, almost always without any formal votes, in the other house.

Last year’s election also indicated that while California is a blue state, it’s nowhere close to embracing the democratic socialist program. Not only did Trump do surprisingly well against Kamala Harris in California’s presidential voting, but voters passed Proposition 36, an anti-crime measure that most Democratic leaders, including Newsom, opposed as a regression from criminal justice reforms.

This week’s passage of two Newsom-backed bills to overhaul the California Environmental Quality Act over the opposition of major environmental groups was another indication that, if anything, California’s politics are drifting slowly rightward.

Dan Walters is a CalMatters columnist.