[demo UI] Quick refactor of result title computing