about the diode detector
The diode current isn't equal to the capacitor current, but in practice, they are very close. If you are already assuming an ideal diode, the model won't be made significantly worse by also neglecting the very small current through the resistor.

Why is the resistor current small? At whatever RF frequency this is operated, the capacitor is a much lower impedance path than the resistor. That is, \$Z_C \ll R\$. This must be true for the circuit to function as an envelope detector. Were it not, between each RF cycle, the capacitor would discharge significantly through the resistor, and the output voltage would ripple along with the RF input.

Of course, there is some current through the resistor, and this is what allows the circuit to detect the low points in the envelope. Without the resistor (or non-ideal leakage current in the resistor), then the output voltage could never decrease, and what you'd have is a peak detector.