Skip to content

Remove duplicate utility functions, reduce bundle size#18

Merged
pratikbodkhe merged 2 commits into
mainfrom
fix/reduce-bundle-redundancy
May 3, 2026
Merged

Remove duplicate utility functions, reduce bundle size#18
pratikbodkhe merged 2 commits into
mainfrom
fix/reduce-bundle-redundancy

Conversation

@pratikbodkhe
Copy link
Copy Markdown
Contributor

Summary

  • Created src/lib/date-utils.ts and src/lib/issue-utils.ts with shared utility functions
  • Replaced 12+ duplicate implementations of formatShortDate, daysBetween, daysSince, isOverdue, isOpen, isDateOverdue across 9 files
  • Removed duplicate useMeetings React Query subscription from the dashboard that was causing redundant network requests
  • Net result: -70 lines, fewer bundle duplicates, one fewer query on page load

Test plan

  • pnpm lint passes (0 errors)
  • pnpm tsc --noEmit passes
  • CI E2E suite passes (all date formatting and issue filtering behavior unchanged)
  • Dashboard loads with one fewer network request to meetings endpoint

Created src/lib/date-utils.ts (formatShortDate, daysBetween, daysSince,
isDateOverdue) and src/lib/issue-utils.ts (isOpen, isOverdue) to replace
12+ duplicate implementations across 9 files.

Also removes the duplicate useMeetings query subscription from the
dashboard, reducing redundant network requests on page load.
Buttons were conditionally rendered based on hover state, causing a race
where mouseLeave could unmount the remove button mid-click. Now the
buttons stay in the DOM and toggle via opacity + pointer-events instead.
@pratikbodkhe pratikbodkhe merged commit a738467 into main May 3, 2026
3 checks passed
@pratikbodkhe pratikbodkhe deleted the fix/reduce-bundle-redundancy branch May 3, 2026 05:58
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