Longitudinal trials involving surgical interventions commonly have subject-specific intervention times, due to constraints on the availability of surgeons and operating theatres. Moreover, the intervention often effects a discontinuous change in the mean response. We propose a nonparametric estimator for the mean response profile of longitudinal data with staggered intervention times and a discontinuity at the times of intervention, as an exploratory tool to assist the formulation of a suitable parametric model. We use an adaptation of the standard generalized additive model algorithm for estimation, with smoothing constants chosen by a cross-validation criterion. We illustrate the method using longitudinal data from a trial to assess the effect of lung resection surgery in the treatment of emphysema patients.