Commit Graph

1793 Commits

Author SHA1 Message Date
Juan José Mata
61fe75f06c Pre-fill login credentials in PikaPods demo site (#288)
* Gate demo credential prefills by host

* Business logic in controller

* Store demo config in Rails

* Proper check for demo settings

* Add demo banner

* Support hosts array

* Add demo.sure.am

* Nice rescue addition by CodeRabbit

---------

Co-authored-by: sokie <sokysrm@gmail.com>
2025-11-13 23:03:16 +01:00
Juan José Mata
3f1d1c0238 Prepare for v0.6.5-alpha.10
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-13 16:29:29 +01:00
Juan José Mata
5c6d9776c3 Edit to Spanish translation (#320) 2025-11-13 16:11:03 +01:00
Sergio Valero Cardona
dddea03d26 ADD: Additional ES locales (#294)
* ADD: Additional ES locales

* ADD: Initialize YAML structure for accounts and subscriptions locales

* FIX: Adjust line breaks in Spanish locale files for clarity
2025-11-12 20:02:14 +01:00
soky srm
e8f935bc6f Remove plaid initialiser (#317)
* Remove plaid initialiser

The initializer can be safely removed because:
  - Config is lazily loaded via Provider::Registry
  - reload_configuration is called after settings updates
  - All calling code handles nil configs gracefully
  - Initial nil state is fine - config loads on first use

* Fix for missing config

* Actually don't pollute application.rb

* Add currency loading for balances

* Fix race condition on lazy load

* Allow loans to be imported in lunch flow also

* Fix currency processor
2025-11-12 16:01:19 +01:00
soky srm
fad241c416 Fixes & Improvements (#316)
* Some improvements

- Fix issue with lunch flow accounts that were imported
- Remove the period comparison section from reports

* Add cleanup migration

* FIX for dynamic config

* Fix linter

* FIX settings setter

Reuse the base class’ atomic setter to leverage its locking and cache invalidation.

* Make upsert atomic

* Remove migration file

Signed-off-by: soky srm <sokysrm@gmail.com>

* Delete db/migrate/20251111094448_migrate_dynamic_fields_to_individual_entries.rb

Signed-off-by: soky srm <sokysrm@gmail.com>

* Fix cache reset

* Revert "Remove migration file"

This reverts commit 1f2a21ef58.

* Revert "Delete db/migrate/20251111094448_migrate_dynamic_fields_to_individual_entries.rb"

This reverts commit 29dcaaafb2.

* Fix Plaid initialiser

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
2025-11-11 19:51:07 +01:00
soky srm
7851e965ea Merge pull request #169 from alessiocappa/FIX-TextAreaIssue
Fix textarea display issue
2025-11-11 16:10:48 +01:00
Juan José Mata
fcf792b560 PostHog support (#313) 2025-11-11 16:06:08 +01:00
sokie
bae626a981 Revert "fix: Remove classes on field input to hide overflow and wrap texts"
This reverts commit 0b5e5b6a47.
2025-11-11 16:05:27 +01:00
sokie
6697987ed8 FIX properly handle textarea override 2025-11-11 16:05:18 +01:00
Juan José Mata
c47a790ad9 We tag alphas as latest now
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-11 11:07:06 +01:00
Mark Hendriksen
7f5cf4c082 Add 'all_time' period option to Period model (#279)
* Add 'all_time' period option to Period model

Introduces an 'all_time' period to the Period model, which spans from the family's oldest entry date to the current date. Includes tests to verify correct creation and date range calculation for the new period.

* Update test/models/period_test.rb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mark Hendriksen <hendriksen-mark@hotmail.com>

* Improve 'all_time' period fallback logic

Updates the 'all_time' period to use a 5-year fallback range when no family or entries exist, or when the oldest entry date is today. Adds tests to verify correct behavior for these edge cases.

* Update period.rb

---------

Signed-off-by: Mark Hendriksen <hendriksen-mark@hotmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-10 23:07:07 +01:00
soky srm
c6771ebaab Lunchflow fix (#307)
* Fix lunch flow pre-loading and UX

* Small UX fixes

- Proper closing of modal on cancel
- Preload on new account already

* Review comments

* Fix json error

* Delete .claude/settings.local.json

Signed-off-by: soky srm <sokysrm@gmail.com>

* Lunch Flow brand (again :-)

* FIX process only linked accounts

* FIX disable accounts with no name

* Fix string normalization

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-10 21:32:55 +01:00
Esteban Bermudez Aguirre
eae532714b Include Redis to local development requirements (#312)
This shows to a developer that Redis is needed for local development.
The application will fail to run on `bin/dev` if Redis is not running
and will give a proper error message, however we should include this to
make it explicitly clear.

Co-authored-by: esteban_ba <ebaguirre@citykinect.com>
2025-11-10 21:09:18 +01:00
Juan José Mata
805f8207a9 Change base image from bullseye to bookworm
No more `slim-bullseye` images?

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-10 15:53:01 +01:00
Juan José Mata
2a4a3865b2 Prepare for v0.6.5-alpha.8
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-10 15:37:12 +01:00
Juan José Mata
15c2dabdea Website!
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-10 15:35:51 +01:00
Dylan Corrales
28eeebd1eb budget_category: Drop override of subcategory? (#310) 2025-11-10 14:35:18 +01:00
soky srm
45e2f04d9e Fix Reports transactions breakdown (#309)
The build_transactions_breakdown method was including ALL transaction types (including transfers, CC payments, and one-time transactions)
  when calculating the breakdown, while the "Period Comparison" and "Trends & Insights" sections correctly exclude these transaction types.
2025-11-10 14:33:43 +01:00
soky srm
f882484bba Add transaction dedup support for CSV imports (#304)
* Support dedup for transaction also for CSV

* Fix to exclude CSV importing duplicates

* Guard nil account
2025-11-10 12:09:22 +01:00
soky srm
3611413829 Reccuring transactions pattern fix (#308)
* Fix pattern identification without merchants

- We already support the schema and data, but pattern identification now groups either per merchant or per transaciton name.

* Fix missed this view

* Fix update schema

* Wrong schema pushed
2025-11-10 12:02:43 +01:00
LPW
f98858cffc Upgrade Ruby version to 3.4.7 (#305)
* Upgrade Ruby version to 3.4.7

* Update Dockerfile as well

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-09 21:10:51 +01:00
Dylan Corrales
b28450841e PWA: Transaction UI Fixes (#283)
* PWA: Fix header display on screens smaller than tailwind md

Also makes the header not render if there aren't any transactions.
Mobile already did this, desktop didn't. Now it's consistent.

Fix #181

* PWA: Display category on `md`

* ERB: Align transaction amount column

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-08 19:23:54 +01:00
Mark Hendriksen
a8f5afc351 Add new settings sections and update tests (#278)
* Add new settings sections and update tests

Added 'Recurring', 'LLM Usage', and 'Providers' sections to the settings navigation in SettingsHelper. Updated system tests to include these new sections and added missing entries for 'Billing', 'Self-Hosting', 'Imports', and 'SimpleFin' to ensure test coverage matches the navigation.

* Fix tests

* fix test

* Restrict advanced settings to admin users

Added `admin_user?` and `self_hosted_and_admin?` helper methods. Advanced settings menu items now require admin privileges, and self-hosting settings require both self-hosted and admin status.

* Show admin-only settings links for admin users

Moved admin-specific settings links to be conditionally added only for admin users in the settings system test. This ensures that non-admin users do not see admin-only settings options during tests.

* Update settings_test.rb

* Update settings_test.rb

* Update en.yml

* Update settings_helper.rb

* Update settings_test.rb

* Update settings_test.rb

* Rename 'Recurring Transactions' to 'Recurring' in settings

Revert the label 'Recurring Transactions' to 'Recurring' in the settings navigation, locale file, and related system test to simplify terminology and improve consistency.

* Minor formatting update in settings test

No functional changes; adjusted whitespace in the admin settings links array for consistency.

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-08 13:54:56 +01:00
Dylan Corrales
b533a9b9b7 PWA: DS::Menu - Place below button and center (#291)
* PWA: Floating Menu - Place below button and center

* PWA: menu_controller.js: null safety checks
2025-11-08 13:50:42 +01:00
Juan José Mata
e065c98396 Revert "Make bin/rails test pass in Dev Container" to avoid side-effects (#302)
* Revert "Add dummy PLAID_CLIENT_ID and PLAID_SECRET to env (#165)"

This reverts commit 617876f140.

* Make sure Plaid tests pass withtout ENV requirements
2025-11-07 19:53:31 +01:00
soky srm
ef418c6063 Merge pull request #281 from DeathCamel58/merchants-settings-list-all
Merchants: Display all merchants on Settings page
2025-11-07 13:21:46 +01:00
Dylan Corrales
706c3a9f1c PWA: Scale theme picture evenly (#295)
Don't just stretch it to a certain height
2025-11-05 19:29:54 +01:00
soky srm
d9f8d064af Implement Reporting tab (#276)
* First reporting version

* Fixes for all tabs

* Transactions table

* Budget section re-design

* FIX exports

Fix transactions table aggregation

* Add support for google sheets

Remove pdf and xlsx for now

* Multiple fixes

- Trends & Insights now follows top filter
- Transactions Breakdown removed filters, implemented sort by amount.
- The entire section follows top filters.
- Export to CSV adds per month breakdown

* Linter and tests

* Fix amounts

- Correctly handle amounts across the views and controller.
- Pass proper values to do calculation on, and not loose precision

* Update Gemfile.lock

* Add support for api-key on reports

Also fix custom date filter

* Review fixes

* Move budget status calculations out of the view.

* fix ensures that quarterly reports end at the quarter boundary

* Fix bugdet days remaining

Fix raw css style

* Fix test

* Implement google sheets properly with hotwire

* Improve UX on period comparison

* FIX csv export for non API key auth
2025-11-05 14:54:45 +01:00
Dylan Corrales
9b6ec259bd Show settings pages on md (#284)
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-05 12:42:44 +01:00
Juan José Mata
48b1062274 Update version to 0.6.5-alpha.7
Prepare for next alpha

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-05 12:20:53 +01:00
soky srm
164fe5375d FIX Read-Modify-Write issue with dynamic fields (#290)
* FIX Read-Modify-Write issue with dynamic fields

Ruby caching + queueing updates might cause some dynamic fields to not be updated.

* Small fix for true dynamic fields

* Add suite of tests for new settings page

* Treat nil values as deletions to keep the hash clean

* Test fix
2025-11-05 12:19:33 +01:00
Dylan Corrales
b4e4c37834 Rules: Alphabetize <select>s in new rule form (#280)
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-04 23:15:35 +01:00
Dylan Corrales
2064d7e374 Confirmation Emails: Add way to resend (#287)
* Add way to resend confirmation email.

* Resend confirmation email if user sets it to the same as pending

* I10n: No pending email change
2025-11-04 23:11:26 +01:00
Juan José Mata
6f1b651b80 Match pg in dev container and example.compose.yml
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-04 20:34:01 +01:00
Dylan Corrales
f883a06325 ERB: Fix bad HTML (#282)
* ERB: Close `div`s that were left open

* ERB: Remove unmatched `</div>`

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-04 19:13:04 +01:00
J4ker
749bcda871 Update Dockerfile - procps (#286)
* Update Dockerfile - procps

install procps for worker container healthcheck - pgrep

Signed-off-by: J4ker <56275036+J4ker@users.noreply.github.com>

* Good idea, adding it to dev container

---------

Signed-off-by: J4ker <56275036+J4ker@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-04 19:09:49 +01:00
Mark Hendriksen
fe5e60d898 Update styles for LLM usage filter form (#285)
* Update styles for LLM usage filter form

Enhanced the appearance of the start and end date fields and the filter button by applying new background and text color classes for better UI consistency.

* Replace filter submit button with DS::Button component

Updated the filter form's submit button to use the DS::Button component with secondary variant and medium size for improved consistency with design system.

* Improve calendar picker icon visibility in dark mode

Added CSS to invert the calendar picker icon for date inputs when in dark mode, ensuring better visibility and consistent user experience.

* Add newline at end of application.css

Appends a newline to the end of application.css to follow POSIX standards and improve compatibility with some tools.

* Move date picker dark mode fix to separate CSS file

Extracted the dark mode calendar picker icon fix from application.css into a new date-picker-dark-mode.css file for better organization and maintainability. Updated application.css to import the new file.
2025-11-04 19:08:43 +01:00
Juan José Mata
2fb08f428a Merge branch 'main' into pr/DeathCamel58/281 2025-11-04 17:23:19 +00:00
Juan José Mata
6ace7d9e97 Update brakeman gem from 7.1.0 to 7.1.1
Fix workflows

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-04 17:46:26 +01:00
Dylan Corrales
ce73459f08 Update comment 2025-11-04 09:03:57 -05:00
Dylan Corrales
c49832a401 Merchants: Display all merchants on Settings page 2025-11-04 08:09:57 -05:00
Juan José Mata
8860450e90 Add delay after disabling AI Assistant
Added a sleep delay to ensure the AI Assistant is properly disabled before asserting the path and user state.

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-01 10:25:14 +01:00
Juan José Mata
0327552a9a Avoid auto-categorizing without user categories (#261) 2025-11-01 10:15:56 +01:00
Albert Solà
dfe60fa07d Localization for an accountable group and sidebar (#257)
* Providers factory (#250)

* Implement providers factory

* Multiple providers sync support

- Proper Multi-Provider Syncing: When you click sync on an account with multiple providers (e.g., both Plaid and SimpleFin), all provider items are synced
- Better API: The existing account.providers method already returns all providers, and account.provider returns the first one for backward compatibility
- Correct Holdings Deletion Logic: Holdings can only be deleted if ALL providers allow it, preventing accidental deletions that would be recreated on next sync
TODO: validate this is the way we want to go? We would need to check holdings belong to which account, and then check provider allows deletion. More complex
- Database Constraints: The existing validations ensure an account can have at most one provider of each type (one PlaidAccount, one SimplefinAccount, etc.)

* Add generic provider_import_adapter

* Finish unified import strategy

* Update app/models/plaid_account.rb

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: soky srm <sokysrm@gmail.com>

* Update app/models/provider/factory.rb

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: soky srm <sokysrm@gmail.com>

* Fix account linked by plaid_id instead of external_id

* Parse numerics to BigDecimal

Parse numerics to BigDecimal before computing amount; guard nils.

Avoid String * String and float drift; also normalize date.

* Fix incorrect usage of assert_raises.

* Fix linter

* Fix processor test.

* Update current_balance_manager.rb

* Test fixes

* Fix plaid linked account test

* Add support for holding per account_provider

* Fix proper account access

Also fix account deletion for simpefin too

* FIX match tests for consistency

* Some more factory updates

* Fix account schema for multipe providers

  Can do:
  - Account #1 → PlaidAccount + SimplefinAccount (multiple different providers)
  - Account #2 → PlaidAccount only
  - Account #3 → SimplefinAccount only

  Cannot do:
  - Account #1 → PlaidAccount + PlaidAccount (duplicate provider type)
  - PlaidAccount #123 → Account #1 + Account #2 (provider linked to multiple accounts)

* Fix account setup

- An account CAN have multiple providers (the schema shows account_providers with unique index on [account_id, provider_type])
  - Each provider should maintain its own separate entries
  - We should NOT update one provider's entry when another provider syncs

* Fix linter and guard migration

* FIX linter issues.

* Fixes

- Remove duplicated index
- Pass account_provider_id
- Guard holdings call to avoid NoMethodError

* Update schema and provider import fix

* Plaid doesn't allow holdings deletion

* Use ClimateControl for proper env setup

* No need for this in .git

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>

* Update pages/dashboard locales (#255)

* Localization for an accountable group and sidebar

- Added localization for account types
- Updated account localization for en and ca

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: soky srm <sokysrm@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-01 10:15:33 +01:00
soky srm
e290e3d4a1 Recurring transactions (#271)
* Implement recurring transactions support

* Amount fix

* Hide section when any filter is applied

* Add automatic identify feature

Automatic identification runs after:
  - CSV Import completes (TransactionImport, TradeImport, AccountImport, MintImport)
  - Plaid sync completes
  - SimpleFIN sync completes
  - LunchFlow sync completes
- Any new provider that we create.

* Fix linter and tests

* Fix address review

* FIX proper text sizing

* Fix further linter

Use circular distance to handle month-boundary wrapping

* normalize to a circular representation before computing the median

* Better tests validation

* Added some UI info

Fix pattern identification, last recurrent transaction needs to happened within the last 45 days.

* Fix styling

* Revert text subdued look

* Match structure of the other sections

* Styling

* Restore positive amounts styling

* Shorten label for UI styling

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-01 09:12:42 +01:00
soky srm
106fcd06e4 Lunch flow improvements (#268)
- Add support to link existing account with lunch-flow
The account will be promoted to a lunch flow connection now
( TBD if we want to allow un-linking? )
- Add support for proper de-dup at provider import level. This will handle de-dups for Lunch Flow, Plaid and SimpleFIN
- Fix plaid account removal on invalid credentials
2025-10-31 13:29:44 +01:00
soky srm
da114b5b3d Update ai.md (#263)
* Update ai.md

Change some deprecated models

Signed-off-by: soky srm <sokysrm@gmail.com>

* Fix typo in AI model description

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>

---------

Signed-off-by: soky srm <sokysrm@gmail.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-30 23:38:14 +01:00
soky srm
369ae8a6da Fix "invisible" merchants (#262)
- Fix display issues on the settings -> merchants page.
Currently it was showing only user created merchants, not provider created ones.
  - SimpleFin had its own MerchantDetector class that directly called ProviderMerchant.find_or_create_by!
  - This was inconsistent with Plaid and Lunchflow which use the centralized import_adapter.find_or_create_merchant method
  - Different unique keys: SimpleFin used source + name, others used source + provider_merchant_id
2025-10-30 21:30:20 +01:00
soky srm
5eadfaad98 Lunchflow integration (#259)
* First pass lunch flow

* Fixes

- Fix apikey not being saved properly due to provider no reload support
- Fix proper messages if we try to link existing accounts.

* Fix better error handling

* Filter existing transactions and skip duplicates

* FIX messaging

* Branding :)

* Fix XSS and linter

* FIX provider concern

- also fix code duplication

* FIX md5 digest

* Updated determine_sync_start_date to be account-aware

* Review fixes

* Broaden error catch to not crash UI

* Fix buttons styling

* FIX process account error handling

* FIX account cap and url parsing

* Lunch Flow brand

* Found orphan i18n strings

* Remove per conversation with @sokie

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-30 14:07:16 +01:00