Take the free end in the remaining eight-inch black wire and join it on the black wire over the dimmer switch, using a wire connector.
You should definitely align the polarity of your extension towards the markings https://jemimacxqi627877.digiblogbox.com/54204685/the-5-second-trick-for-under-cabinet-lighting