Skip to content

Add fixed monthly expense grouping setting - #530

Open
Dustin-ONeil wants to merge 1 commit into
spliit-app:mainfrom
Dustin-ONeil:codex/fixed-expense-date-groups
Open

Add fixed monthly expense grouping setting#530
Dustin-ONeil wants to merge 1 commit into
spliit-app:mainfrom
Dustin-ONeil:codex/fixed-expense-date-groups

Conversation

@Dustin-ONeil

Copy link
Copy Markdown

Summary

Adds an opt-in group-wide setting to display expense date headers as fixed calendar-month buckets instead of the existing relative buckets.

By default, groups continue using the current behavior with labels like “This week”, “Earlier this month”, and “Last month”. When enabled, expenses are grouped by calendar month, which is more useful for recurring monthly expenses, roommates, and shared bills.

Changes

  • Added fixedExpenseDateGroups to Group with a default of false
  • Added a Prisma migration for the new field
  • Added a separate “Group settings” section in the group form
  • Kept the existing “Local settings” section and Active user selector unchanged
  • Extracted expense date grouping into a small helper module
  • Added fixed calendar-month grouping using UTC date parts from expense.expenseDate
  • Kept relative grouping behavior unchanged when the setting is disabled
  • Added tests for fixed monthly labels and UTC month handling

Testing

  • npm test
  • npm run check-types
  • npm run lint
  • Targeted Prettier check on touched files

Transparency Note

This is my first request using Codex 5.5 at highest enterprise setting for implementation help. I’m trying it out and I want to be transparent so reviewers can flag anything that feels off or low-quality.

@Dustin-ONeil Dustin-ONeil left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for common GPT-related issues and unnecessary bloat. Let me know whether this feels lightweight enough and covers the right use cases. I'm happy to redirect the implementation as needed

Ecklebe pushed a commit to Ecklebe/spliit that referenced this pull request Jul 19, 2026
Ecklebe pushed a commit to Ecklebe/spliit that referenced this pull request Jul 19, 2026
…#493 + spliit-app#530

api.test.ts and _app.test.ts (added by spliit-app#493) predate spliit-app#530's new required
fixedExpenseDateGroups field on GroupFormValues.
Ecklebe pushed a commit to Ecklebe/spliit that referenced this pull request Jul 19, 2026
Adds a generic import architecture (format registry + detection) with
Spliit-JSON as the first adapter, plus UI (upload dropzone, analysis/
progress/result views) and a batched tRPC import flow. This is what
lets you export a group as JSON from spliit.app (or any other Spliit
instance) and import it here as a new group - the two instances have
entirely separate databases, so this was previously not possible at
all (the 'Add group by URL' button only looks up groups in your own
instance, it was never a cross-instance fetch).

Conflict resolution notes:
- expense-form.tsx: pr-472's side was stale noise (identical logic to
  our merge-base for this exact block, just missing spliit-app#367's EVENLY-for-
  reimbursements fix and spliit-app#499's imageId-based document ids) - kept our
  current version entirely rather than porting anything from pr-472 here.
- create.procedure.ts: pr-472 intentionally changed groups.create's
  return shape from {groupId} to the full group object ({id, ...}) -
  its own new create-group.tsx UI code depends on this. Updated the
  stale test helpers (_app.test.ts, batch-api.ts) to match rather than
  reverting the shape.
- Dropped the unconditionally-registered 'debug' import format
  (formats/debug-format.ts + its fixture) - a manual-testing aid with
  zero test coverage of its own that would have shipped live in
  production with no gate, matching content starting with a literal
  'DEBUG_IMPORT'/'DEBUG_ERRORS' prefix. Low risk (it can only emit
  synthetic error messages, not fabricate real data) but provided
  nothing for us and no reason to ship it.
- process-batch.procedure.ts imported 'nanoid' directly, which is
  ESM-only and broke Jest ('Must use import to load ES Module').
  Replaced both call sites with this file's own randomId() (already
  the established replacement per the spliit-app#165 nanoid cleanup).
- The same recurring cross-PR staleness pattern hit twice more: the
  new import-group.procedure.ts's own createGroup() call and
  spliit-json.ts's own expense-mapping function both predated spliit-app#530's
  now-required fixedExpenseDateGroups/location fields - added both.
- spliit-json.test.ts's own test fixture caught this for real (not
  just gracefully skipped): 'should parse a valid export correctly'
  failed until spliit-json.ts set location on parsed expenses.

Verified: check-types clean, all 206 tests pass, and (given the
Turbopack/leaflet build failure found earlier wasn't caught by either
of those) a full 'npm run build' also completes successfully.
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