chat view refactor