fix(ui): avoid rendering area more than u16::MAX (#7867)
### Description
Fix for #7843
### Testing Instructions
Verify that there is no longer a panic when persisting tasks with large
amount of lines e.g. `yes | head -n 1000`
(Waiting on user test to confirm fix works)
Closes TURBO-2735