[frontend] Overlay logic