Lee was a brilliant commander but hubris got the better of him.
not sure I would say hubris. Lee was out of tactical options by this time. A direct frontal assault, while fraught with risk, could work. Lee had the utmost confidence in the offensive power of his infantry. He may also have had some disdain for the staying power of Union infantry. His decision was a risk, but if successful, would have gained this strategic objective he hoped to achieve.
There was pride, and he did behave rather flamboyantly at times, mimicking bits of Renaissance etiquette and dress (the hat, the flourish, etc.). Can’t say that he was different from many others of his time in that respect, though. The resurgence of romanticism was popular with the stylish folks during the later half of the 1800s.
There was probably more than the fatal error of pride in warfare, though. He had undertaken a long and difficult journey with his men and might not have been in the best of health. The frustration of having gone so far before encountering the terrain, positions and difference in conditions of men (one side much more fatigued) must have been nearly overwhelming.
“Lee was a brilliant commander but hubris got the better of him.”
Lee most certainly was not guilty of hubris; the reason Lee lost at Gettysburg was that he tried to fight the battle as if he still had Jackson.