We present a comprehensive discussion about the origin of the features in the leptonic component of the cosmic-ray spectrum. Working in the framework of a up-to-date CR transport scenario tuned on the most recent AMS-02 and Voyager data, we show that the prominent features recently found in the positron and in the all-electron spectra by several experiments are explained in a scenario in which pulsar wind nebulae (PWNe) are the dominant sources of the positron flux, and nearby supernova remnants shape the highenergy peak of the electron spectrum. In particular we argue that the drop-off in positron spectrum found by AMS-02 at ∼ 300 GeV can be explained -under different assumptionsin terms of a prominent PWN that provides the bulk of the observed positrons in the ∼ 100 GeV domain, on top of the contribution from a large number of older objects. Finally, we turn our attention to the spectral softening at ∼ 1 TeV in the all-lepton spectrum, recently reported by several experiments, showing that it requires the presence of a nearby supernova remnant at its final stage.