feat(timeline): add pulse animation for in-flight drag mutations

Allocation bars that have active optimistic overrides (post-drag,
awaiting server confirmation) now pulse subtly via animate-pulse.
The pending set is derived from the existing optimisticAllocations
map keys, requiring no additional state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 13:28:46 +02:00
parent 7a5e98e2e9
commit 1df208dbcc
386 changed files with 657 additions and 81650 deletions
@@ -520,6 +520,7 @@ function TimelineResourcePanelInner({
onInlineEdit,
scrollLeft,
containerWidth,
optimisticAllocations.size > 0 ? new Set(optimisticAllocations.keys()) : undefined,
)}
{filters.showVacations &&
renderVacationBlocks(
@@ -628,6 +629,7 @@ function renderAllocBlocksFromData(
onInlineEdit?: (allocationId: string, initialValues: { startDate: Date; endDate: Date; hoursPerDay: number }, barRect: DOMRect) => void,
scrollLeft = 0,
containerWidth = 1200,
pendingMutationIds?: ReadonlySet<string>,
) {
const OVERSCAN_PX = 10 * CELL_WIDTH;
const visibleLeft = scrollLeft - OVERSCAN_PX;
@@ -810,6 +812,7 @@ function renderAllocBlocksFromData(
? "opacity-30 z-[10]"
: "transition-[opacity] duration-75 z-[10]",
selectedAllocationSet.has(alloc.id) && "z-20",
pendingMutationIds?.has(alloc.id) && !isBeingDragged && "animate-pulse",
)}
style={{
left: segmentLeft + 2,