Timeline: crash fix + delete, extended grid, sidebar cleanup#4
Merged
Conversation
The leftover-sidebar change replaced the timeline's `startTime != null` guard
with `!unplaced`, so legacy/persisted blocks that have no startTime (previously
hidden) flowed into DayTimeline and crashed timeToMinutes ("undefined is not an
object (evaluating 'time.split')") on startup. Restore the guard: the timeline
shows only placed blocks that actually have a startTime; unplaced blocks still
route to the sidebar.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
…egen" - DayTimeline: hover ✕ on concept blocks deletes them straight from the timeline (new onDeleteConcept prop, wired to removeBlock in WeekPage) — no booking modal. Booked entries keep their existing edit/delete-via-modal flow. - DayTimeline: dynamic day extent. The grid now grows to fit blocks that start before 08:00 or end after 18:00 (e.g. overflow work, late meetings) instead of clipping them off-screen — start/end hours, labels, rows, blockTop/blockPx and the drag handlers all derive from the computed extent (default 08:00–18:00). - LeftoverSidebar: removed the per-chip "+ Toevoegen aan dag" and the "Alles +" bulk add; leftovers are now Boek or Negeer only. Auto-open reworked to a render-time state adjustment (no effect) to satisfy the hooks lint rule. Tests added for delete, grid extension, and the no-add sidebar. 1682 pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Started as a one-line crash hotfix, now also includes three timeline UX changes.
Crash fix
The app crashed on startup with
TypeError: undefined is not an object (evaluating 'time.split'). The leftover-sidebar work replaced the timeline'sstartTime != nullguard with!unplaced, so legacy/persisted blocks without astartTimereachedDayTimelineand crashedtimeToMinutes. Fix:filter(b => !b.unplaced && b.startTime != null).Delete from the timeline
Concept blocks now show a hover ✕ that removes them straight from the day (new
onDeleteConcept→removeBlock), no booking modal. Booked entries keep their edit/delete-via-modal flow.Extend the grid past 18:00
The timeline extent is now dynamic: it grows to fit blocks that start before 08:00 or end after 18:00 (overflow work, late meetings) instead of clipping them off-screen. Hour labels, rows, positioning and drag handlers all derive from the computed extent; defaults to 08:00–18:00.
Remove "+ Toevoegen aan dag"
The leftover sidebar's per-chip + and the Alles + bulk add are gone — leftovers are now Boek or Negeer only. Auto-open reworked to a render-time state adjustment (no effect) to satisfy the hooks lint rule.
Tests
1682 passing, typecheck clean. New coverage for the crash regression (null-startTime block excluded), timeline delete, grid extension, and the no-add sidebar.
🤖 Generated with Claude Code