In the presence of crossed electric and magnetic fields, a graphene ribbon has chiral states running along sample edges and along boundaries between p-doped and n-doped regions. We here consider the scattering of edge states into interface states, which takes place wherever the pn interface crosses the sample boundary, as well as the reverse process. For a graphene ribbon with armchair boundaries, the evolution of edge states into interface states and vice versa is governed by the conservation of valley isospin. Although valley isospin is not conserved in simplified models of a ribbon with zigzag boundaries, we find that arguments based on isospin conservation can be applied to a more realistic modeling of the graphene ribbon, which takes account of the lifting of electron-hole degeneracy. The valley isospin of interface states is an important factor determining the conductance of a graphene pn junction in a quantizing magnetic field.