SPAs ch4.5 chat close & resize handling, TODO: improve resize and handle close from X button