Some took offense at the clap, with one person tweeting: “Nancy Pelosi’s sarcastic clap is a consummate example of the biggest breakdown in American society: lack of respect. We don’t have to agree, but we should #respect each other.” And another noted that if her gesture is now the official political clapback, “We Republicans can use it too.”

Observers accused Mr. Trump of rushing into his speech on Tuesday and not waiting for the speaker to introduce him, as if out of fear he would not get to talk at all. But Ms. Pelosi later said that he did not break protocol.

During his speech, Mr. Trump said, “Together we can break decades of political stalemate.” But many pundits wondered how long the comity would last.

To understand the rapturous response by the liberal wing of the Twittersphere to the speaker’s moves, it may help to recap how we got here.

Mr. Trump, 72, and Ms. Pelosi, 78, had fierce, public clashes since the 17-term representative returned as speaker in January, after the Democrats wrested back the House in bruising midterm elections last year.

The brewing rancor kicked off again on Jan. 23, when in the middle of the partial government shutdown, Ms. Pelosi sent a letter to the president suggesting that he delay his State of the Union address, set for Jan. 29, until after the government reopened.

The extraordinary request escalated the partisan battle over Mr. Trump’s demand for more than $5 billion to build a wall at the border with Mexico.