Commit Graph

923 Commits

Author SHA1 Message Date
Juan José Mata
d47aa2fe90 PWA offline error page + login page cleanup (#327)
* Add friendly PWA offline error page

When the PWA fails to connect to the server, users now see a branded
offline page with a friendly "technical difficulties" message, the
app logo, and a reload button. The page automatically attempts to
reload when connectivity is restored.

Changes:
- Created public/offline.html with branded offline experience
- Updated service worker to cache and serve offline page on network failures
- Added service worker registration in application.js
- Service worker now handles navigation requests with offline fallback

* Extract PWA offline logo to separate cached asset

Move the inline SVG logo from offline.html to a separate file at
public/logo-offline.svg. This makes the logo asset easily identifiable
and maintainable, as it may diverge from other logo versions in the future.

Changes:
- Created public/logo-offline.svg with the offline page logo
- Updated service worker to cache logo as part of OFFLINE_ASSETS array
- Updated fetch handler to serve cached offline assets
- Updated offline.html to reference logo file instead of inline SVG

* Update offline message for better readability

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

* CodeRabbit comments

* Keep 40x and 50x flowing

* Dark mode

* Logo tweaks

* Login/sign up cleanup

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-16 21:12:48 +01:00
Juan José Mata
65bd9e813a Support category .csv import (#326)
* Allow category imports to set icons

* Linter

* Update category import description in English locale

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

* Rename icon in CSV header to `lucide-icon`

* Make sure we export the icon while we're at this

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-15 19:00:52 +01:00
Matthew Kilpatrick
ff43e71dec Fix Yahoo minor unit handling (#335)
Some security prices get returned in non-standard minor units (eg. `GBp` for Great British Pence, instead of `GBP` for Great British Pounds), leading to incorrect handling of the returned price data.

This commit adds conversion logic for the two currencies I've been able to find examples of this affecting.
2025-11-15 18:34:22 +01:00
Mark Hendriksen
4475d85ab2 Update index.html.erb (#337) 2025-11-15 18:27:16 +01:00
Alessio Cappa
b16857b040 UI Improvements for Ouflows Section (#334)
* feat: Improve categories list in outflows section

* feat: align bg containers in home page sections

* Revert "feat: align bg containers in home page sections"

This reverts commit 62ad36f23e.

* Revert "feat: Improve categories list in outflows section"

This reverts commit 4b6cb66843.

* feat: Improve categories list in outflows section

* feat: align bg containers in home page sections

* feat: reduce padding and align styling between outflows and assets sections

* feat: add number of categories and translations

* fix: Adjust Outflows header width for mobile
2025-11-15 16:29:50 +01:00
Alessio Cappa
00086bdca0 Fix title overflow issue in chats (#331)
* fix: Truncate title in chats view if too long

* Add hover

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-15 10:17:25 +01:00
Juan José Mata
3c8ba643a0 Cashflow should use default period (and related) (#328)
* Fix cashflow and outflows widgets to respect user's default period preference

Resolves issue #118 where the Cashflow and Outflows widgets on the dashboard
were hardcoded to use a 30-day period instead of respecting the user's default
period preference setting.

Changes:
- Updated @cashflow_period to use Current.user&.default_period as fallback
- Updated @outflows_period to use Current.user&.default_period as fallback
- Both now follow the same pattern as the Periodable concern's set_period method

This ensures consistency across all dashboard widgets - Net Worth, Cashflow,
and Outflows now all respect the user's preference.

* Synchronize period selection across all dashboard widgets

All three dashboard widgets (Net Worth, Cashflow, and Outflows) now use
a single shared period parameter, ensuring consistent data magnitudes
across the dashboard.

Changes:
- Simplified controller to use single @period for all three widgets
- Removed widget-specific period parameters (cashflow_period, outflows_period)
- All widgets now use the shared 'period' parameter
- All period dropdowns use turbo_frame: "_top" to reload entire page
- Removed turbo_frame_tags from dashboard view for cleaner implementation

User experience improvement:
- Changing the period in any widget now updates all three widgets
- Ensures data consistency and easier comparison across widgets
- Maintains respect for user's default period preference

* Make Net Worth widget title styling consistent with Cashflow and Outflows

Changed Net Worth title from <p> with text-sm/text-secondary to <h2> with
text-lg to match the consistent styling used by Cashflow and Outflows widgets.

This provides a more unified visual appearance across all dashboard widgets.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-14 19:15:30 +01:00
ErNobyl
54656c943a added german translation (de) (#208)
* added german translation

consistently added all translation yml files for german language

* Correct quotation and syntax errors in new de locale files

Corrected misplaced or missing quotation marks in YAML

* Updated German translations

Added missing files, fixed for customizable branding

* corrected yml formatting

added missing "" when : where used in the string

* Interpolation errors

* More interpolation issues

* Last round of interpolation errors?

* Add German to supported locales

* Still a few more interpolations

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-14 13:38:16 +01:00
Dylan Corrales
f697f711f5 PWA: Fix overflow issue with transaction edit/creation dialogue (#289) 2025-11-14 10:51:36 +01:00
soky srm
606e4b1554 Add support to unlink lunch flow accounts (#318)
* Add support to unlink lunch flow accounts

* add support to link and unlink to any provider

* Fix tests and query

* Let's keep Amr happy about his brand

* Wrap unlink operations in a transaction and add error handling.

* Fix tests

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-14 10:42:31 +01:00
soky srm
ebcd6360fd Add support for manual recurring transaction creation (#311)
* Support manual recurring

* Automatic variance calc

* Automatic variance update

* Tooltip for manual

* Review

* Fix variance calculations

Manual recurring updates collapse occurrence tracking when amounts repeat

* Proper Bigdecimal calcs

* Fix n+1 query

* Nicer UI errors.

* Style

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-14 00:31:12 +01:00
Juan José Mata
66c403438d Filter language selector to show only supported locales (#324)
Updated the language selector in /settings/preferences to display only
locales with extensive translations. Currently supported locales are:
- en (English) - 61 translation files
- es (Spanish) - 60 translation files
- tr (Turkish) - 57 translation files
- nb (Norwegian Bokmål) - 56 translation files
- ca (Catalan) - 56 translation files

Changes:
- Added SUPPORTED_LOCALES constant to LanguagesHelper
- Modified language_options method to filter using SUPPORTED_LOCALES
  instead of excluding specific locales

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-13 23:53:21 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
soky srm
96713ee8b4 Add support for dynamic config UI (#256)
* Add support for dynamic config UI

* Add support for section description

* Better dynamic class settings

Added dynamic_fields hash field - Stores all undeclared settings
[] method - Checks declared fields first, then falls back to dynamic hash
[]= method - Updates declared fields normally, stores others in hash
No runtime field declaration - Fields are never dynamically created on the class

* FIX proper lookup for provider keys

- Also validate configurable values properly.
- Change Provider factory to use Rails autoloading (Zeitwerk)

* Fix factory

The derive_adapter_name method relies on string manipulation ("PlaidAccount".sub(/Account$/, "") + "Adapter" → "PlaidAdapter"), but we already have explicit registration in place.

* Make updates atomic, field-aware, and handle blanks explicitly

* Small UX detail

* Add support for PlaidEU in UI also

- This looks like partial support atm
2025-10-29 13:11:04 +01:00
João Felipe
9fefe57de5 Feature/yahoo finance (#123)
* Implement Yahoo Finance

* Added tests

* Updated hosting controller to check for managed app_mode instead of env_override

* Suggestions from CodeRabbit and Fixes on tests

* Remove Css changes

* Fix yahoo finance impl and i18n

* Updated view to use healthy method

* remove usage

* Updated env example

* keep usage on class just to keep same format

* Ci test

* Remove some useless validations

* Remove logs

* Linter fixes

* Broke this in my conflict merge

* Wrong indentation level

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-28 23:15:14 +01:00
Albert Solà
391011628a Update pages/dashboard locales (#255) 2025-10-28 21:23:20 +01:00
soky srm
4fb0a3856e 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>
2025-10-28 19:32:27 +01:00
Juan José Mata
72e7d7736b Add onboarding state selector for self-hosted signup (#251)
* Add onboarding modes to self-hosted signup

* Style form consistently

* Configure ONBOARDING_STATE via ENV
2025-10-27 21:52:37 +01:00