Commit Graph

140 Commits

Author SHA1 Message Date
Juan José Mata
4c69ba9420 Update version from alpha to rc
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-25 20:34:43 +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
github-actions[bot]
1dc96ff2ef Bump version to next alpha after v0.6.7-alpha.16 release 2026-01-24 11:58:14 +00: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
github-actions[bot]
8b3ebd7988 Bump version to next alpha after v0.6.7-alpha.15 release 2026-01-23 12:23:18 +00: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
LPW
a83f70425f Add SnapTrade brokerage integration with full trade history support (#737)
* Introduce SnapTrade integration with models, migrations, views, and activity processing logic.

* Refactor SnapTrade activities processing: improve activity fetching flow, handle pending states, and update UI elements for enhanced user feedback.

* Update Brakeman ignore file to include intentional redirect for SnapTrade OAuth portal.

* Refactor SnapTrade models, views, and processing logic: add currency extraction helper, improve pending state handling, optimize migration checks, and enhance user feedback in UI.

* Remove encryption for SnapTrade `snaptrade_user_id`, as it is an identifier, not a secret.

* Introduce `SnaptradeConnectionCleanupJob` to asynchronously handle SnapTrade connection cleanup and improve i18n for SnapTrade item status messages.

* Update SnapTrade encryption: make `snaptrade_user_secret` non-deterministic to enhance security.

---------

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-22 20:52:49 +01:00
github-actions[bot]
6c2120e4ce Bump version to next alpha after v0.6.7-alpha.14 release 2026-01-21 22:53:06 +00: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
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
github-actions[bot]
90bb0ac1cb Bump version to next alpha after v0.6.7-alpha.12 release 2026-01-18 17:04:46 +00:00
github-actions[bot]
17046c70f6 Bump version to next alpha after v0.6.7-alpha.11 release 2026-01-16 23:05:49 +00:00
github-actions[bot]
f94a04d2e1 Bump version to next alpha after v0.6.7-alpha.10 release 2026-01-15 12:23:56 +00:00
github-actions[bot]
a5ec5d3a62 Bump version to next alpha after v0.6.7-alpha.9 release 2026-01-15 12:05:43 +00:00
github-actions[bot]
425570cd1f Bump version to next alpha after v0.6.7-alpha.8 release 2026-01-13 09:26:03 +00:00
soky srm
064833621e Merge pull request #538 from luckyPipewrench/sso-upgrades
Multi-provider SSO with admin UI and SAML support
2026-01-12 15:38:59 +01:00
Juan José Mata
2846436960 Update version to 0.6.7-alpha.8
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-11 18:34:31 +01:00
Juan José Mata
b5ccea4961 Update version to 0.6.7-alpha.7
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-10 23:00:33 +01:00
Copilot
a135866dbf Add Redis Sentinel support for Sidekiq high availability (#457)
* Initial plan

* Add Redis Sentinel support for Sidekiq configuration

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Add documentation for Redis Sentinel configuration

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Improve Sentinel host parsing with better validation and error handling

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Add port validation to prevent invalid Sentinel configurations

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Linter

* Add Sentinel authentication credentials to fix NOAUTH error

- Add sentinel_username (defaults to "default")
- Add sentinel_password (uses REDIS_PASSWORD)
- Update documentation for sentinel auth configuration

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Add CHANGELOG.md for Helm chart documenting Redis Sentinel support

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

* Set REDIS_URL alongside in Sentinel mode also

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-10 20:18:03 +01:00
LPW
3658e812a8 Add pending transaction handling and duplicate reconciliation logic (#602)
* Add pending transaction handling and duplicate reconciliation logic

- Implemented logic to exclude pending transactions from budgets and analytics calculations.
- Introduced mechanisms for reconciling pending transactions with posted versions.
- Added duplicate detection with support for merging or dismissing matches.
- Updated transaction search filters to include a `status_filter` for pending/confirmed transactions.
- Introduced UI elements for reviewing and resolving duplicates.
- Enhanced `ProviderSyncSummary` with stats for reconciled and stale pending transactions.

* Refactor translation handling and enhance transaction and sync logic

- Moved hardcoded strings to locale files for improved translation support.
- Refined styling for duplicate transaction indicators and sync summaries.
- Improved logic for excluding stale pending transactions and updating timestamps on batch exclusion.
- Added unique IDs to status filters for better element targeting in UI.
- Optimized database queries to avoid N+1 issues in stale pending calculations.

* Add sync settings and enhance pending transaction handling

- Introduced a new "Sync Settings" section in hosting settings with UI to toggle inclusion of pending transactions.
- Updated handling of pending transactions with improved inference logic for `posted=0` and `transacted_at` in processors.
- Added priority order for pending transaction inclusion: explicit argument > environment variable > runtime configurable setting.
- Refactored settings and controllers to store updated sync preferences.

* Refactor sync settings and pending transaction reconciliation

- Extracted logic for pending transaction reconciliation, stale exclusion, and unmatched tracking into dedicated methods for better maintainability.
- Updated sync settings to infer defaults from multiple provider environment variables (`SIMPLEFIN_INCLUDE_PENDING`, `PLAID_INCLUDE_PENDING`).
- Refined UI and messaging to handle multi-provider configurations in sync settings.

# Conflicts:
#	app/models/simplefin_item/importer.rb

* Debounce transaction reconciliation during imports

- Added per-run reconciliation debouncing to prevent repeated scans for the same account during chunked history imports.
- Trimmed size of reconciliation stats to retain recent details only.
- Introduced error tracking for reconciliation steps to improve UI visibility of issues.

* Apply ABS() in pending transaction queries and improve error handling

- Updated pending transaction logic to use ABS() for consistent handling of negative amounts.
- Adjusted amount bounds calculations to ensure accuracy for both positive and negative values.
- Refined exception handling in `merge_duplicate` to log failures and update user alert.
- Replaced `Date.today` with `Date.current` in tests to ensure timezone consistency.
- Minor optimization to avoid COUNT queries by loading limited records directly.

* Improve error handling in duplicate suggestion and dismissal logic

- Added exception handling for `store_duplicate_suggestion` to log failures and prevent crashes during fuzzy/low-confidence matches.
- Enhanced `dismiss_duplicate` action to handle `ActiveRecord::RecordInvalid` and display appropriate user alerts.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-10 20:11:00 +01:00
Josh Waldrep
238fa8e0ca Merge remote-tracking branch 'upstream/main' into sso-upgrades
# Conflicts:
#	app/views/simplefin_items/_simplefin_item.html.erb
#	db/schema.rb
2026-01-10 11:57:23 -05:00
Juan José Mata
b957aea497 Update version to 0.6.7-alpha.6
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-10 16:40:57 +01:00
Juan José Mata
a1f5da870d Update version to 0.6.7-alpha.5
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-09 23:17:57 +01:00
Juan José Mata
c315e08a6e Update version to 0.6.7-alpha.3
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-08 14:51:55 +01:00
Josh Waldrep
14993d871c feat: comprehensive SSO/OIDC upgrade with enterprise features
Multi-provider SSO support:
   - Database-backed SSO provider management with admin UI
   - Support for OpenID Connect, Google OAuth2, GitHub, and SAML 2.0
   - Flipper feature flag (db_sso_providers) for dynamic provider loading
   - ProviderLoader service for YAML or database configuration

   Admin functionality:
   - Admin::SsoProvidersController for CRUD operations
   - Admin::UsersController for super_admin role management
   - Pundit policies for authorization
   - Test connection endpoint for validating provider config

   User provisioning improvements:
   - JIT (just-in-time) account creation with configurable default role
   - Changed default JIT role from admin to member (security)
   - User attribute sync on each SSO login
   - Group/role mapping from IdP claims

   SSO identity management:
   - Settings::SsoIdentitiesController for users to manage connected accounts
   - Issuer validation for OIDC identities
   - Unlink protection when no password set

   Audit logging:
   - SsoAuditLog model tracking login, logout, link, unlink, JIT creation
   - Captures IP address, user agent, and metadata

   Advanced OIDC features:
   - Custom scopes per provider
   - Configurable prompt parameter (login, consent, select_account, none)
   - RP-initiated logout (federated logout to IdP)
   - id_token storage for logout

   SAML 2.0 support:
   - omniauth-saml gem integration
   - IdP metadata URL or manual configuration
   - Certificate and fingerprint validation
   - NameID format configuration
2026-01-03 17:56:42 -05:00
Juan José Mata
4f7a90745e Start the v0.6.7-alpha train 2025-12-31 19:38:23 +01:00
Juan José Mata
7862823da6 New release: v0.6.6 2025-12-31 15:37:15 +01:00
Juan José Mata
33fdd589e4 Maybe one more 0.6.6-alpha.8 before v0.6.6 final!
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-24 13:00:24 +01:00
LPW
b23711ae0d Add configurable multi-provider SSO, SSO-only mode, and JIT controls via auth.yml (#441)
* Add configuration and logic for dynamic SSO provider support and stricter JIT account creation

- Introduced `config/auth.yml` for centralized auth configuration and documentation.
- Added support for multiple SSO providers, including Google, GitHub, and OpenID Connect.
- Implemented stricter JIT SSO account creation modes (`create_and_link` vs `link_only`).
- Enabled optional restriction of JIT creation by allowed email domains.
- Enhanced OmniAuth initializer for dynamic provider setup and better configurability.
- Refined login UI to handle local login disabling and emergency super-admin override.
- Updated account creation flow to respect JIT mode and domain checks.
- Added tests for SSO account creation, login form visibility, and emergency overrides.

# Conflicts:
#	app/controllers/sessions_controller.rb

* remove non-translation

* Refactor authentication views to use translation keys and update locale files

- Extracted hardcoded strings in `oidc_accounts/link.html.erb` and `sessions/new.html.erb` into translation keys for better localization support.
- Added missing translations for English and Spanish in `sessions` and `oidc_accounts` locale files.

* Enhance OmniAuth provider configuration and refine local login override logic

- Updated OmniAuth initializer to support dynamic provider configuration with `name` and scoped parameters for Google and GitHub.
- Improved local login logic to enforce stricter handling of super-admin override when local login is disabled.
- Added test for invalid super-admin override credentials.

* Document Google sign-in configuration for local development and self-hosted environments

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2025-12-24 00:15:53 +01:00
Juan José Mata
5b5d25457f Prepare for v0.6.6-alpha.7
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-23 11:20:45 +01:00
LPW
664c6c2b7c Pending detection, FX metadata, Pending UI badge. (#374)
* - Add support for `SIMPLEFIN_INCLUDE_PENDING` to control pending behavior via ENV.
- Enhance debug logging for SimpleFin API requests and raw payloads.
- Refine pending flag handling in `SimplefinEntry::Processor` based on provider data and inferred conditions.
- Improve FX metadata processing for transactions with currency mismatches.
- Add new tests for pending detection, FX metadata, and edge cases involving `posted` values.
- Add pending indicator UI to transaction view.

* Document pending transaction detection, storage, and UI behavior for SimpleFIN and Plaid integrations. Add debug flags for troubleshooting.

* Add `pending?` method to `Transaction` model, refactor UI indicator, and centralize SimpleFIN configuration

- Introduced `pending?` method in `Transaction` for unified pending state detection.
- Refactored transaction pending indicator in the UI to use `pending?` method.
- Centralized SimpleFIN configuration in initializer with ENV-backed toggles.
- Updated tests for `pending?` behavior and clarified docs for pending detection logic

* Add SimpleFIN debug and runtime flags to `.env.local.example` and `.env.test.example`

- Introduced `SIMPLEFIN_INCLUDE_PENDING` and `SIMPLEFIN_DEBUG_RAW` flags for controlling pending behavior and debugging.
- Updated example environment files with descriptions for new configuration options.

* Normalize formatting for `SIMPLEFIN_INCLUDE_PENDING` and `SIMPLEFIN_DEBUG_RAW` flags in `.env.local.example` and `.env.test.example`.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2025-12-19 23:24:48 +01:00
Juan José Mata
2c289d3e2c Prepare for v0.6.6-alpha.6
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-19 23:19:20 +01:00
Juan José Mata
d37e719315 Prepare for v0.6.6-alpha.5
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-19 14:48:15 +01:00
Juan José Mata
e044d240a1 Prepare for 0.6.6-alpha.4
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-13 15:39:01 +01:00
Juan José Mata
ac50216303 Preparing for v0.6.6-alpha.3
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-10 17:15:10 +01:00
Juan José Mata
9bef3fd235 Prepare for 0.6.6-alpha.2
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-07 13:58:59 +01:00
Juan José Mata
2eb89af0a2 Prepare the v0.6.6 alpha train
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-12-01 13:08:06 +01:00
Juan José Mata
bd55f6656b Nightlies are 0.6.5-alpha.14 now
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-26 23:11:41 +01:00
Juan José Mata
7053e317b9 Update version to 0.6.5-alpha.13
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-26 18:28:45 +01:00
Juan José Mata
983fb177fc Preparing for v0.6.5-alpha.12
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-22 01:03:29 +01:00
Juan José Mata
2d188377a6 Prepare for 0.6.5-alpha.11
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-17 15:15:54 +01:00
Juan José Mata
3f1d1c0238 Prepare for v0.6.5-alpha.10
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-13 16:29:29 +01:00
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
Juan José Mata
fcf792b560 PostHog support (#313) 2025-11-11 16:06:08 +01:00
Juan José Mata
2a4a3865b2 Prepare for v0.6.5-alpha.8
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-10 15:37:12 +01:00
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
Juan José Mata
48b1062274 Update version to 0.6.5-alpha.7
Prepare for next alpha

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-11-05 12:20:53 +01:00
Juan José Mata
801a3e87a9 Build up to 0.6.5-alpha.6
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-30 09:48:24 +01:00