The surprising thing to me is the battery, made by a Japanese company, the charging system electronics, made in Arizona USA under the direction of the French company Thales, who is in turn in charge of power electronics for the 787, have all never been fully tested as an integrated package.
Word has it the NTSB, Boeing, Thales and the rest of the gang now have a bench setup where all the various bits will be wired together and put through the paces in hopes of finding what went wrong.
Was it battery abuse caused by or ignored by improper, inadequate, or shortsighted computer programming electrickery? That's where my money is.