Skip to content

Add SEMI_MONTHLY frequency and enhance recurring rule features#8

Merged
hasnaintypes merged 5 commits into
mainfrom
develop
Apr 21, 2026
Merged

Add SEMI_MONTHLY frequency and enhance recurring rule features#8
hasnaintypes merged 5 commits into
mainfrom
develop

Conversation

@hasnaintypes
Copy link
Copy Markdown
Owner

This pull request introduces significant enhancements to the recurring transaction system, both in the database schema and in the user interface. The main focus is on supporting more flexible recurrence patterns, including a new "semi-monthly" frequency and advanced monthly options. Several minor code cleanups and type simplifications are also included.

Recurring Transaction Enhancements

  • Added support for a new "SEMI_MONTHLY" frequency in the RecurringFrequency enum and schema, allowing transactions to recur on two specific days each month. (prisma/schema.prisma) [1] [2]
  • Expanded the RecurringRule model with new fields: semiMonthlyDay, weekOfMonth, lastDayOfMonth, and overrides, enabling more complex recurrence patterns such as "2nd Tuesday" or "last day of month". (prisma/schema.prisma)
  • Updated the transaction schema to include an optional scheduledDate and enforced a unique constraint on [recurringRuleId, scheduledDate] for better data integrity. (prisma/schema.prisma) [1] [2]

Recurring Transaction Form UI Improvements

  • Overhauled the recurring step in the transaction form to support:
    • Frequency selection including "bi-weekly" and "semi-monthly"
    • Interval input (hidden for bi-weekly and semi-monthly)
    • Day-of-week selection for weekly/bi-weekly
    • Two day pickers for semi-monthly
    • Monthly mode selector with options for specific day, day pattern (e.g., 2nd Tuesday), or last day of the month
    • Dynamic input fields based on selected frequency and mode
      (src/components/forms/transaction/steps/recurring-step.tsx) [1] [2] [3] [4]

Type and Code Cleanups

  • Removed unnecessary type assertions in several form components for cleaner and more maintainable code. (src/components/forms/accounts/account-form.tsx, src/components/forms/categories/subcategory-form.tsx, src/components/pages/(protected)/profile/edit-profile-section.tsx, src/app/(public)/blog/[slug]/page.tsx, src/components/pages/(protected)/splits/group-detail/spending-radar-chart.tsx) [1] [2] [3] [4] src/app/(public)/blog/[slug]/page.tsxL31-R31, [5]
  • Simplified value handling in select and form fields for better type safety and readability. (src/components/forms/transaction/steps/category-step.tsx, src/app/(public)/blog/page.tsx, src/components/pages/(protected)/splits/group-detail/expense-form-sheet.tsx) [1] [2] [3]

Add semiMonthlyDay, weekOfMonth, lastDayOfMonth, overrides fields to
RecurringRule. Add scheduledDate and unique constraint on Transaction
for duplicate detection.
Add SEMI_MONTHLY to frequency unions, semiMonthlyDay, weekOfMonth,
lastDayOfMonth, overrides to RecurrenceConfig and RecurringRule types.
Add schema refinements and skip/reschedule validation schemas.
…overrides

Extend calculateNextRunAt with SEMI_MONTHLY alternating days,
MONTHLY nth-weekday patterns (weekOfMonth), lastDayOfMonth mode,
and override handling for skipped/rescheduled occurrences.
…and enhanced UI

Router: pass new fields in create/update, add skipOccurrence and
rescheduleOccurrence procedures, expand recurringRule select in
list/getById queries.

Inngest: use scheduledDate for transaction date, anchor nextRunAt
computation to scheduled date, catch P2002 for duplicate prevention.

UI: add frequency presets (bi-weekly, twice a month), conditional
fields per frequency, monthly mode radio (specific day, day pattern,
last day of month).
Remove all no-unnecessary-type-assertion violations and convert
logical AND patterns to optional chaining across routers, forms,
and utility files to satisfy CI ESLint config.
@hasnaintypes hasnaintypes self-assigned this Apr 21, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
trackit-app Ready Ready Preview, Comment Apr 21, 2026 6:12am

@hasnaintypes hasnaintypes merged commit d892837 into main Apr 21, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant