The battle to avoid a government shutdown with a budget deal between the White House and the Democrats has been smoldering since September. The key stumbling block has been immigration. But Tuesday that battle exploded after, (what else?), another tweet from President Donald Trump:

"Chuck & Nancy" of course are Senate Minority Leader Chuck Schumer and House Minority Leader Nancy Pelosi. And when they saw that tweet, they announced they weren't going to a scheduled meeting with the president on a budget bill that needs to be passed by December 8th or there will be a government shutdown.

Bad move.

To be specific, both of them recently started down a path of playing hard ball with President Trump over their demands for including an extension of the so-called "Dream Act" or "DACA" in the government funding bill. That is the Deferred Action for Childhood Arrivals that President Trump has called for reforming before he agrees to continue it.

So far so good, because the polls show the so-called "Dreamers" and any government protection of them is extremely popular with the American people. So what do Schumer and Pelosi have to lose by going to the mat against President Trump on this issue?

It turns out, the answer is: "A lot."

You see, it's one thing to tell a pollster you favor government protections for the children of illegal immigrants who have finished high school or served in the military with no criminal record. But the answers will be a lot different if pollsters ask the American people if they favor preserving those protections without any additional border security, and at the expense of a government shutdown that could last indefinitely.

Virtual signaling is easy, when it comes at no actual advertised price.

The other reason why this is a bad move for the Democrats is that there's no lock on who will take the blame if a shutdown occurs. The last time a government shutdown seemed somewhat likely was back in April, and polls taken at that time showed that voters found almost no issue was worth shutting down the government. And Democrats were seen as being more opposed to a possible shutdown than Republicans.

The Democrats and most of the news media will work hard to present any looming or actual shutdown as President Trump's and the Republicans' fault. But that's a dice roll, especially when President Trump's inevitable tweets making the opposite argument will get at least equal time in front of the public.

It's not that the Democrats don't have a legitimate beef here. President Trump originally seemed to endorse a continuation of DACA simply in return for more general border security spending and a focus on deporting criminals. Then, he moved the goal posts by putting the border wall specifically back on his list of demands along with provisions against sanctuary cities and new rules on refugees.

But they need to be very careful of using a nuclear shutdown option. And declining to even meet with President Trump Tuesday doesn't look like something people truly wanting to avoid a shutdown would do, even if it comes after a provocative tweet. The Democrats have a lot to gain by looking tougher and above the Trump Twitter fray. Backing out of the meeting did not accomplish that.

The smarter thing to do would be to go into these meetings with the president promising to negotiate based on what the White House published about DACA the first time. Using not just President Trump's tweets, but an official White House statement on the issue is a much more effective way of pushing back than simply not showing up.

By staying away, Schumer and Pelosi have handed President Trump a potential win as this shutdown battle looms ever closer.

They can still remain relatively obstinate during actual negotiations with the president and congressional Republicans. This is a battle the Democrats can win for themselves and for those who want to find a way to beat back any tougher restrictions on immigration. But ditching a meeting is what we call "bad optics." And those optics will get worse if the government actually does shut down next month as we get closer to Christmas.

Commentary by Jake Novak, CNBC.com senior columnist. Follow him on Twitter @jakejakeny.

For more insight from CNBC contributors, follow @CNBCopinion on Twitter.