Skip to content

refactor(web): extract draft resize transition - #2545

Merged
tyler-dane merged 1 commit into
mainfrom
refactor/extract-draft-resize-logic
Aug 1, 2026
Merged

refactor(web): extract draft resize transition#2545
tyler-dane merged 1 commit into
mainfrom
refactor/extract-draft-resize-logic

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Summary

Moves draft-resize date math and edge-flip behavior out of useDraftActions into a pure transition helper.

Simplicity

The hook now owns gesture wiring and state effects; the 160-line date transition is isolated, direct to test, and reusable without React.

Automated validation

Added focused coverage for ordinary timed resize, both edge crossover directions, all-day resize, and cross-day rejection.

Independent review

Fresh review found missing all-day/reverse-flip regression coverage; those tests were added. No behavioral defects were confirmed.

Test plan

bun run test:web -- packages/web/src/views/Week/components/Draft/hooks/actions/draft-resize.util.test.ts packages/web/src/views/Week/components/Draft/hooks/actions/useDraftActions.test.ts

bun run type-check

bun run lint

bun run knip

@tyler-dane
tyler-dane merged commit 4508a52 into main Aug 1, 2026
20 checks passed
@tyler-dane
tyler-dane deleted the refactor/extract-draft-resize-logic branch August 1, 2026 21:11
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.

1 participant