Perhaps the best thing you can say about “Late Night,” Mindy Kaling’s comedy about the planned phasing-out of a long-time network talk show hostess and the new writing-room hire who’s instrumental in improving her chances to survive, is that it’s modest in its ambitions. But in comedy modesty is not always a virtue.

The real star of the show is Emma Thompson, a positive bulldozer as Katherine Newbury, who’s been doing a late-night program for nearly three decades but is now suffering from anemic ratings. A pushy new network head (Amy Ryan) informs her this is her last year on air; she’s planning on replacing her with a young stand-up comic (Ike Barinholtz) who specializes in gross-out jokes.

Katherine isn’t a lovable sort. Snippy and brusque, she treats her all-male writing staff with disdain, not even knowing their names (or being aware that one died long ago). They respond by providing her with unimaginative material, and her own inclination is to do serious interviews with serious guests, authors and the like. That stuff is not drawing an audience, and others argue that she’s simply out of touch with today’s tastes.

Still, encouraged by her supportive husband (John Lithgow), an academic suffering from Parkinson’s, she refuses to give up. Her long-time assistant (Denis O’Hare) suggests that one tack might be to hire a woman for the writing staff, which leads her without much thought to choose Molly Patel (Mindy Kaling), a completely inexperienced efficiency officer from a Pennsylvania chemical factory who’s always dreamed of working for Newbury. She represents a twofer, diversity-wise, though she appears to bring few if any other useful attributes with her, apart from her general daffy sweetness.

After a clumsy start—made only a bit smoother by some gestures of friendship from a few colleagues from the writing room, including a handsome fellow (Hugh Dancy) to whom she takes a special liking, Molly writes some edgier new material for Katherine, but she’s reluctant to use it. And Newbury’s attempt to expand her guest roster to make it more attractive to younger viewers stumbles when an appearance by a YouTube star turns into a disastrous confrontation.

What really appears to doom the chance at a comeback for Katherine, though, is the revelation of a once-upon-a-time infidelity that endangers her marital happiness: the combination of scandal and sagging ratings seems too damaging to overcome. Happily, things change for the better when Molly’s commitment to a little charity comedy benefit is instrumental in turning things around—not very plausibly, it must be said, but then a movie like this requires an upbeat ending, however unlikely the devices employed to get there.

“Late Night” is, of course, a fantasy, so one must be willing to swallow all sorts of plot elements that are clearly pie-in-the-sky, from the long-time presence of a female talk-show host on network television to the ability of a gee-whiz industry outsider to transform the culture of a long-time show staff simply with gestures like bringing cupcakes to work. (Certainly Katherine’s resurgence cannot be ascribed to the quality of her new material, which frankly seems no better than the old.) One can imagine the movie’s premise serving as the basis for an acerbic insider satire—something along the lines of “The Larry Sanders Show”—but that’s not Kaling’s style. Her script is basically nice and gentle, with even the villains getting off easily.

The result is bland, especially since it’s so flatly directed by Nisha Ganatra. Thompson tries desperately to spice things up with her irascibility, but Kaling remains so sweetly laid-back throughout that her Molly Patel comes off like a watered-down version of Mary Richards. And the other actors follow her lead. One doesn’t want the supporting figures to be played wildly over-the-top, but it would be nice if they were invested with some real personality. But when even John Lithgow is totally becalmed in sickly sentimentality, you know the film is in trouble. And the technical aspects of the picture—Elizabeth Jones’s production design, Matthew Clark’s cinematography, Eleanor Infante and David Rogers’ editing—are nondescript too.

“Late Night” is an example of a comedy that apparently wants to address real issues in the contemporary workplace but proves weak-kneed in doing so.