This article is part of David Leonhardt’s newsletter. You can sign up here to receive it each weekday.

Senate Democrats and the Trump administration seem to be on the verge of a compromise agreement on a stimulus bill. We’ll find out more about the details of that deal as the day goes on. This morning, I want to spend a moment on the lessons of the political debate about the stimulus over the last few days.

There were two key facts: Congressional Republicans produced a deeply flawed stimulus bill. Congressional Democrats did a deeply flawed job of managing the politics of that same bill.

The bill that Senate Republicans produced over the weekend was problematic in multiple ways. It appeared likely to do only a mediocre job of slowing the spread of the virus, halting the economic downturn and protecting American democracy. Consider:

The bill contained no guaranteed aid to state governments, as Mike Konczal of the Roosevelt Institute noted — and state aid is one of the most effective forms of economic stimulus.

“The help for small businesses fell grievously short,” Steven Rattner explained in The Times.

The bill would allow corporations “to fire people while still taking bailout money,” as Business Insider’s Linette Lopez wrote — meaning unemployment could spiral.

The bill would “deny aid to many nonprofit institutions like nursing homes and group homes for the disabled,” my colleague Paul Krugman wrote.

The bill did little to make sure the country can hold an election this November even if in-person voting is impossible in some places.

Most notoriously, the bill included a $425 billion fund for businesses that Treasury Secretary Steven Mnuchin could “do basically whatever he’d like with,” Amanda Fischer of the Washington Center for Equitable Growth explained.

Given all of these flaws, you might think that the Democrats would be winning the political debate over the bill. They weren’t. The news yesterday was full of blaring headlines about Democrats blocking an emergency bill at a time when the country is clearly in crisis. The Democrats looked like the ones standing in the way of an urgent piece of legislation.