Commit Graph

2116 Commits

Author SHA1 Message Date
Juan José Mata
7a1f15a75b Contribution payments copy/edits (#782)
* 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

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-25 20:32:26 +01:00
Alessio Cappa
27fdfca595 fix: remove fixed height on tags field in bulk update (#778) 2026-01-25 18:31:57 +01:00
Alessio Cappa
2bb98b837a fix: Add border to merchant logo (#776) 2026-01-25 18:30:12 +01:00
Gilles Devillers
0a44fc7eac fix: wrong link in onboarding guide (#777)
Signed-off-by: Gilles Devillers <gildev@gmail.com>
2026-01-25 18:29:22 +01:00
Gilles Devillers
75bbeed300 fix: use port configured in .env (#773) 2026-01-25 16:02:57 +01:00
Piet
51d1a8f22b fix: Register sync_all_accounts cron job on Sidekiq startup (#764)
* fix: Register sync_all_accounts cron job on Sidekiq startup

AutoSyncScheduler.sync! was only called when changing settings in the UI,
so the nightly sync job was never registered. Now it's initialized when
Sidekiq starts, ensuring accounts sync nightly as configured.

* Utilize existing configure_server block

---------

Co-authored-by: Pieter <ptr@arcsec.org>
2026-01-24 22:09:52 +01:00
Juan José Mata
c7ab25b866 Use browser Accept-Language for login and onboarding locale (#768)
* Use Accept-Language for unauthenticated locale

* Add per-user locale overrides

* Fix test

* Use more than the top `accept-language` entry

* Localization of string
2026-01-24 22:00:41 +01:00
LPW
959029fda6 fix: consolidate duplicate transaction labels in translations (#767)
- Removed duplicate keys in `en.yml` and `nl.yml` under transaction views.

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-24 17:34:00 +01:00
LPW
6197419f6c Add protection indicator to entries and unlock functionality (#765)
* feat: add protection indicator to entries and unlock functionality

- Introduced protection indicator component rendering on hover and in detail views.
- Added support to unlock entries, clearing protection flags (`user_modified`, `import_locked`, and locked attributes).
- Updated routes, controllers, and models to enable unlock functionality for trades and transactions.
- Refactored views and localized content to support the new feature.
- Added relevant tests for unlocking functionality and attribute handling.

* feat: improve sync protection and turbo stream updates for entries

- Added tests for turbo stream updates reflecting protection indicators.
- Ensured user-modified entries lock specific attributes to prevent overwrites.
- Updated controllers to mark entries as user-modified and reload for accurate rendering.
- Enhanced protection indicator rendering using turbo frames.
- Applied consistent lock state handling across trades and transactions.

* Address PR review comments for protection indicator

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-24 16:03:23 +01:00
github-actions[bot]
1dc96ff2ef Bump version to next alpha after v0.6.7-alpha.16 release 2026-01-24 11:58:14 +00:00
Alessio Cappa
1b514f63e4 feat: Display shared budget as a badge (#756)
* feat: display shared budget as a badge

* fix: reduce margin on badge

* fix: adjust mobile spacing

* Consistent opacity

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

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Juan José Mata <jjmata@jjmata.com>
2026-01-24 12:33:17 +01:00
Juan José Mata
7d2d012e3c fix: Support encryption keys via environment variables in managed mode (#762)
The encryption initializer previously only supported environment variables
in self-hosted mode. In managed mode, it expected encryption credentials
to exist in Rails.application.credentials, which would cause boot failures
if they were missing.

This change updates the encryption configuration to support environment
variables in both managed and self-hosted modes:

- Environment variables (ACTIVE_RECORD_ENCRYPTION_*) now work in both modes
- Priority: env vars > auto-generation (self-hosted only) > credentials
- Updated documentation in .env.example and Helm chart README

This allows managed mode deployments to provide encryption keys via
environment variables instead of requiring Rails credentials.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-24 12:07:00 +01:00
LPW
d98711d4ea Rename raw_investments_payload to raw_holdings_payload for Plaid accounts (#760)
* refactor: rename `raw_investments_payload` to `raw_holdings_payload`

- Update references and models to use consistent naming.
- Adjust migrations, tests, and encryption setup accordingly.

* fix: improve safety when accessing raw_holdings_payload keys

- Use `dig` with safe navigation to prevent potential nil errors.
- Add support for decryption from the old column name `raw_investments_payload`.
- Adjust related methods and calculations for consistency.

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-24 11:16:26 +01:00
LPW
8c9764f1ad Unify provider and account card UI and move setup actions to menus (#755)
* feat: add auto-open functionality for collapsible sections and streamline unlinked account handling

- Introduce `auto-open` Stimulus controller to auto-expand <details> elements based on URL params.
- Update all settings sections and panels to support the new `auto_open_param` for seamless navigation.
- Improve unlinked account logic for Coinbase, SimpleFIN, and SnapTrade, ensuring consistent and optimized handling.
- Refactor sync warnings and badges for better readability and user experience.
- Extend localization for additional menu items, warnings, and setup prompts.

* fix: improve error handling and safe HTML usage in Coinbase and settings components

- Log warning for unhandled exceptions in Coinbase unlinked account count fallback.
- Escape `auto_open_param` in settings section for safe HTML injection.
- Clean up URL params in `auto-open` controller after auto-expansion.

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-24 01:11:56 +01:00
Juan José Mata
bf3e257112 Update Railway deployment link in README
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 23:31:42 +01:00
Juan José Mata
32793ff8b4 fix: Enable scrolling on login page for small mobile devices (#754)
* fix: Enable scrolling on login page for small mobile devices

Changed auth layout containers from `h-full` to `min-h-full` and added
`overflow-y-auto` to allow content to scroll when it exceeds viewport
height on small mobile phones.

* Real fix

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-23 23:05:45 +01:00
Mark Hendriksen
9b84c5bdbc Enhanced Import Amount Type Selection (#506)
* Enhanced Import Amount Type Selection

updated version of https://github.com/we-promise/sure/pull/179

* copilot sugestions

* ai sugestions

* Update import.rb

* Update schema.rb

* Update schema.rb

* Update schema.rb

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 22:12:02 +01:00
soky srm
696ff0966b Initial security fixes (#461)
* Initial sec

* Update PII fields

* FIX add tests

* FIX safely read plaintext data on rake backfill

* Update user.rb

* FIX tests

* encryption_ready? block

* Test conditional to encryption on

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 22:05:28 +01:00
Juan José Mata
71f10c5e4a fix: Handle missing encryption keys gracefully on Poviders config page (#753)
* fix: Handle missing encryption keys gracefully on providers page

When Active Record encryption keys are not configured, the settings/providers
page would crash with an unhandled exception. This change catches the
ActiveRecord::Encryption::Errors::Configuration error and displays a
friendly error message instead, explaining that encryption credentials
need to be configured before using sync providers.

https://claude.ai/code/session_015nPsLWkr12i5ok5bwLtA7p

* Simplify rescue block

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-23 19:15:04 +01:00
soky srm
927196f59b Merge pull request #748 from luckyPipewrench/mo-betta-generator
Enhance provider generator with production-ready scaffolding
2026-01-23 19:02:22 +01:00
Juan José Mata
6b5a5b1877 fix: Show cancellation message when subscription is pending cancellation (#752)
* fix: Show cancellation message when subscription is pending cancellation

When a subscription is cancelled via Stripe, the UI incorrectly showed
"Your contribution continues on..." instead of reflecting the cancellation
status. This fix adds tracking of `cancel_at_period_end` from Stripe webhooks
and displays "Your contribution ends on..." when a subscription has been
cancelled but is still active until the billing period ends.

https://claude.ai/code/session_01Y8ELTdK1k9o315iSq43TRN

* chore: Update schema.rb with cancel_at_period_end column

https://claude.ai/code/session_01Y8ELTdK1k9o315iSq43TRN

* Schema version

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-23 18:55:51 +01:00
luckyPipewrench
4909532a08 fix: address PR review feedback for generator templates
- Fix invalid Tailwind class bg-gray -> bg-gray-400 in panel template
- Fix count_holdings to only count linked accounts for consistency
2026-01-23 12:50:34 -05:00
luckyPipewrench
9caee4ec36 Remove Testprovider support and related references for streamlined provider handling. 2026-01-23 11:52:20 -05:00
luckyPipewrench
b8ffe06974 Add banking support to family generator, including transactions processor, SDK updates, and related templates. Streamline logic for handling provider types. 2026-01-23 11:31:57 -05:00
github-actions[bot]
8b3ebd7988 Bump version to next alpha after v0.6.7-alpha.15 release 2026-01-23 12:23:18 +00:00
LPW
c504ba9b99 Add security remapping for holdings with sync protection (#692)
* Add security remapping support to holdings

- Introduced `provider_security` tracking for holdings with schema updates.
- Implemented security remap/reset workflows in `Holding` model and UI.
- Updated routes, controllers, and tests to support new functionality.
- Enhanced client-side interaction with Stimulus controller for remapping.

# Conflicts:
#	app/components/UI/account/activity_feed.html.erb
#	db/schema.rb

* Refactor "New transaction" to "New activity" across UI and tests

- Updated localized strings, button labels, and ARIA attributes.
- Improved error handling in holdings' current price display.
- Scoped fallback queries in `provider_import_adapter` to prevent overwrites.
- Added safeguard for offline securities in price fetching logic.

* Update security remapping to merge holdings on collision by deleting duplicates

- Removed error handling for collisions in `remap_security!`.
- Added logic to merge holdings by deleting duplicates on conflicting dates.
- Modified associated test to validate merging behavior.

* Update security remapping to merge holdings on collision by combining qty and amount

- Modified `remap_security!` to merge holdings by summing `qty` and `amount` on conflicting dates.
- Adjusted logic to calculate `price` for merged holdings.
- Updated test to validate new merge behavior.

* Improve DOM handling in Turbo redirect action & enhance holdings merge logic

- Updated Turbo's custom `redirect` action to use the "replace" option for cleaner DOM updates without clearing the cache.
- Enhanced holdings merge logic to calculate weighted average cost basis during security remapping, ensuring more accurate cost_basis updates.

* Track provider_security_id during security updates to support reset workflows

* Fix provider tracking: guard nil ticker lookups and preserve merge attrs

- Guard fallback 1b lookup when security.ticker is blank to avoid matching NULL tickers
- Preserve external_id, provider_security_id, account_provider_id during collision merge

* Fix schema.rb version after merge (includes tax_treatment migration)

* fix: Rename migration to run after schema version

The migration 20260117000001 was skipped in CI because it had a timestamp
earlier than the schema version (2026_01_17_200000). CI loads schema.rb
directly and only runs migrations with versions after the schema version.

Renamed to 20260119000001 so it runs correctly.

* Update schema: remove Coinbase tables, add new fields and indexes

* Update schema: add back `tax_treatment` field with default value "taxable"

* Improve Turbo redirect action: use "replace" to avoid form submission in history

* Lock merged holdings to prevent provider overwrites and fix activity feed template indentation

* Refactor holdings transfer logic: enforce currency checks during collisions and enhance merge handling

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 12:54:55 +01:00
Juan José Mata
e0fb585bda Hide contribution payments from demo user(s) (#738)
* Hide payment contribution options from demo and manually created users

Demo data users and manually created users don't have stripe_customer_id
set on their family, so they should not see payment/contribution options.

Changes:
- Add can_manage_subscription? method to Family::Subscribeable that checks
  for presence of stripe_customer_id
- Guard Settings::PaymentsController to return 403 for users without
  stripe_customer_id
- Guard SubscriptionsController#show action (Stripe portal redirect) for
  users without stripe_customer_id
- Update settings navigation to hide the payment link when
  stripe_customer_id is not present
- Add tests for the new behavior

* Fix broken test

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-23 12:35:49 +01:00
Juan José Mata
5ba051c8cf fix: Broken /terms and /privacy routes (#749)
* fix: replace invalid redirect("about:blank") with proper controller actions

The privacy and terms routes were using redirect("about:blank") which is
invalid because about:blank is a browser-specific pseudo URL, not a valid
HTTP redirect target. This fix replaces them with proper controller actions
that render placeholder pages.

Changes:
- Add privacy and terms actions to PagesController with skip_authentication
- Create privacy.html.erb and terms.html.erb view templates
- Add i18n translations for the new pages
- Update routes to use pages#privacy and pages#terms

https://claude.ai/code/session_01RL36dMda1o6LXGsnGnTJZu

* Make legal routes configurable

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-23 11:39:48 +01:00
Dream
0316b848eb fix: add auto-refresh for processing exports on index page (#715)
Wrap export list in turbo_frame_tag with conditional polling attributes.
When exports are pending/processing, page polls every 3 seconds for updates.
Add turbo_frame: _top to download/delete buttons for proper frame handling.
2026-01-23 11:08:38 +01:00
Jose
69d9f51d57 # test(api): Add request specs for merchants and tags endpoints (#645)
* Add files via upload

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>

* Add merchants and tags resources to routes

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>

* update

* update spaces

* fix: Apply CodeRabbit suggestions and add YARD documentation

* docs: Add API documentation for merchants and tags endpoints

* fix: Address CodeRabbit feedback on documentation

* fix: Use authorize_scope! instead of ensure_read_scope

* test(api): Add request specs for merchants and tags endpoints

* test(api): Add request specs for merchants and tags endpoints

* test(api): Convert specs to Minitest format in test/

* fix: Correct indentation for private methods

* fix: merchant and tag test

* Enhance tag tests for family scope and access

Added tests to ensure tags from other families are not returned and that attempts to access them return 404.

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>

* Enhance merchants controller tests for family scope

Added tests to ensure that merchants from other families are not returned in the index action and that accessing a merchant from another family returns a 404 error.

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>

* Fix test/implementation

* Remove old token test code

* Improve test

---------

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 10:18:22 +01:00
Number Eight
0c6d208ef2 feat: implement expandable view for cashflow sankey chart (#739)
* feat: implement expandable view for cashflow sankey chart

* refactor: migrate cashflow dialog sizing to tailwind utilities

* refactor: declarative draggable restore on cashflow dialog close

* refactor: localized title and use Tailwind utilities

* refactor: update dialog interaction especially on mobile

* refactor: add global expand text to localization

* fix: restore draggable immediately after dialog close

* Whitespace noise

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 09:52:15 +01:00
Juan José Mata
6dab611fef Enable auto-sync for family in controller again
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 09:41:28 +01:00
Juan José Mata
188d4ed221 Add Skylight back
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-23 09:39:25 +01:00
soky srm
87b77bb7df Merge pull request #744 from alessiocappa/FT-UpdateReportPageUI
feat: Improve report page UI
2026-01-23 09:19:17 +01:00
LPW
e6d8112278 Add SnapTrade connection management UI for freeing up connection slots (#747)
* Add SnapTrade connection management with lazy-loading and deletion functionality.

* Refactor lazy-load controller to simplify event handling and enhance loading state management; improve SnapTrade deletion logic with additional safeguards and logging.

* Improve SnapTrade connection error handling and centralize unknown brokerage message using i18n.

* Centralize SnapTrade connection default name and missing authorization ID messages using i18n.

* Enhance SnapTrade connection deletion logic with improved error handling, i18n support for API deletion failures, and consistent Turbo Stream responses.

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-23 08:55:34 +01:00
luckyPipewrench
3382c07194 Refactor family generator templates for streamlined labels, error handling, and account setup logic. 2026-01-22 22:19:38 -05:00
luckyPipewrench
17693f0418 Refactor family generator to centralize concern creation, improve SDK support, and add tests, views, jobs, and sync logic. 2026-01-22 22:07:22 -05:00
AdamWHY2K
3f5fff27ea feat: process pending transactions from lunchflow (#731)
* feat(config): add Lunchflow runtime configuration flags

* feat(api): add include_pending parameter to Lunchflow API

* feat(processor): add pending metadata support to Lunchflow processor

* feat(processor): generate temporary IDs for pending transactions

* feat(importer): integrate pending transaction support in sync

* fix(importer): improve deduplication for transactions without IDs

* feat(model): add Lunchflow pending support to Transaction scopes

* test: add Lunchflow processor pending metadata tests

* docs: update AGENTS.md for Lunchflow pending support

* chore: remove unused variable

* fix: simplify key check

* fix: dotenv-linter key order

* fix: avoid collapsing distinct pending transactions

* fix: prevent unbounded raw payload growth for blank IDs
2026-01-23 00:53:24 +01:00
Alessio Cappa
96dfad1cfb fix: fix tests 2026-01-23 00:49:47 +01:00
LPW
2c827fbc88 Fix locale mismatch and add option activity type mappings (#743)
* Expand option activity type support in `activities_processor` and update i18n hint for SnapTrade account loading.

* Add `SELL_SIDE_TYPES` constant to streamline sell-side activity handling in `activities_processor`.

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-23 00:28:17 +01:00
LPW
6279bfc497 Add comprehensive tests for SnaptradeAccount processors and data helpers. (#742)
Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-23 00:27:00 +01:00
Alessio Cappa
262de20602 fix: Use right arrow position when collapsing sections (#746) 2026-01-23 00:24:29 +01:00
Alessio Cappa
2832077b15 feat: adjust buttons style 2026-01-22 23:18:22 +01:00
Alessio Cappa
31c4c3f106 feat: move print report button to header 2026-01-22 23:12:25 +01:00
Alessio Cappa
68c7e63eb7 refactor: remove unnecessary classes 2026-01-22 23:03:15 +01:00
Alessio Cappa
be3e6d6563 feat: align icon sizes and improve investments section 2026-01-22 22:49:58 +01:00
Alessio Cappa
56c4ce911d fix: Improve net worth tables 2026-01-22 22:32:57 +01:00
LPW
7bd1058b6e Exclude tax-advantaged account activity from budget & add provider data quality warnings (#724)
* Add tax-advantaged account exclusions and investment data warnings

* Address PR review feedback: translations + cache key stability

- Add proper translations for provider warnings in 8 locales (de, es, nb, pt-BR, ro, tr, zh-CN, zh-TW)
- Fix cache key stability: use SHA256.hexdigest instead of Array#hash (randomized per process)

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-22 22:23:09 +01:00
LPW
9858b36dc7 Centralize sdk_object_to_hash logic in DataHelpers module and update all references for improved reusability and consistency. Add error handling for partial and failed SnapTrade account linking. (#741)
Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-22 22:19:44 +01:00
Alessio Cappa
e672929157 fix: Adjust padding in trends section 2026-01-22 22:13:48 +01:00