* 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>
* 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>
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.
* 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
* 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>
* 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>
* 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>
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>
* 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
* 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>
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.
* 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
* 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>
* 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>
* 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
* 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
* 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.
* 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>
* 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>
- 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
- 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
* 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>
* 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
* 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>
* 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>