Skip to content

refactor(web): open week event form via draft store - #2351

Merged
tyler-dane merged 1 commit into
mainfrom
refactor/openform-via-draft-store
Jul 24, 2026
Merged

refactor(web): open week event form via draft store#2351
tyler-dane merged 1 commit into
mainfrom
refactor/openform-via-draft-store

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Summary

  • Remove Week draft openForm action from the public DraftContext surface.
  • useGridMouseUp and WeekInteractionCoordinator open the form with draftActions.setFormOpen(true).
  • Internal create/submit/handleChange paths call setIsFormOpen(true) (already the store action).

Simplicity

Net reduction: one fewer DraftContext action, no new hooks. Form-open was already store-owned; this deletes the redundant Week wrapper.

Manual Testing Steps

  • Click empty timed grid → release → form opens.
  • Click an existing event → form opens with that event.
  • Drag-create a timed event → form opens after release.
  • Drag a saved event while its form was open, then release with a move → form reopens.

Test plan

  • bun test:web packages/web/src/views/Week/components/Draft/hooks/actions/useDraftActions.test.ts (9 pass)
  • bun run type-check:web-tests + web app tsc --noEmit
  • bun lint (pre-existing unused-import warning in __tests__/render-with-store.tsx from chore(web): cleanup stale code #2350)

Made with Cursor

Drop the Week draft openForm action; callers and internal paths use
draftActions.setFormOpen(true) directly since form-open is store-owned.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tyler-dane
tyler-dane merged commit 77eb64b into main Jul 24, 2026
19 checks passed
@tyler-dane
tyler-dane deleted the refactor/openform-via-draft-store branch July 24, 2026 03:48
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