Shares of Rivian Automotive Inc. sank more than 7% in after-hours trading Tuesday after the electric-vehicle maker narrowed its quarterly loss but missed revenue expectations and revealed struggles with parts shortages and other manufacturing hiccups as it tried to ramp up production. Supply-chain problems continue to be “the main limiting factor of our production” and costs around expediting parts also took a toll, Rivian RIVN executives said in a letter to shareholders. In…