Skip to content

[codex] fix dragged event duration collapse#1699

Merged
Uarmagan merged 1 commit intomainfrom
codex/fix-drag-duration-collapse
Apr 30, 2026
Merged

[codex] fix dragged event duration collapse#1699
Uarmagan merged 1 commit intomainfrom
codex/fix-drag-duration-collapse

Conversation

@Uarmagan
Copy link
Copy Markdown
Contributor

Summary

  • Preserve an event's existing duration when the first drag movement happens before drag metadata is initialized.
  • Add a small regression test for the drag-duration fallback.

Root cause

The first drag update could run before drag status had recorded the event duration. The old fallback used 0 minutes, so the event could be saved with a collapsed end time. The UI then rendered it as a tiny event when the week was reloaded, which also triggered the small-event font size.

Validation

  • NODE_ENV=test TZ=Etc/UTC bun test src/views/Calendar/components/Draft/hooks/actions/useDraftActions.test.ts src/views/Calendar/components/Draft/hooks/effects/useDraftEffects.test.ts src/views/Calendar/components/Draft/hooks/actions/submit.parser.test.ts
  • bunx biome check packages/web/src/views/Calendar/components/Draft/hooks/actions/drag-duration.util.ts packages/web/src/views/Calendar/components/Draft/hooks/actions/useDraftActions.test.ts packages/web/src/views/Calendar/components/Draft/hooks/effects/useDraftEffects.test.ts
  • bun run test:web
  • bun run lint (passes with existing repo warnings)

Notes

  • bun run type-check currently fails on origin/main with tsconfig.json(62,27): error TS5103: Invalid value for --ignoreDeprecations; this PR does not change that config.

Closes #1698

@Uarmagan Uarmagan merged commit 35fbcf1 into main Apr 30, 2026
9 checks passed
@Uarmagan Uarmagan deleted the codex/fix-drag-duration-collapse branch April 30, 2026 01:43
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.

Font sizes, times, and event dimensions are incorrect after DNDing

1 participant