More work on bug #8138.  Now the UI is mostly done.