"Add sleep" actually extends the selected sleep record

Select sleep record > press the pencil icon > select add sleep (before).
A new record is created.

My request would be, when you want to extend your sleep record (before or after), the already existing record is extended, and no new record is created.

E. G.
Sleep record exists between 00:00 and 7:00.
7 hours sleep are accounted for.
Edit sleep
Add sleep record from 23:00 to 00:00
The updared sleep record will be 8 hours, from 23 to 7

Thank you!