A Japan Airlines Boeing 787, like this one seen last July in Boston, was temporarily grounded Tuesday after a mechanic spotted smoke coming from the craft’s battery compartment.