Good effort !
If you're going to paint the shelves, then I'd fill in the gaps with decorator's caulk using a cartridge gun - this doesn't tend to be sandable but can be over-painted, so do it before you apply the top gloss coats and smooth it off with a wet finger, let it dry and then gloss...