Commit Graph

130 Commits

Author SHA1 Message Date
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
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
Juan José Mata
a35a4ac7ae Update version to 0.6.5-alpha.3
Prepare for alpha.3

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-26 17:51:31 +01:00
Juan José Mata
4ba8f3233b Fix production OIDC regression
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-24 18:11:31 +02:00
Juan José Mata
768e85ce08 Add OpenID Connect login support (#77)
* Add OpenID Connect login support
* Add docs for OIDC config with Google Auth
* Use Google styles for log in
- Add support for linking existing account
- Force users to sign-in with passoword first, when linking existing accounts
- Add support to create new user when using OIDC
- Add identities to user to prevent account take-ver
- Make tests mocking instead of being integration tests
- Manage session handling correctly
- use OmniAuth.config.mock_auth instead of passing auth data via request env
* Conditionally render Oauth button

- Set a config item `configuration.x.auth.oidc_enabled`
- Hide button if disabled

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Signed-off-by: soky srm <sokysrm@gmail.com>
Co-authored-by: sokie <sokysrm@gmail.com>
2025-10-24 16:07:45 +02:00
Juan José Mata
4f446307a7 Bump version to 0.6.5-alpha.1
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-10-24 00:16:29 +02:00
Juan José Mata
7c5ddd674d Make branding configurable (#173)
* Remove orphan function

* Add centralized branding helpers and update locales

* Remove _plus and add (proper) brand

* No longer Sure, configurable

* Consistency with compose file naming

* Missed `product_name` mapping

* Fix brand/product name in mailers

* Product name in email reset flow

* Fix i18n errors/tests

* Fix password mailer brand/product name (again)

* Missed hardcoded `Sure` in onboarding goals

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Juan José Mata <jjmata@jjmata.com>

* PR nitpick on documentation

* Missing interpolation key for invited UI

* Orphan assets

* New logos

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-22 19:14:03 +02:00
Juan José Mata
3264a96249 Getting ready for v0.6.4
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-09-25 11:31:06 +02:00
Juan José Mata
5706280dd7 More rebranding changes (#159)
* Replace Maybe for Sure in select code areas

* Make sure passwords are consistent

* Remove (admin|member) from demo data first name

* Database and schema names finally to `sure`

* Fix broken test

* Another (benchmarking) database name to `sure_*`

* More rebranding to Sure

* Missed this Maybe mention in the same page

* Random nitpicks and more Maybes

* Demo data accounts and more Maybes

* Test data account updates

* Impersonation test accounts

* Consistency with `compose.example.yml`
2025-09-24 00:19:51 +02:00
Juan José Mata
5d6915a994 Add OpenAI token configuration to self-hosting settings (#122)
* feat: add OpenAI settings partial
2025-08-23 08:04:59 +02:00
Juan José Mata
16a1569eab Bump version
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2025-08-12 03:42:32 +02:00