Commit Graph

1877 Commits

Author SHA1 Message Date
github-actions[bot]
f94a04d2e1 Bump version to next alpha after v0.6.7-alpha.10 release 2026-01-15 12:23:56 +00:00
soky srm
d1b8d585ce FIX merchant regression (#659) 2026-01-15 13:14:10 +01: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
Alessio Cappa
fabd60c098 fix: PWA display issues (#653)
* feat: re-apply PWA changes from previous PR

* feat: adjust padding on pages for mobile

* fix: Add position relative to netWorthChart to avoid overflow issues on mobile

* fix: Add safe-area to progress bar

* feat: add missing class on html

* fix: Replace touch-none with overscroll-none
2026-01-15 12:53:35 +01:00
Alessio Cappa
5d6abf7b48 feat: Add more category icons (#651)
* feat: Add more category icons

* fix: Fix icon name typo
2026-01-15 10:34:09 +01:00
Alessio Cappa
a50c48d3cf fix: Investments page mobile (#654)
* fix: Mobile layout UI adjustment for trade page

* fix: Adjust table in holdings tab on mobile

* fix: properly manage width on desktop
2026-01-15 10:32:52 +01:00
Juan José Mata
3f62e84531 No API hostname yet for sure.am 2026-01-14 20:53:09 +00:00
Mark Hendriksen
e9ae80c9fa Update selection bar styles and group classes (#648)
* Update selection bar styles and group classes

Replaces hardcoded color classes with design token classes for background, border, and text. Updates group and group-hover class names for edit and delete actions to use more specific variants.

* make the selection dars the same
2026-01-14 19:42:44 +01:00
Jose
8f164b20ef fix(api): Use authorize_scope! for merchants and tags controllers (#643)
* 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

---------

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>
2026-01-14 11:22:19 +01:00
LPW
a780b34421 Fix SimpleFIN liability balance sign when transaction history is incomplete (#642)
* Add sanity check for net balance mismatch in overpayment analysis

- Introduced a validation to detect cases where transactions' net balance deviates significantly from the observed balance (using a 10% or $5 tolerance).
- Returns `:unknown` with a `net-balance-mismatch` error for incomplete data scenarios.

* Clarify liability net-balance comparison logic in overpayment analysis.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-14 11:20:10 +01:00
Juan José Mata
f384f0866b Update PikaPods run button link
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-13 23:48:19 +01:00
Mark Hendriksen
ae254434a1 Add primary text color to amount in header (#640)
* Add primary text color to amount in header

Applied the 'text-primary' class to the amount display in the valuations header for improved visual emphasis and consistency with the design system.

* Update header styles and add currency display

Applied 'text-primary' class to amount displays in trades and transfers headers for consistent styling. Added a secondary styled currency display to the valuations header for improved clarity.
2026-01-13 23:04:56 +01:00
LPW
ff55b977d4 Add sso_audit_logs association and clear logs in demo data cleaner (#638)
- Added `has_many :sso_audit_logs` association to `User` model with `dependent: :nullify`.
- Updated `Demo::DataCleaner` to clear SSO audit logs before destroying related data.

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-13 17:44:51 +01:00
Juan José Mata
ababbb99d0 Is sample_data or demo_data? 2026-01-13 15:53:10 +00:00
soky srm
0e22c60286 FIX Yahoo issues (#636)
* FIX Yahoo issues

* Update yahoo_finance_test.rb

* FIX proper cookie access
2026-01-13 16:46:07 +01:00
Juan José Mata
252042c0dc Fix account subtype not persisting when creating/editing investment accounts (#635)
The Account model only delegated the subtype reader to the accountable,
but not the writer. This caused form submissions with `account[subtype]`
to be silently ignored since there was no setter method on Account.

Changes:
- Add `subtype=` writer method to Account that delegates to accountable
- Add additional investment subtypes (457b, sep_ira, simple_ira, trust,
  ugma, utma, other) to Investment::SUBTYPES for better coverage
- Update PlaidAccount::TypeMappable with additional investment subtype
  mappings (403b, 457b, sep_ira, simple_ira, trust, ugma, utma)

Fixes #502

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-13 14:46:19 +01:00
Juan José Mata
88241cf5cb Fix tags getting removed after / during bank sync (#634)
* fix: Preserve transaction tags during rule application

When rules set tags, they now ADD to existing tags instead of replacing
them. This fixes issue #518 where tags were being removed during bank sync.

The root cause was that SetTransactionTags called enrich_attribute with
just the single tag from the rule, which replaced all existing tags.
Now it merges the new tag with existing tags using .uniq to prevent
duplicates.

This preserves:
- User-applied tags that shouldn't be overwritten by rules
- Tags from other rules when multiple rules match the same transaction
- Tags set during previous syncs

* fix: Add nil guard for tag in SetTransactionTags

Return early with 0 if the tag is not found, preventing NoMethodError
when find_by_id returns nil. This matches the pattern used in
SetTransactionMerchant.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-13 14:33:46 +01:00
soky srm
0bf3084738 Merge pull request #508 from kysre/add-config-import-csv-skip-first-x-rows
Add config import csv skip first x rows
2026-01-13 14:05:01 +01:00
sokie
4af588d1e6 i8n and fix test 2026-01-13 13:56:37 +01:00
sokie
11a011db15 Update import.rb 2026-01-13 13:51:10 +01:00
sokie
c9b334ac4f Add rows validation 2026-01-13 13:50:12 +01:00
sokie
30d3ee167e FIX add debounce for field
and refresh only form update
2026-01-13 13:45:40 +01:00
sokie
ff921799e4 Update _transaction_import.html.erb 2026-01-13 13:41:05 +01:00
sokie
7297554a55 Fix issues
Issue 1 Fixed - Template now carries rows_to_skip.
  Issue 2 Fixed - Column headers refresh when rows_to_skip changes.
2026-01-13 13:35:38 +01:00
Alessio Cappa
5f8a0dc78e FIX: Small layout adjustments (#507)
* feat: adjust padding and icon sizing in outflows chart

* fix: Remove extra div in reports page to fix layout issues on mobile

* fix: Padding adjustments to keep pages consistent

* fix: Align report page with main
2026-01-13 13:23:10 +01:00
Juan José Mata
accdbb799b Merge branch 'main' into add-config-import-csv-skip-first-x-rows
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-01-13 12:56:22 +01: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
13248b6803 Merge pull request #627 from ptr-b/dup_transaction_category
Fix category assignment in transaction overview on desktop (duplicate category menu IDs for mobile/desktop)
2026-01-13 10:15:43 +01:00
soky srm
0c92eb91b3 Merge pull request #608 from luckyPipewrench/investment-activity
Investment activity labels and classification
2026-01-13 10:13:31 +01:00
Jose
39ba65df77 feat: Add Merchants and Tags API v1 Endpoints (#620)
* 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

---------

Signed-off-by: Jose <39016041+jospaquim@users.noreply.github.com>
2026-01-13 10:10:15 +01:00
LPW
7c3af7d85e refactor: streamline SimpleFIN connection updates for improved efficiency (#631)
- Introduced `update_access_url!` method to reuse existing SimpleFIN items during reconnections, preserving account linkages.
- Refactored `SimplefinConnectionUpdateJob` to update access URLs in place without creating new items or transferring accounts.
- Adjusted sync logic to leverage `repair_stale_linkages` for seamless reconnections.
- Enhanced `SimplefinItem::Importer` to auto-recover the `good` status if no auth errors are found during sync.
- Updated tests to validate in-place updates and preserved account relationships.

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-13 09:39:26 +01:00
LPW
320e087a22 Add support for displaying and managing legacy SSO providers (#628)
* feat: add support for displaying and managing legacy SSO providers

- Introduced UI section for environment/YAML-configured SSO providers.
- Added warnings and guidance on migrating legacy providers to database-backed configuration.
- Enhanced localization with new keys for legacy provider management.
- Updated form and toggle components for improved usability.

* Expand SSO documentation: add SAML 2.0 support, JIT provisioning settings, super-admin setup steps, audit logging, and user administration details.

* Update JIT provisioning docs: clarify role mapping behavior and add examples; note new `logout_idp` audit log event.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-13 09:37:19 +01:00
LPW
6e240a2332 Add test for dormant credit cards with zero balance and adjust processor logic (#630)
- Added a new test to validate how dormant credit cards with zero balance and negative available balance are processed.
- Updated processor logic to ensure `current_balance` takes precedence when explicitly set to zero, preventing incorrect usage of `available_balance`.

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-13 09:32:05 +01:00
Lazy Bone
62dabb6971 Fix: Transaction Sync Issues & Enhanced Debugging (#632)
* Fix mobile app to fetch all transactions with pagination

The mobile app was only fetching 25 transactions per account because:
1. TransactionsService didn't pass pagination parameters to the API
2. The backend defaults to 25 records per page when no per_page is specified
3. SyncService didn't implement pagination to fetch all pages

Changes:
- Updated TransactionsService.getTransactions() to accept page and perPage parameters
- Modified the method to extract and return pagination metadata from API response
- Updated SyncService.syncFromServer() to fetch all pages (up to 100 per page)
- Added pagination loop to continue fetching until all pages are retrieved
- Enhanced logging to show pagination progress

This ensures users see all their transactions in the mobile app, not just the first 25.

* Add clear local data feature and enhanced sync logging

Added features:
1. Clear Local Data button in Settings
   - Allows users to clear all cached transactions and accounts
   - Shows confirmation dialog before clearing
   - Displays success/error feedback

2. Enhanced sync logging for debugging
   - Added detailed logs in syncFromServer to track pagination
   - Shows page-by-page progress with transaction counts
   - Logs pagination metadata (total pages, total count, etc.)
   - Tracks upsert progress every 50 transactions
   - Added clear section markers for easier log reading

3. Simplified upsertTransactionFromServer logging
   - Removed verbose debug logs to reduce noise
   - Keeps only essential error/warning logs

This will help users troubleshoot sync issues by:
- Clearing stale data and forcing a fresh sync
- Providing detailed logs to identify where sync might fail

* Fix transaction accountId parsing from API response

The mobile app was only showing 25 transactions per account because:
- The backend API returns account info in nested format: {"account": {"id": "xxx"}}
- The mobile Transaction model expected flat format: {"account_id": "xxx"}
- When parsing, accountId was always empty, so database queries by account_id returned incomplete results

Changes:
1. Updated Transaction.fromJson to handle both formats:
   - New format: {"account": {"id": "xxx", "name": "..."}}
   - Old format: {"account_id": "xxx"} (for backward compatibility)

2. Fixed classification/nature field parsing:
   - Backend sends "classification" field (income/expense)
   - Mobile uses "nature" field
   - Now handles both fields correctly

3. Added debug logging to identify empty accountId issues:
   - Logs first transaction's accountId when syncing
   - Counts and warns about transactions with empty accountId
   - Shows critical errors when trying to save with empty accountId

This ensures all transactions from the server are correctly associated with their accounts in the local database.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-13 09:27:39 +01:00
Josh Waldrep
5c300989a7 Remove unused loan_payment key from transaction locale 2026-01-12 16:17:36 -05:00
Pieter
8f56aa2877 Fix duplicate category menu IDs for mobile/desktop
Mobile and desktop transaction category menus now use
variant-specific DOM IDs and the turbo stream response
updates both targets. This prevents duplicate IDs that
caused the menu not to close on first click on desktop.
2026-01-12 22:08:59 +01:00
Josh Waldrep
308a4ab048 Refactor Plaid transaction type mapping and improve label handling
- Updated `PLAID_TYPE_TO_LABEL` in `TransactionsProcessor` to consolidate labels ("Cancel" and "Cash" now mapped to "Other").
- Adjusted `label_from_plaid_type` to return "Other" as the default fallback.
- Enhanced tests to include additional valid activity labels and ensure label consistency.
- Minor fixes to locale keys for transaction views.
2026-01-12 16:04:53 -05:00
Josh Waldrep
2f20d715a4 Remove exclude_from_cashflow column from schema
This column was never meant to be added - the migration is a no-op.
The schema.rb was incorrectly committed with this column during rebase.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 15:48:42 -05:00
Josh Waldrep
582eda999b Remove exclude_from_cashflow flag and consolidate logic into excluded toggle
- Removed `exclude_from_cashflow` attribute across models, controllers, and views.
- Updated queries to rely solely on the `excluded` flag for filtering transactions and entries.
- Simplified migration by consolidating `exclude_from_cashflow` functionality into the existing `excluded` toggle.
- Refactored related tests to remove outdated logic and ensured compatibility with the updated implementation.
2026-01-12 15:35:38 -05:00
Josh Waldrep
cfda5a6d3d Remove InvestmentActivityDetector and related functionality
- Deleted the `InvestmentActivityDetector` and associated tests.
- Removed rake tasks for backfilling and clearing investment activity labels.
- Simplified transaction processing in `SimplefinEntry::Processor` by removing inferred activity label logic.
- Added new rule `SetInvestmentActivityLabel` for setting labels using rules.
- Updated `Rule::Registry::TransactionResource` to include the new rule executor.
2026-01-12 15:35:14 -05:00
Josh Waldrep
307a8bb760 Localize investment activity labels and improve transaction processing
- Replaced hardcoded activity labels with `I18n` translations for better localization.
- Updated `transactions` views to display localized labels dynamically.
- Fixed `InvestmentActivityDetector` to enhance dividend detection.
- Refined `Account::ProviderImportAdapter` to prevent unnecessary updates and ensure transactional consistency.
- Improved error handling and feedback in rake tasks for invalid arguments.
2026-01-12 15:35:14 -05:00
LPW
e5fbdfb593 Add cost basis source tracking with manual override and lock protection (#623)
* Add cost basis tracking and management to holdings

- Added migration to introduce `cost_basis_source` and `cost_basis_locked` fields to `holdings`.
- Implemented backfill for existing holdings to set `cost_basis_source` based on heuristics.
- Introduced `Holding::CostBasisReconciler` to manage cost basis resolution logic.
- Added user interface components for editing and locking cost basis in holdings.
- Updated `materializer` to integrate reconciliation logic and respect locked holdings.
- Extended tests for cost basis-related workflows to ensure accuracy and reliability.

* Fix cost basis calculation in holdings controller

- Ensure `cost_basis` is converted to decimal for accurate arithmetic.
- Fix conditional check to properly validate positive `cost_basis`.

* Improve cost basis validation and error handling in holdings controller

- Allow zero as a valid cost basis for gifted/inherited shares.
- Add error handling with user feedback for invalid cost basis values.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-12 15:35:14 -05:00
Josh Waldrep
96022cbe9a Update PlaidAccount::Processor to use resolved security from response
- Refactored to extract `security` from `security_resolver.resolve` response for better clarity and consistency.
2026-01-12 15:35:14 -05:00
Josh Waldrep
52588784d0 Add investment activity detection, labels, and exclusions
- Introduced `InvestmentActivityDetector` to mark internal investment activity as excluded from cashflow and assign appropriate labels.
- Added `exclude_from_cashflow` flag to `entries` and `investment_activity_label` to `transactions` with migrations.
- Implemented rake tasks to backfill and clear investment activity labels.
- Updated `PlaidAccount::Investments::TransactionsProcessor` to map Plaid transaction types to labels.
- Included comprehensive test coverage for new functionality.
2026-01-12 15:35:14 -05:00
copilot-swe-agent[bot]
70e7a5f2d6 Initial plan 2026-01-12 15:33:24 -05:00
Andrei Onel
8b6392e1d1 Updated documentation for release v0.6.7-alpha.1 (#563)
* Update charts/sure/values.yaml

* Update charts/sure/README.md

* Update charts/sure/CHANGELOG.md

* Revert changelog changes

Signed-off-by: Andrei Onel <onel@users.noreply.github.com>

* Update documentation to use nested strategy.rollingUpdate

Signed-off-by: Andrei Onel <onel@users.noreply.github.com>

* Update values.yaml to use nested strategy.rollingUpdate 

Signed-off-by: Andrei Onel <onel@users.noreply.github.com>

---------

Signed-off-by: Andrei Onel <onel@users.noreply.github.com>
2026-01-12 17:32:19 +01:00
Juan José Mata
ebdaafaf95 Remove deprecated code 2026-01-12 15:13:19 +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
soky srm
66d83c5c21 Merge pull request #618 from alessiocappa/FT-AddAutoSyncOptions
feat: Add automatic sync settings
2026-01-12 15:12:16 +01:00
sokie
30923b7296 FIX address comments 2026-01-12 15:05:28 +01:00