* feat: combine icon + color in outflows section to optimize space on mobile
* fix: adjust spacing in outflows table
* fix: adjust padding and icon sizing
* Replace text-danger with text-destructive in reports views
Updated multiple report partials to use the 'text-destructive' class instead of 'text-danger' as this does not exist. This affects budget performance, summary dashboard, transactions breakdown, and trends insights views.
* Replace bg-danger with bg-destructive in report views
* Initial implementation
* FIX keys
* Add langfuse evals support
* FIX trace upload
* Delete .claude/settings.local.json
Signed-off-by: soky srm <sokysrm@gmail.com>
* Update client.rb
* Small LLMs improvements
* Keep batch size normal
* Update categorizer
* FIX json mode
* Add reasonable alternative to matching
* FIX thinking blocks for llms
* Implement json mode support with AUTO mode
* Make auto default for everyone
* FIX linter
* Address review
* Allow export manual categories
* FIX user export
* FIX oneshot example pollution
* Update categorization_golden_v1.yml
* Update categorization_golden_v1.yml
* Trim to 100 items
* Update auto_categorizer.rb
* FIX for auto retry in auto mode
* Separate the Eval Logic from the Auto-Categorizer
The expected_null_count parameter conflates eval-specific logic with production categorization logic.
* Force json mode on evals
* Introduce a more mixed dataset
150 items, performance from a local model:
By Difficulty:
easy: 93.22% accuracy (55/59)
medium: 93.33% accuracy (42/45)
hard: 92.86% accuracy (26/28)
edge_case: 100.0% accuracy (18/18)
* Improve datasets
Remove Data leakage from prompts
* Create eval runs as "pending"
---------
Signed-off-by: soky srm <sokysrm@gmail.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
* Add Recent Runs visibility for rule executions
Adds a comprehensive tracking system for rule execution history with the following features:
- Creates RuleRun model to track execution metadata:
* Date/time of execution
* Execution type (manual/scheduled)
* Success/failure status
* Rule reference
* Transaction counts (processed and modified)
* Error messages for failed runs
- Updates RuleJob to automatically record execution results:
* Captures transaction processing statistics
* Handles success/failure states
* Stores error details for debugging
- Adds "Recent Runs" section to rules index page:
* Paginated display (20 runs per page)
* Columnar layout similar to LLM usage page
* Visual status indicators (success/failed badges)
* Error tooltips for failed runs
* Responsive design with design system tokens
- Includes i18n translations for all user-facing strings
This provides users with visibility into rule execution history, making it easier to debug issues and monitor rule performance.
* Update schema.rb with rule_runs table definition
* Linter noise
* Separate transaction counts into Queued, Processed, and Modified
Previously, the code eagerly reported transactions as "processed" when they
were only queued for processing. This commit separates the counts into three
distinct metrics:
- Transactions Queued: Count of transactions matching the rule's filter
conditions before any processing begins
- Transactions Processed: Count of transactions that were actually processed
and modified by the rule actions
- Transactions Modified: Count of transactions that had their values changed
(currently same as Processed, but allows for future differentiation)
Changes:
- Add transactions_queued column to rule_runs table
- Update RuleJob to track all three counts separately
- Update action executors to return count of modified transactions
- Update Rule#apply to aggregate modification counts from actions
- Add transactions_queued label to locales
- Update Recent Runs view to display new column
- Add validation for transactions_queued in RuleRun model
The tracking now correctly reports:
1. How many transactions matched the filter (queued)
2. How many were actually modified (processed/modified)
3. Distinguishes between matching and modifying transactions
* Add Pending status to track async rule execution progress
Introduced a new "pending" status for rule runs to properly track async
AI operations. The system now:
- Tracks pending async jobs with a counter that decrements as jobs complete
- Updates transactions_modified incrementally as each job finishes
- Only counts transactions that were actually modified (not just queued)
- Displays pending status with yellow badge in the UI
- Automatically transitions from pending to success when all jobs complete
This provides better visibility into long-running AI categorization and
merchant detection operations, showing real-time progress as Sidekiq
processes the batches.
* Fix migration version to 7.2 as per project standards
* Consolidate rule_runs migrations into single migration file
Merged three separate migrations (create, add_transactions_queued,
add_pending_jobs_count) into a single CreateRuleRuns migration.
This provides better clarity and maintains a clean migration history.
Changes:
- Updated CreateRuleRuns migration to include all columns upfront
- Removed redundant add_column migrations
- Updated schema version to 2025_11_24_000000
* Linter and test fixes
* Space optimization
* LLM l10n is better than no l10n
* Fix implementation for tags/AI rules
* Fix tests
* Use batch_size
* Consider jobs "unknown" status sometimes
* Rabbit suggestion
* Rescue block for RuleRun.create!
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add full import/export support for rules with versioned JSON schema
This commit implements comprehensive import/export functionality for rules,
allowing users to back up and restore their rule definitions.
Key features:
- Export rules to both CSV and NDJSON formats with versioned schema (v1)
- Import rules from CSV with full support for nested conditions and actions
- UUID to name mapping for categories and merchants for portability
- Support for compound conditions with sub-conditions
- Comprehensive test coverage for export and import functionality
- UI integration for rules import in the imports interface
Technical details:
- Extended Family::DataExporter to generate rules.csv and include rules in all.ndjson
- Created RuleImport model following the existing Import STI pattern
- Added migration for rule-specific columns in import_rows table
- Implemented serialization helpers to map UUIDs to human-readable names
- Added i18n support for the new import option
- Included versioning in NDJSON export to support future schema evolution
The implementation ensures rules can be safely exported from one family
and imported into another, even when category/merchant IDs differ,
by mapping between names and IDs during export/import.
* Fix AR migration version
* Mention support for rules export
* Rabbit suggestion
* Fix tests
* Missed schema.rb
* Fix sample CSV download for rule import
* Fix parsing in Rules import
* Fix tests
* Rule import message i18n
* Export tag names, not UUIDs
* Make sure tags are created if needed at import
* Avoid test errors when running in parallel
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Add tests and logic for Simplefin account balance normalization
- Introduced `SimplefinAccountProcessorTest` to verify balance normalization logic.
- Updated `SimplefinAccount::Processor` to invert negative balances for liability accounts (credit cards and loans) while keeping asset balances unchanged.
- Added comments to clarify balance conventions and sign normalization rules.
* Refactor balances-only sync logic and improve tests for edge cases
- Updated `SimplefinItem::Importer` and `SimplefinItem::Syncer` to ensure `last_synced_at` remains nil during balances-only runs, preserving chunked-history behavior for full syncs.
- Introduced additional comments to clarify balances-only implications and syncing logic.
- Added test case in `SimplefinAccountProcessorTest` to verify correct handling of overpayment for credit card liabilities.
- Refined balance normalization in `SimplefinAccount::Processor` to always invert liability balances for consistency.
---------
Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
* Initial enable banking implementation
* Handle multiple connections
* Amount fixes
* Account type mapping
* Add option to skip accounts
* Update schema.rb
* Transaction fixes
* Provider fixes
* FIX account identifier
* FIX support unlinking
* UI style fixes
* FIX safe redirect and brakeman issue
* FIX
- pagination max fix
- wrap crud in transaction logic
* FIX api uid access
- The Enable Banking API expects the UUID (uid from the API response) to fetch balances/transactions, not the identification_hash
* FIX add new connection
* FIX erb code
* Alert/notice box overflow protection
* Give alert/notification boxes room to grow (3 lines max)
* Add "Enable Banking (beta)" to `/settings/bank_sync`
* Make Enable Banking section collapsible like all others
* Add callback hint to error message
---------
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
* Initial implementation
* Add support for reports section too
* UI Improvement
now it looks a lot nicer :)
* Remove duplicate section titles
* FIX malformed DIV
* Add accessibility and touch support
WCAG 2.1 Level AA Compliant
- Keyboard operable (Success Criterion 2.1.1)
- Focus visible (Success Criterion 2.4.7)
- Name, Role, Value (Success Criterion 4.1.2)
Screen Reader Support
- Clear instructions in aria-label
- Proper semantic roles
- State changes announced via aria-grabbed
* Add proper UI for tab highlight
* Add keyboard support to collapse also
* FIX js errors
* Fix rabbit
* FIX we don't need the html
* FIX CSRF and error handling
* Simplify into one single DB migration
---------
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
* Improvements
- Fix button visibility in reports on light theme
- Unify logic for provider syncs
- Add default option is to skip accounts linking ( no op default )
* Stability fixes and UX improvements
* FIX add unlinking when deleting lunch flow connection as well
* Wrap updates in transaction
* Some more improvements
* FIX proper provider setup check
* Make provider section collapsible
* Fix balance calculation
* Restore focus ring
* Use browser default focus
* Fix lunch flow balance for credit cards
* - Add tests for `Simplefin::AccountTypeMapper` and `AccountSimplefinCreation`
- Implement `Simplefin::AccountTypeMapper` for account type inference with fallback-only logic
- Enhance inactive state handling for `SimplefinItem::Importer`
- Improve subtype selection handling in views with confidence-based inference
* Remove unnecessary `.presence` check for `openai_uri_base` in hostings settings
* Refine zero balance detection logic in `SimplefinItem::Importer` and add regression test for missing balances scenario
* Enhance account type and subtype inference logic with explicit investment subtype mapping, improved regex handling, and institution-based credit card detection
* Refine retirement subtype mapping in `AccountTypeMapper` tests with explicit case-based assertions
* Expand `AccountTypeMapper` investment subtype mapping to include `403b` and `tsp` with updated regex definitions
* Remove unused `retirement_hint?` method in `AccountTypeMapper` to simplify codebase
---------
Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>