Skip to content

Conversation

@mcbloch
Copy link

@mcbloch mcbloch commented Nov 29, 2025

While using the application I came across the desire to insert a new entry that would split another entry it inserted onto. I found #499, which looked like a reasonable way to solve the issue.

I am not deeply familiar with the codebase and all the possible edge cases so I hope the current solution is desirable. Otherwise do let me know so I can see how to adapt.

And of course if you don't like this feature or the way it works, do let me know.

Copilot AI and others added 4 commits November 27, 2025 22:26
Co-authored-by: mcbloch <12089026+mcbloch@users.noreply.github.com>
Co-authored-by: mcbloch <12089026+mcbloch@users.noreply.github.com>
Co-authored-by: mcbloch <12089026+mcbloch@users.noreply.github.com>
@almarklein
Copy link
Owner

Hi, thanks for your contribution!

So the workflow would kick in when a user either creates a new record, or when editing an existing record. I see two problems:

  • When creating a new record by clicking in the timeline and then dragging to select a time range for the new record, the snapping does not (yet) work. And even if it does, imagine creating a new record right before an existing one. It's easy to accidentally move it over the existing record. With the current solution, the new record would become too large, at the cost of the existing record.
  • Another issue is that if you do observe overlap, that you want to fix, you must make an edit to one of the records.

I guess my critique comes down to the fact that it changes a record implicitly, potentially unintentionally.

I would rather have a way for overlap to be detected and then for the user to explicitly click a button to fix it. One way could be in the timeline, but dynamically adding buttons there quickly becomes quirky. So what about this: the record dialog checks (on load, and when times are changed), whether there are overlapping records. If this is the case, it mentions at an extra line (just above the current buttons, or maybe even below?) And possibly it displays one button, that represents an action to change only the current record:

  • this record is fully inside another record: show that this is the case, but no button.
  • this record partially overlaps with another record: button shows "trim to remove overlap".
  • this record has another record (or multiple) fully inside: button shows "split to remove overlap"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants