Commit Graph

1945 Commits

Author SHA1 Message Date
Alessio Cappa
297bcff8a4 fix: missing "count" in locale 2026-01-21 23:10:49 +01:00
Alessio Cappa
ff2d2add3e feat: Category breakdown table UI 2026-01-21 23:08:16 +01:00
Alessio Cappa
33e278aa39 fix: Adjust summary icons color 2026-01-21 22:10:42 +01:00
Alessio Cappa
9fd29f14c1 feat: Add category icons in report table 2026-01-21 22:07:14 +01:00
Juan José Mata
4e425ce4e5 Add option for FOSS contribution payments (#730)
* First commit

* Use subscription flow for monetary contributions

* Removed only part of the SPAN

* Localize Stripe payments message

* More localization of contribution strings

* Missed two billing to payment changes

* Fix tests

* Localization of "Open Demo" strings

* Fix grammar error

* Update for consistency

* Localize CTA

* More localilzation strings
2026-01-21 20:45:04 +01:00
Juan José Mata
8e36c8e736 Rename billing to payment throughout the codebase (#726)
* Rename billing to payment throughout the codebase

This change updates terminology from "billing" to "payment" to better
reflect that these are contributions/payments rather than bills.

Changes include:
- Rename BillingsController to PaymentsController
- Rename billing_email to payment_email
- Rename next_billing_date to next_payment_date
- Rename create_billing_portal_session_url to create_payment_portal_session_url
- Update routes from billing to payment
- Update all 12 locale files with new terminology
- Update views, helpers, and tests

* Update app/views/subscriptions/upgrade.html.erb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-21 19:06:00 +01:00
soky srm
abab66675c Implement a setting to retrieve high res logos (#725)
* Implement a setting to retrieve high res logos

* Update _brand_fetch_settings.html.erb

* Add fallback for stock tickers also to use Brandfetch

* Update security.rb

* Update toggle logic for high-res logos setting

Signed-off-by: Juan José Mata <jjmata@jjmata.com>

* Update security.rb

* Update security.rb

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Juan José Mata <jjmata@jjmata.com>
2026-01-21 17:16:51 +01:00
soky srm
ae61df4978 FIX OpenAPI auth specs (#722)
* FIX auth specs

* FIX header params are not required with auth spec

* Add missing endpoints
2026-01-21 11:10:03 +01:00
soky srm
d8cdced662 Merge pull request #718 from luckyPipewrench/plug-black-hole
Fix "black hole" - Make investment contributions visible in cashflow with auto-categorization
2026-01-21 09:21:45 +01:00
soky srm
ae82197530 Merge pull request #719 from nuno-am/refactor-import-export-sections
refactor: Import and Export sections
2026-01-21 09:15:57 +01:00
Nuno Marques
412e21f810 fix: aria label for action buttons on Export table 2026-01-21 00:42:29 +00:00
Nuno Marques
c229c357ae fix: aria label for action buttons on Import table 2026-01-21 00:31:51 +00:00
Nuno Marques
7d19024e24 fix: alignment for failed stated 2026-01-21 00:09:54 +00:00
Nuno Marques
03e59c8b3c fix: translations suggestions 2026-01-20 23:59:39 +00:00
Nuno Marques
0a5e815732 fix: export counter 2026-01-20 23:49:48 +00:00
Nuno Marques
80290fc0c7 fix: delete unused partial file to render export entries 2026-01-20 23:49:09 +00:00
Nuno Marques
571d09a869 fix: date formats 2026-01-20 23:48:22 +00:00
Nuno Marques
7f69063a95 refactor: Imports section and updated translation files 2026-01-20 23:21:42 +00:00
Nuno Marques
6ba0189e07 refactor: Exports section and updated translation files 2026-01-20 23:21:27 +00:00
Nuno Marques
f8860c091f feat: created Badge component 2026-01-20 23:20:10 +00:00
Nuno Marques
388e1759a9 fix: pagination background 2026-01-20 23:19:34 +00:00
luckyPipewrench
a75cb816c7 Centralize investment_contributions_category logic and update references for streamlined handling. 2026-01-20 17:51:36 -05:00
luckyPipewrench
480e53710a Centralize investment_contributions category handling using i18n key and streamline related references. 2026-01-20 17:36:56 -05:00
luckyPipewrench
4727a391a7 Refactor Investment Contributions category handling to use a centralized constant and streamline related logic. 2026-01-20 17:18:49 -05:00
luckyPipewrench
196d12466f Handle investment_contribution classification and update related logic. 2026-01-20 16:50:45 -05:00
Alessio Cappa
95a2d115a0 fix: Adjust chat input position (#717) 2026-01-20 22:39:16 +01:00
Juan José Mata
45c4bc595b Enable sending logs to Sentry
Enabled logging to Sentry and patched Ruby logger.

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-20 17:19:17 +01:00
Dario G. Mori
7d2cecdd15 fix: installing cloudnative-pg as namespace bound and bumped cnpg operator to 0.27 (#714)
* feat: updated cloudnative-pg to 0.27

* fix: default config is clusterWide false
2026-01-20 13:08:04 +01:00
LPW
da9148c8be Move money market tickers and patterns to configuration (#712)
Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-20 07:44:12 +01:00
github-actions[bot]
650f02ee2d Bump version to next alpha after v0.6.7-alpha.13 release 2026-01-19 23:21:58 +00:00
Julien Orain
777fbdc4ca feat(settings): add pagination to imports and exports pages (#598)
* feat(settings): split imports and exports

* feat(security): sanitize pagination params to prevent abuse

* fix(settings): fix syntax in settings nav

* feat(settings): internationalize family_exports and imports UI strings

* fix(settings): fix coderabbit review

* fix(settings): fix coderabbit review

* fix(settings): fix coderabbit review

* Change default per_page value from 20 to 10

Signed-off-by: Juan José Mata <jjmata@jjmata.com>

* Add `/family_export` to navigation

* Consistency with old defaults

* Align `safe_per_page` even if not DRY

---------

Signed-off-by: Julien Orain <julien.orain@gmail.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: JulienOrain <your-github-email@example.com>
Co-authored-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-20 00:11:22 +01:00
David Gil
3d91e60a8a feat: Add subcategory breakdown to Cash Flow Sankey and Reports (#639)
* feat: Add subcategory breakdown to Cash Flow and Reports

Implements Discussion #546 - adds hierarchical category/subcategory
visualization to both the Sankey chart and Reports breakdown tables.

Sankey chart changes:
- Income: subcategory → parent category → Cash Flow
- Expense: Cash Flow → parent category → subcategory
- Extracted process_category_totals helper to DRY up income/expense logic

Reports breakdown changes:
- Subcategories display nested under parent categories
- Smaller dots and indented rows for visual hierarchy
- Extracted _breakdown_table partial to eliminate duplication

* fix: Dynamic node padding for Sankey chart with many nodes

- Add dynamic nodePadding calculation to prevent padding from dominating
  chart height when there are many subcategory nodes
- Extract magic numbers to static constants for configuration
- Decompose monolithic #draw() into focused methods
- Consolidate duplicate tooltip/currency formatting code
- Modernize syntax with spread operators and optional chaining

* fix: Hide overlapping Sankey labels, show on hover

- Add label overlap detection by grouping nodes by column depth
- Hide labels that would overlap with adjacent nodes
- Show hidden labels on hover (node rectangle or connected links)
- Add hover events to node rectangles (not just text)

* fix: Use deterministic fallback colors for categories

- Replace Category::COLORS.sample with Category::UNCATEGORIZED_COLOR
  for income categories in Sankey chart (was producing different colors
  on each page load)
- Add nil color fallback in reports_controller for parent and root
  categories

Addresses CodeRabbit review feedback.

* fix: Expand CSS variable map for d3 color manipulation

Add hex mappings for commonly used CSS variables so d3 can manipulate
opacity for gradients and hover effects:
- var(--color-destructive) -> #EC2222
- var(--color-gray-400) -> #9E9E9E
- var(--color-gray-500) -> #737373

* test: Add tests for subcategory breakdown in dashboard and reports

- Test dashboard renders Sankey chart with parent/subcategory transactions
- Test reports groups transactions by parent and subcategories
- Test reports handles categories with nil colors
- Use EntriesTestHelper#create_transaction for cleaner test setup

* Fix lint: use Number.NEGATIVE_INFINITY

* Remove obsolete nil color test

Category model now validates color presence, so nil color categories
cannot exist. The fallback handling in reports_controller is still in
place but the scenario is unreachable.

* Update reports_controller.rb

* FIX trade category

---------

Co-authored-by: sokie <sokysrm@gmail.com>
2026-01-20 00:01:55 +01:00
Juan José Mata
d4be209ce5 Point people looking for mobile builds. 2026-01-19 22:47:55 +00:00
Pere Montpeó
f185a35f55 feat(i18n): update Catalan translations (#644)
* feat(i18n): update Catalan translations

* feat(i18n): fix catalan translations

* fix(i18n): consistent simplefin branding

* feat(i18n): missing translation

* Eliminate global keys

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-19 23:44:58 +01:00
Alessio Cappa
2e081ea82d fix: Move rule application to perform_post_sync method (#705)
* Move rule application to perform_post_sync method

Signed-off-by: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com>

* fix: Update test

---------

Signed-off-by: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com>
2026-01-19 22:57:46 +01:00
LPW
8b8ac705f6 Correct brokerage cash calculation for SimpleFIN investment accounts (#710)
* Refactor: Enhance cash balance calculation and holdings management with money market classification and provider-sourced data handling

* Fix: Clear fixture holdings in test to ensure clean creation and update raw_holdings_payload format

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-19 22:17:27 +01:00
soky srm
63dd231787 Merge pull request #686 from TDemeco/fix/yahoo-securities-caching
fix: avoid cached result bypass in Yahoo Finance provider
2026-01-19 20:28:53 +01:00
Nicolas PERNOT
73c816559d MERGE doc/adding_https_info INTO main (#709)
* Suggest to use .env.example

it's easier to start with a pre-done file than search for info about each configuration

* added paragraph to tell how to activate https

* fix type.

As there was 2 space, I assumed there should be a line break

* Corrects minor typos in HTTPS documentation

Addresses a couple of minor typographical errors in the HTTPS documentation section, improving clarity and readability for users setting up HTTPS.

* Clarifies .env setup in Docker documentation

Corrects grammar and improves clarity in the Docker documentation regarding obtaining the `.env.example` file for initial configuration.

* Fixes typo in HTTPS documentation

Corrects a grammatical error in the Docker HTTPS setup guide, improving clarity for users configuring SSL.
2026-01-19 19:36:14 +01:00
soky srm
877abcf4ce Add missing swagger for https://github.com/we-promise/sure/pull/501 (#707) 2026-01-19 19:29:34 +01:00
LPW
8f04955e72 Move exchange MIC codes to config/exchanges.yml (#708)
* Move exchange MIC code mappings to `exchanges.yml` for better maintainability.

* fix: Use YAML.safe_load_file for exchange config

Addresses CodeRabbit security concern - YAML.load_file can deserialize
arbitrary Ruby objects. safe_load_file restricts to basic types only.

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-19 19:28:16 +01:00
LPW
237035c8d4 Improve convert-to-trade security selection with search-first UX (#703)
* Enhance security handling logic:
- Prioritize user's country in sorting securities and country codes.
- Add comprehensive mapping for MIC codes to user-friendly exchange names.
- Revamp combobox to consistently pull from a provider when available.
- Improve handling of custom ticker and exchange input fields.

* Localize securities combobox display and exchange labels.

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-19 15:49:51 +01:00
LPW
bf9bcae600 Add gains by tax treatment to investment report with grouped subtype dropdown (#701)
* Add tax treatment metrics to reports, forms, and models

- Implement `build_gains_by_tax_treatment` for grouping gains by tax treatment
- Update investment performance view with tax treatment breakdown
- Add tax treatment field to crypto and investments forms
- Introduce `realized_gain_loss` calculation in the Trade model
- Group investment subtypes by region for improved dropdown organization

* Optimize investment performance report by reducing N+1 queries

- Eager-load associations in `build_gains_by_tax_treatment` to minimize database queries
- Preload holdings for realized gain/loss calculations in trades
- Refactor views to standardize "no data" placeholder using translations
- Adjust styling in tax treatment breakdown for improved layout

* Enhance investment performance translations and optimize holdings lookup logic

- Update `holdings_count` and `sells_count` translations to handle pluralization
- Refactor views to use pluralized translation keys with count interpolation
- Optimize preloaded holdings lookup in `Trade` to ensure deterministic selection using `select` and `max_by`

* Refine preloaded holdings logic in `Trade` model

- Treat empty preloaded holdings as authoritative to prevent unnecessary DB queries
- Add explicit fallback behavior for database query when holdings are not preloaded

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-19 15:44:49 +01:00
Mark Hendriksen
7f0781179c Add Dutch (nl) translations for UI and models (#702)
* Add Dutch (nl) translations for UI and models

Added comprehensive Dutch translation files for models, views, mailers, and Doorkeeper, covering accounts, categories, admin, and more. Updated languages_helper.rb to include 'nl' as a supported language. Improved capitalization and consistency in existing Dutch date and number formats.

* ai sugestions

* nitpick fix

* Fix Dutch translations and improve consistency

Corrected minor issues and improved consistency in Dutch locale files, including fixing typos, updating terminology (e.g., 'Self-Hosting' to 'Zelfhosting', 'Provider selectie' to 'Providerselectie'), and ensuring proper formatting. No functional changes were made; this commit only affects translation files.

* Update Dutch translations for product name and pluralization

Replaced hardcoded product names with %{product_name} in password reset and API key views for improved reusability. Updated wallet setup message in CoinStats item model to support correct Dutch pluralization.

* Update nl.yml
2026-01-19 15:42:55 +01:00
Alessio Cappa
e1a2ec901c feat: Allow to change country code in already existing Enable Banking connection, to link banks from other countries (#699) 2026-01-19 13:57:07 +01:00
github-actions[bot]
90bb0ac1cb Bump version to next alpha after v0.6.7-alpha.12 release 2026-01-18 17:04:46 +00:00
LPW
64dc5c2fb8 Add tax treatment classification for investment accounts with international support (#693)
* Add tax treatment support for accounts, investments, and cryptos

* Replace hardcoded region labels with I18n translations

* Add I18n support for subtype labels with fallback to hardcoded values

* fixed schema

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-18 17:29:02 +01:00
Alessio Cappa
6ec03e93f4 fix: Properly compute credit card balance for Enable Banking accounts (#663)
* fix: Properly compute credit card balance for Enable Banking accounts

* fix: Use right balance type codes

* fix: Update comment
2026-01-18 15:11:34 +01:00
LPW
f97ff419e8 Allow manual entry on linked accounts (#689)
* Update activity menu to conditionally display options for linked and investment accounts

* Update transaction test to reflect "New activity" menu change

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-18 15:08:27 +01:00
Alessio Cappa
3ea102d14f fix: Force top-0 on tooltip div to avoid overflow issues on mobile (#695) 2026-01-18 13:20:03 +01:00
foXaCe
302fb84086 feat: Support multiple crypto wallets with same token (#676)
* feat: Support multiple crypto wallets with same token

Allows users to import multiple wallets containing the same
cryptocurrency (e.g., ETH on different wallet addresses).

Changes:
- Add wallet_address column to coinstats_accounts
- Update uniqueness validation to include wallet_address
- Extract and store wallet address in WalletLinker
- Add composite unique index on [item_id, account_id, wallet_address]
- Add tests for multi-wallet support and backwards compatibility

Users can now have:
- ETH (0xAAA...) → "Ethereum (0xAA...AA)"
- ETH (0xBBB...) → "Ethereum (0xBB...BB)"

Backwards compatible: existing accounts with wallet_address: nil
continue to work.

* style: Fix array bracket spacing in migration

* chore: Update schema.rb with wallet_address column and index

Add the missing wallet_address column and composite unique index
to db/schema.rb for CI compatibility with db:schema:load

* test: Add test for wallet deletion with same token different addresses

Verifies that deleting one wallet does not affect other wallets
that share the same token but have different addresses.

Addresses review comment from @EthanC via @jjmata

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-18 11:27:09 +01:00