state api and visual in toc for chapter completion