[webui] move comments logic completely into webui