If New York is, as the poet claims, a state of mind, San Francisco is the opposite: a precise afternoon in fall, a moment always on the verge of passing. In the postcard sense, it is the country’s most lastingly beautiful city. By other measures, though, it is—and always has been—a place of heedless, often ugly flux. San Francisco has no permanent Establishment, and the landscape is remolded regularly by whoever holds the dough. The city’s long-term residents, in turn, become adept at moving among world views as if entering and exiting friends’ homes. I sometimes think that this code-switching flexibility is most pronounced for those of us who were born in the eighties and the nineties, an odd interregnum between the counterculture and the new regime. Selfhood, for those of us who grew up in the city at that time, meant building private continuity across a landscape that could change its guiding stars from here to here.

“The Last Black Man in San Francisco,” directed by Joe Talbot and starring Jimmie Fails, is about being that kind of San Franciscan, and the film is so organic that the sensibility is built into its plot. Fails, playing a version of himself (I’ll call his on-screen character Jimmie), is, in the film, a young black man trying to build his adult life. He spent most of his youth out of the custody of his parents; now he’s crashing with his best friend, Mont (Jonathan Majors), who lives with his grandfather (Danny Glover) in a house near the historically low-income neighborhood of Bayview-Hunters Point. During daylight hours, the two friends traverse the city. Mont is gentle and peculiar, a poor young man who wears bow ties and dreams of being a playwright. Jimmie is easygoing, adaptive, and filled with ambition to prove his worth. Together, they make pilgrimages to a particular Victorian-style house in the Fillmore—tall and proud, with gardens and a big turret. The property is irresistible to Jimmie, who sneaks through the gate, climbs a ladder, and surreptitiously begins repainting the railings and the house’s trim.

The house, we’re told, was built by Jimmie’s grandfather. It was a statement of arrival when the Fillmore was a center of black middle-class life. Later, the family lost the property—they don’t talk about it, Jimmie’s father (Rob Morgan) tells him—and it whooshed up the vertiginous shaft of the real-estate market, out of reach. Now Jimmie frets over his family’s lost castle, to the annoyance of the current residents, a white baby-boomer couple, who themselves could not afford to buy it off the open market. When the woman’s parent dies, the home has to be liquidated, and the boomers are evicted by the estate. Jimmie sees an opportunity. He goes imploringly to realtors and mortgage brokers, with no luck. (The house costs in the millions; Jimmie lives hand-to-mouth.) In an effort to claim squatter’s rights, Jimmie moves into the house, with Mont, and spends weeks beautifying it, making it the home that he has always lacked.

“The Last Black Man in San Francisco” was funded in part by Kickstarter and was drawn from Fails’s own experience: he did grow up poor in the city, and his family did once live in such a house. In that sense, it’s a report on an African-American presence that truly is fading—the percentage of black residents in San Francisco is less than half what it was in 1970, and sits today around a measly six per cent—and it captures the experience of displacement, of travelling among spheres in which you have increasingly little say or stake and trying to blend in. At Sundance, the film won a directing award and a special-jury prize, and it captured viewers’ imaginations as a human window onto the city’s rocky transformation. Fails and Talbot have been friends since late childhood, when Fails was in a housing project and Talbot was living nearby, and they made the movie while living in Talbot’s parents’ home. Their film is frank not only in its portrait of the real-estate pressures that make San Francisco a shorthand for self-stifling unaffordability but in its reports on the habits and moods of the place. From the platinum-hued outdoor light to the rollicking skateboard rides across town, “The Last Black Man in San Francisco” feels of San Francisco, and its characters are vivid with the offbeat pursuits that give the city’s residents their bizarre glow. In the world of the film, as in real life, everyone is bound by a common anxiety, and the movie gently suggests that many middle-class San Franciscans can see aspects of their own displacement panic in the black experience of Jimmie Fails. The fear is not just that you’ll lose your place in town but that the place will lose all memory of you.

The film—the first for both Fails and Talbot—is not without moments of youthful heavy-handedness. But it is cinematically witty from the opening shot, which plays on the apocalyptic title, and the creators are sharp enough to see that Jimmie and Mont, the home preservationist and the writer, are engaged in the same project: trying to capture and inhabit worlds being lost. The screenplay is trustworthy on matters of class and race, in part because it treats both through a range of real experience. For a story tangled up with housing, it is slightly fuzzy on the nature of the Bay Area problem—but, to be fair, the causes of, and solutions to, this messy, large-scale problem remain very much a matter of debate. Problems of displacement and effacement in the Bay Area continue to intensify. Just this week, the Mercury News reported that working people are being priced out of apartments in Vallejo, an outer-ring city that people used to be displaced into. The Guardian found that gun homicides in the Bay Area have plummeted as property crime has soared—a shift from the crime patterns of urban under-privilege to those of urban over-privilege.

Though “The Last Black Man in San Francisco” offers no solutions, the effort Fails and Talbot put into making such a movie stands as a reminder that, even now, feelings of regional urban belonging haven’t been lost. The film resists the way that it will be read by many people, which is as a scolding parable of marginalization and decline. It reminds us that the experience of in-betweenness, of trying to navigate extremely different worlds with different views while trying to find your place along the way, has always been a part of San Francisco life. And it reminds us that maybe there’s even joy, art, and—a concept being lost—local community to be found along the way. At one point, Jimmie hears two cool girls on the bus complaining, with the received pieties that people use, about what San Francisco has become. He corrects them. “You don’t get to hate it unless you love it,” he explains.

Loss being a defining attribute of love, the threat of losing memory is as much a part of the romance of San Francisco as the bridges and the seven hills. Histories grow urgent as their landscapes fade away. I grew up on a hill of moderate grade opposite a large, multigenerational black family: the matriarch was the rearer of grandchildren and the trusted keeper of the neighbors’ spare keys. The house to our right belonged to a child psychologist; the guy to the left operated a ravioli business by the freeway. Not far away was a Zen bakery, a corner store run by brothers from Palestine, and a gym frequented by the types then known as yuppies. Naturally, that center couldn’t hold. Those days were my first glowing San Francisco moment. Luckily—and let’s not underplay the role of luck—they weren’t my last.