Skip to content

Implement multi-field sorting and enhance transaction view features - #285

Merged
ali-ahnaf merged 4 commits into
mainfrom
develop
Jul 25, 2026
Merged

Implement multi-field sorting and enhance transaction view features#285
ali-ahnaf merged 4 commits into
mainfrom
develop

Conversation

@ali-ahnaf

@ali-ahnaf ali-ahnaf commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added search and flexible date/amount sorting for Recent Drops.
    • Added an AI transaction-entry preference with manual-entry fallback.
    • Added OpenRouter usage details and refresh controls to AI settings.
    • Added enhanced expense charts with legends, tooltips, and grouped series.
    • Added Gmail email subjects to pending expense items for easier identification.
    • Added navigation links for OpenRouter AI and Gmail Integration.
  • Updates

    • Simplified transaction handling by removing commit and discard actions.
    • Improved backup compatibility with the new preferences and transaction format.

@github-actions

Copy link
Copy Markdown
Contributor

Greetings, @ali-ahnaf. Thy scroll hath arrived unblemished — the runes align and no conflict bars the path. The council shall now convene over its contents, weighing each incantation by candlelight. Tarry a while, brave adventurer; we shall investigate and return to thee with our verdict.

@ali-ahnaf
ali-ahnaf merged commit 21babdd into main Jul 25, 2026
8 of 9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

The quest is sealed, @ali-ahnaf! Thy incantations have been woven into the main path. The realm grows stronger for thy contribution — accept the gratitude of this humble keeper of the codex. May thy commits forever merge cleanly, brave adventurer 💰

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7978a957-40da-4ef1-843e-d911872436a1

📥 Commits

Reviewing files that changed from the base of the PR and between 8cf790f and be0bd33.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (49)
  • packages/api/src/entities/Expense.entity.ts
  • packages/api/src/entities/PendingGmailExpense.entity.ts
  • packages/api/src/entities/UserPreference.entity.ts
  • packages/api/src/migrations/1784992988030-AddSubjectToPendingGmailExpenses.ts
  • packages/api/src/migrations/1784996635799-DropIsCommittedFromExpenses.ts
  • packages/api/src/migrations/1784997323581-AddAiTransactionEntryToPreferences.ts
  • packages/api/src/repositories/pending-gmail-expense.repository.ts
  • packages/api/src/routes/backup/import.route.ts
  • packages/api/src/routes/preferences/get-preferences.route.ts
  • packages/api/src/routes/preferences/put-preferences.route.ts
  • packages/api/src/routes/transactions.routes.ts
  • packages/api/src/routes/transactions/post-transaction-commit.route.ts
  • packages/api/src/routes/transactions/post-transaction-discard.route.ts
  • packages/api/src/routes/transactions/post-transaction.route.ts
  • packages/api/src/services/backup.service.ts
  • packages/api/src/services/gmail.service.ts
  • packages/api/src/services/pending-gmail-expense.service.ts
  • packages/api/src/services/preferences.service.ts
  • packages/api/src/services/transactions.service.ts
  • packages/api/src/tests/backup.service.test.ts
  • packages/api/src/tests/gmail.service.test.ts
  • packages/api/src/tests/pending-gmail-expense.service.test.ts
  • packages/api/src/tests/preferences.service.test.ts
  • packages/api/src/tests/transactions.service.test.ts
  • packages/shared/src/contracts/pending-expenses.ts
  • packages/shared/src/contracts/preferences.ts
  • packages/shared/src/contracts/transactions.ts
  • packages/ui/package.json
  • packages/ui/src/__tests__/Sidebar.test.tsx
  • packages/ui/src/app/page.tsx
  • packages/ui/src/app/settings/ai/UsagePanel.tsx
  • packages/ui/src/app/settings/ai/page.tsx
  • packages/ui/src/app/settings/google-oauth/page.tsx
  • packages/ui/src/app/settings/page.tsx
  • packages/ui/src/app/stats/page.tsx
  • packages/ui/src/components/DesktopSidebar.test.tsx
  • packages/ui/src/components/DesktopSidebar.tsx
  • packages/ui/src/components/LogResourceModal.test.tsx
  • packages/ui/src/components/LogResourceModal.tsx
  • packages/ui/src/components/Sidebar.test.tsx
  • packages/ui/src/components/Sidebar.tsx
  • packages/ui/src/components/VaultExpenseChart.test.tsx
  • packages/ui/src/components/VaultExpenseChart.tsx
  • packages/ui/src/components/index.ts
  • packages/ui/src/components/pending-expenses/PendingExpensesPanel.tsx
  • packages/ui/src/hooks/useDisplaySettings.ts
  • packages/ui/src/lib/ai/openrouter.test.ts
  • packages/ui/src/lib/ai/openrouter.ts
  • packages/ui/src/lib/chartPalette.ts

📝 Walkthrough

Walkthrough

The PR updates transaction persistence and backups, adds Gmail subject metadata to the pending-expense flow, introduces an AI transaction-entry preference and OpenRouter usage panel, improves settings navigation, and adds dashboard search, sorting, and vault expense charts.

Changes

Backend contracts and workflows

Layer / File(s) Summary
Schema and shared contracts
packages/api/src/entities/*, packages/api/src/migrations/*, packages/shared/src/contracts/*, packages/api/src/routes/*
Removes persisted transaction commitment state, adds recurring-source and preference fields, and extends pending Gmail expense contracts with subject metadata.
Pending Gmail subject flow
packages/api/src/services/gmail.service.ts, packages/api/src/services/pending-gmail-expense.service.ts, packages/api/src/repositories/*, packages/ui/src/components/pending-expenses/*
Captures nullable Gmail subjects, returns them in DTOs, and displays them with vault badges in the pending-expense panel.
Backup and transaction lifecycle
packages/api/src/services/backup.service.ts, packages/api/src/services/transactions.service.ts, packages/api/src/routes/transactions/*, packages/api/src/tests/*
Stops importing stored commitment state, exports compatibility values as committed, and removes commit/discard routes and service methods.

AI preferences and OpenRouter usage

Layer / File(s) Summary
AI entry preference and modal behavior
packages/ui/src/hooks/useDisplaySettings.ts, packages/ui/src/app/settings/page.tsx, packages/ui/src/components/LogResourceModal.tsx, packages/api/src/services/preferences.service.ts
Adds the AI transaction-entry preference and uses it to control AI and manual transaction-entry modes.
OpenRouter usage retrieval and display
packages/ui/src/lib/ai/*, packages/ui/src/app/settings/ai/*
Fetches key and credit usage from OpenRouter, handles partial failures, and renders loading, errors, refresh, and formatted usage values.
Settings navigation and credential forms
packages/ui/src/components/Sidebar*, packages/ui/src/components/DesktopSidebar*, packages/ui/src/app/settings/*
Adds AI and Gmail navigation links, improves nested route highlighting, removes duplicate settings links, and updates OAuth input metadata.

Dashboard and expense analytics

Layer / File(s) Summary
Recent Drops search and sorting
packages/ui/src/app/page.tsx
Adds normalized search across drop metadata, date/amount sorting, sort direction controls, tag filtering, and search-specific empty-state messaging.
Vault expense chart integration
packages/ui/src/components/VaultExpenseChart*, packages/ui/src/lib/chartPalette.ts, packages/ui/src/app/stats/page.tsx
Adds a lazy-loaded Recharts visualization with typed series data, legends, tooltips, bounded vault series, and an aggregated overflow series.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Comment @coderabbitai help to get the list of available commands.

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