Commit Graph

2313 Commits

Author SHA1 Message Date
soky srm
8dc5c92282 Merge pull request #1210 from lolimmlost/fix/dashboard-touch-hold
Fix dashboard mobile: require press-and-hold to reorder sections
2026-03-24 16:40:00 +01:00
Copilot
dbc104dc5d Fix missing privacy blur on split transaction amounts in drawer (#1275)
* Initial plan

* Fix privacy blur missing on split transaction amounts in drawer

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
Agent-Logs-Url: https://github.com/we-promise/sure/sessions/658e35ef-e82a-4446-bd11-19b9b67c54a7

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
2026-03-24 14:30:23 +01:00
LPW
1ddc427fd5 chore(helm): bump pipelock to v2.0.0 with trusted domains and redirect profiles (#1266)
* chore(helm): bump pipelock to v2.0.0 with trusted domains and redirect profiles

- Bump pipelock image tag from 1.5.0 to 2.0.0
- Add first-class Helm values for trustedDomains and mcpToolPolicy.redirectProfiles
- Update CI GitHub Action from @v1 to @v2
- Update compose example, config reference, and docs with v2.0 features

* Releasing this today in `alpha` form

---------

Co-authored-by: Juan José Mata <jjmata@jjmata.com>
2026-03-24 09:30:54 +01:00
Geoffrey
f3ed07f96b Updated list of Canadian registered accounts (#1265)
* Added FHSA, RDSP, and DPSP to app/models/investment.rb

* Update investment.rb

Signed-off-by: Geoffrey <79559478+CYBRXT@users.noreply.github.com>

* Fixed RDSP tax treatment (tax-deferred -> tax-advantaged)

Signed-off-by: Geoffrey <79559478+CYBRXT@users.noreply.github.com>

* Added non-registered account to the list (taxable)

Signed-off-by: Geoffrey <79559478+CYBRXT@users.noreply.github.com>

* Reordering

Signed-off-by: Geoffrey <79559478+CYBRXT@users.noreply.github.com>

---------

Signed-off-by: Geoffrey <79559478+CYBRXT@users.noreply.github.com>
Co-authored-by: Geoffrey <geoffrey@github.worker>
2026-03-24 09:28:38 +01:00
dependabot[bot]
a292d93835 chore(deps): bump activestorage from 7.2.2.2 to 7.2.3.1 (#1263)
* chore(deps): bump activestorage from 7.2.2.2 to 7.2.3.1

Bumps [activestorage](https://github.com/rails/rails) from 7.2.2.2 to 7.2.3.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v8.1.2.1/activestorage/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.2.2.2...v7.2.3.1)

---
updated-dependencies:
- dependency-name: activestorage
  dependency-version: 7.2.3.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix flaky trades system tests racing with Turbo form submission (#1270)

* Initial plan

* Fix flaky trades system tests by waiting for form submission to complete

Add assert_text "Entry created" after click_button "Add transaction" to
ensure the Turbo form submission completes before navigating to the
activity tab. Without this wait, the visit call could interrupt the
in-flight Turbo request, causing the trade to never be created.

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
Agent-Logs-Url: https://github.com/we-promise/sure/sessions/45455cc4-e81e-41aa-bce6-9f67b982e81f

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
2026-03-24 09:25:36 +01:00
juan
a9e1c221a5 Fix: use interaction state instead of device capability for drag guard
isTouchDevice() blocked mouse/trackpad drag on touch-capable laptops
(e.g. Windows with touchscreen). Now checks if a touch interaction is
actually in progress instead.

Also adds touchcancel binding to clean up hold timer state when the
OS interrupts a touch (notifications, palm rejection, etc).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 17:07:12 -07:00
Juan José Mata
9642856b0d Fix import flow regression. 2026-03-23 20:11:51 +00:00
Juan José Mata
a10af59f42 Fix SimpleFIN holdings confusing market value with cost basis (#1182) (#1261)
Remove "value" from the market_value fallback chain in the SimpleFIN
HoldingsProcessor and add it to the cost_basis fallback chain instead.
Some brokerages (Vanguard, Fidelity) use "value" to represent cost basis,
causing the system to display average cost per share as the current price
and show massive phantom losses.

https://claude.ai/code/session_01V2gC6BPT3sF7Hu4XQgUQT4

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-23 19:39:32 +01:00
soky srm
7b93f63628 Merge pull request #1259 from we-promise/claude/add-api-docs-routes-ezupi
Add rswag API docs routes for development mode
2026-03-23 19:06:01 +01:00
Claude
30b79be3b4 Add rswag API docs routes for development mode
Move rswag gems (rswag-api, rswag-ui, rspec-rails) from test-only to
development+test group so Swagger UI is available in development.
Mount Rswag::Api and Rswag::Ui engines at /api-docs behind a
Rails.env.development? guard. Add initializer to configure the UI
endpoint and API root directory.

https://claude.ai/code/session_011D98PaUEbXpREr8LyQqPvw
2026-03-23 17:38:25 +00:00
soky srm
c7b9bc48bc Adapt holdings to number inputs (#1258)
* Adapt holdings to number inputs

* Reviews

* FIX a small provider hardcoded name

* PR l10n request

---------

Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-03-23 18:27:53 +01:00
github-actions[bot]
20f279875e Bump version to next iteration after v0.6.9-alpha.8 release 2026-03-23 14:40:55 +00:00
Juan José Mata
2595885eb7 Full .ndjson import / reorganize UI with Financial Tools / Raw Data tabs (#1208)
* Reorganize import UI with Financial Tools / Raw Data tabs

Split the flat list of import sources into two tabbed sections using
DS::Tabs: "Financial Tools" (Mint, Quicken/QIF, YNAB coming soon) and
"Raw Data" (transactions, investments, accounts, categories, rules,
documents). This prepares for adding more tool-specific importers
without cluttering the list.

https://claude.ai/code/session_01BM4SBWNhATqoKTEvy3qTS3

* Fix import controller test to account for YNAB coming soon entry

The new YNAB "coming soon" disabled entry adds a 5th aria-disabled
element to the import dialog.

https://claude.ai/code/session_01BM4SBWNhATqoKTEvy3qTS3

* Fix system tests to click Raw Data tab before selecting import type

Transaction, trade, and account imports are now under the Raw Data tab
and need an explicit tab click before the buttons are visible.

https://claude.ai/code/session_01BM4SBWNhATqoKTEvy3qTS3

* feat: Add bulk import for NDJSON export files

Implements an import flow that accepts the full all.ndjson file from data exports,
allowing users to restore their complete data including:
- Accounts with accountable types
- Categories with parent relationships
- Tags and merchants
- Transactions with category, merchant, and tag references
- Trades with securities
- Valuations
- Budgets and budget categories
- Rules with conditions and actions (including compound conditions)

Key changes:
- Add BulkImport model extending Import base class
- Add Family::DataImporter to handle NDJSON parsing and import logic
- Update imports controller and views to support NDJSON workflow
- Skip configuration/mapping steps for structured NDJSON imports
- Add i18n translations for bulk import UI
- Add tests for BulkImport and DataImporter

* fix: Fix category import and test query issues

- Add default lucide_icon ("shapes") for categories when not provided
- Fix valuation test to use proper ActiveRecord joins syntax

* Linter errors

* fix: Add default color for tags when not provided in import

* fix: Add default kind for transactions when not provided in import

* Fix test

* Fix tests

* Fix remaining merge conflicts from PR 766 cherry-pick

Resolve conflict markers in test fixtures and clean up BulkImport
entry in new.html.erb to use the _import_option partial consistently.

https://claude.ai/code/session_01BM4SBWNhATqoKTEvy3qTS3

* Import Sure `.ndjson`

* Remove `.ndjson` import from raw data

* Fix support for Sure "bulk" import from old branch

* Linter

* Fix CI test

* Fix more CI tests

* Fix tests

* Fix tests / move PDF import to first tab

* Remove redundant title

---------

Co-authored-by: Claude <noreply@anthropic.com>
v0.6.9-alpha.8
2026-03-23 14:27:41 +01:00
Anas Limouri
998ea6f7c5 fix: Resolve infinite sync loop on SnapTrade setup accounts page (#1256)
* Fix infinite sync loop on SnapTrade setup accounts page

* Address PR feedback: behavior assertions & stale sync recovery

- Uses `latest_sync.completed?` so we don't drop dropped/failed syncs
- Replaces `assigns` checks with `assert_select` DOM checks
- Adds required IDs/classes to the html template for assertions
2026-03-23 14:22:37 +01:00
soky srm
02a5f5d0da Merge pull request #1176 from we-promise/claude/fix-issue-1138-uRWb6
Fix decimal separator handling in money input fields
2026-03-23 13:46:35 +01:00
sokiee
67b502f3bf FIX comma 2026-03-23 13:39:57 +01:00
soky srm
12d2f4e36d Provider merchants enhancement (#1254)
* Add AI merchant enhancement and dedup

* Enhancements

Add error if job is already running
add note that we also merge merchants

* Allow updating provider website

* Review fixes

* Update provider_merchant.rb

* Linter and fixes

* FIX transaction quick menu modal
2026-03-23 12:34:43 +01:00
Lazy Bone
cd601f1c2e Fix home page double AppBar inconsistency with settings/more pages (#1250)
* Move debug logs button from Home to Settings page, remove refresh/logout from Home AppBar

- Remove Debug Logs, Refresh, and Sign Out buttons from DashboardScreen AppBar
- Add Debug Logs ListTile entry in SettingsScreen under app info section
- Remove unused _handleLogout method from DashboardScreen
- Remove unused log_viewer_screen.dart import from DashboardScreen

https://claude.ai/code/session_017XQZdaEwUuRS75tJMcHzB9

* Fix home page double AppBar inconsistency with settings/more pages

The DashboardScreen had its own AppBar with a sync success icon, while
MainNavigationScreen already provides a shared AppBar (logo + settings)
for all tabs. This caused the home page to render a double top bar,
inconsistent with the settings and more screens which have no extra
AppBar. Remove the dashboard's AppBar and move the sync indicator into
the body as an inline banner.

https://claude.ai/code/session_0155XXsvt5zKLBpasmdkhPiF

* Fix sync success cloud icon not appearing after sync

The cloud icon only showed when pending transaction count decreased
(local→server uploads). For normal pull-to-refresh syncs that download
from server, pendingCount stays at 0 so the icon never triggered.

Fix by also detecting when TransactionsProvider.isLoading transitions
from true to false (any sync completion), and by triggering the icon
directly after successful manual sync instead of showing a redundant
snackbar.

https://claude.ai/code/session_0155XXsvt5zKLBpasmdkhPiF

* Address PR review: fix Timer leak, sync error check, false triggers

1. Timer leak (CodeRabbit): Replace Future.delayed with a cancellable
   Timer field (_syncSuccessTimer). Cancel existing timer before
   starting a new one, and clean up in dispose().

2. Sync error not checked (CodeRabbit): _performManualSync now checks
   transactionsProvider.error after syncTransactions() returns. Shows
   error SnackBar on failure instead of false success indicator.

3. False positive triggers (Codex): Remove isLoading transition
   detection from _onTransactionsChanged since isLoading also toggles
   for fetchTransactions (non-sync paths). Keep only pendingDecreased
   for background sync detection; manual sync uses direct call path.

https://claude.ai/code/session_0155XXsvt5zKLBpasmdkhPiF

* Update mobile/lib/screens/dashboard_screen.dart

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Lazy Bone <89256478+dwvwdv@users.noreply.github.com>

---------

Signed-off-by: Lazy Bone <89256478+dwvwdv@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-23 10:53:24 +01:00
juan
1b06a2f46b Revert "Use nearest-edge distance for symmetrical drag reorder of tall sections"
This reverts commit 53c5f5759d.
2026-03-23 00:00:38 -07:00
juan
53c5f5759d Use nearest-edge distance for symmetrical drag reorder of tall sections
Center-point distance made it harder to drag sections down than up
because tall sections (charts, sankey) have their center far from
the edge. Now uses distance to nearest edge — section height no
longer affects how far you need to drag to trigger a swap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:52:15 -07:00
juan
f37378b2ff Revert edge-based insertion, restore center-point drag algorithm
Edge-based insertion was too restrictive for tall uncollapsed sections
since the gap between them is only ~24px. The center-point approach
works better for the common case. The key improvements (800ms hold
delay, native dragstart cancellation, text selection prevention,
Euclidean movement cancellation) remain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:44:48 -07:00
juan
b0ce345c30 Reduce hold delay to 800ms and prevent text selection during hold
1000ms was long enough to trigger browser text selection before drag
activated. Reduced to 800ms and added userSelect:none on the section
during the touch hold period, restored when touch ends.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:40:25 -07:00
juan
fbcc261c9c Fix: cancel native dragstart on touch devices to enforce hold delay
The sections have draggable="true" which triggers native HTML5 drag
on touch with zero delay, bypassing our 1000ms hold-to-drag logic
entirely. This was most noticeable with collapsed sections where a
brief touch-and-drag instantly reordered them. Now native dragstart
is cancelled on touch devices, forcing all touch reordering through
the hold delay path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:27:00 -07:00
Alessio Cappa
ddf1c732d3 Add "logo" variant in account dropdown on transfer form (#1241)
* feat: Add :logo variant in account dropdown on transfer form

* fix test

* fix test

* fix: avoid multiple queries on accounts
2026-03-22 23:59:57 +01:00
github-actions[bot]
d6a0a3c588 Bump version to next iteration after v0.6.9-alpha.7 release 2026-03-22 15:25:23 +00:00
Lazy Bone
ac1b2e621e Move debug logs button from Home to Settings page, remove refresh/logout from Home AppBar (#1146)
- Remove Debug Logs, Refresh, and Sign Out buttons from DashboardScreen AppBar
- Add Debug Logs ListTile entry in SettingsScreen under app info section
- Remove unused _handleLogout method from DashboardScreen
- Remove unused log_viewer_screen.dart import from DashboardScreen

https://claude.ai/code/session_017XQZdaEwUuRS75tJMcHzB9

Co-authored-by: Claude <noreply@anthropic.com>
v0.6.9-alpha.7
2026-03-22 16:08:35 +01:00
Lazy Bone
87c12e9db7 Add GET /api/v1/summary endpoint and display net worth on mobile home (#1145)
* Add GET /api/v1/summary endpoint and display net worth on mobile home

- Create SummaryController that leverages existing BalanceSheet model to
  return net_worth, assets, and liabilities (with currency conversion)
- Add SummaryService in mobile to call the new endpoint
- Update AccountsProvider to fetch summary data alongside accounts
- Replace "Net Worth — coming soon" placeholder in NetWorthCard with
  the actual formatted net worth value from the API

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Bump mobile version to 0.7.0+2 for net worth feature

Android requires versionCode to increase for APK updates to install.

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Fix version to 0.6.9+2

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Rename /api/v1/summary to /api/v1/balance_sheet

Address PR #1145 review feedback:

- Rename SummaryController to BalanceSheetController to align with the
  BalanceSheet domain model and follow existing API naming conventions
- Rename mobile SummaryService to BalanceSheetService with updated endpoint
- Fix unsafe type casting: use `as String?` instead of `as String` for
  currency field to handle null safely
- Fix balance sheet fetch to run independently of account sync success,
  so net worth displays even with cached/offline accounts
- Update tests to use API key authentication instead of Doorkeeper OAuth

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Add rswag OpenAPI spec, fix error message, add docstrings, revert version bump

- Add spec/requests/api/v1/balance_sheet_spec.rb with Money and
  BalanceSheet schemas in swagger_helper.rb
- Replace raw e.toString() in balance_sheet_service.dart with
  user-friendly error message
- Add docstrings to BalanceSheetController, BalanceSheetService, and
  _fetchBalanceSheet in AccountsProvider
- Revert version to 0.6.9+1 (no version change in this PR)

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Fix route controller mapping and secret scanner trigger

- Add controller: :balance_sheet to singular resource route, since
  Rails defaults to plural BalanceSheetsController otherwise
- Use ApiKey.generate_secure_key + plain_key pattern in test to avoid
  pipelock secret scanner flagging display_key as a credential

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Exclude balance sheet test from pipelock secret scanner

False positive: test creates ephemeral API keys via
ApiKey.generate_secure_key for integration testing, not real credentials.

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Revert pipelock exclusion; use display_key pattern in test

Revert the pipelock.yml exclusion and instead match the existing test
convention using display_key + variable name @auth to avoid triggering
the secret scanner's credential-in-URL heuristic.

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Fix rswag scope and show stale balance sheet indicator

- Use read_write scope in rswag spec to match other API specs convention
- Add isBalanceSheetStale flag to AccountsProvider: set on fetch failure,
  cleared on success, preserves last known values
- Show amber "Outdated" badge and yellow net worth text in NetWorthCard
  when balance sheet data is stale, so users know the displayed value
  may not reflect the latest state

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

* Use theme colorScheme instead of hardcoded amber for stale indicator

Replace Colors.amber with colorScheme.secondaryContainer (badge bg)
and colorScheme.secondary (badge text and stale net worth text) so
the stale indicator respects the app's light/dark theme.

https://claude.ai/code/session_011UhqfrQngAyx49eJVHtVqX

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-22 14:48:10 +01:00
soky srm
0cda69ebb0 Split UI (#1245)
* Initial split transaction support

* Add support to unsplit and edit split

* Update show.html.erb

* FIX address reviews

* Improve UX

* Update show.html.erb

* Reviews

* Update edit.html.erb

* Add parent category to dialog

* Update en.yml

* Add UI indication to totals

* FIX ui update

* Add category select like rest of app

* Add split ui

* Add settings configuration for split transactions

- Adds a new settings section for appearance changes
- Also adds extra checks for delete and API calls
- Also adds checks for parent/child changes

* fixes

- split transactions dark mode fix
- add split transactions to context menu

* Update entry.rb

1. New validation split_child_date_matches_parent — prevents saving a split child with a date different from its parent. This is the root-cause fix that
   protects all flows at once.
  2. Bulk update guard — bulk_update! now strips :date from attributes when processing split children, preventing the validation from raising and silently
   skipping the date change instead.

* N+1 fix for split_parent?

* Update entry.rb

  Problem: In bulk_update!, when a split child has :date removed from attrs (line 432) and the remaining attrs is empty (e.g., the bulk update only
  changed the date), entry.update! {} still ran as a no-op. But lock_saved_attributes! and mark_user_modified! at lines 443-444 executed unconditionally,
  incorrectly marking untouched split children as user-modified and opting them out of future syncs.

  Fix:
  1. Added a changed flag to track whether any actual modification happened
  2. Wrapped entry.update! in an if attrs.present? check so no-op updates are skipped
  3. Gated lock_saved_attributes! and mark_user_modified! behind if changed, so they only run when the entry was actually modified (either via attribute
  update or tag update)

* fixes

1. Indentation in show.html.erb Settings section — The split button block and delete block had extra indentation making them appear nested inside guard
  blocks they weren't part of. Fixed to match actual nesting.
  2. Skip @split_parents query when grouping is off — The controller now only loads split parent entries when show_split_grouped? is true, saving a query
  with joins when the feature is disabled.
2026-03-22 12:02:58 +01:00
Dream
61ee9d34cf Refactor report and dashboard table layouts to semantic HTML (#1222)
* Refactor report and dashboard tables from div grids to semantic HTML

Convert div-based grid layouts to proper <table>/<thead>/<tbody>/<tr>/<th>/<td>
elements in report views and the dashboard investment summary:

- reports/_breakdown_table + _category_row (income/expense breakdown)
- reports/_trends_insights (monthly trends)
- reports/_net_worth (asset/liability summaries)
- reports/_investment_performance (top holdings)
- pages/dashboard/_investment_summary (top holdings)

Replaces shared/ruler dividers with border-b border-divider on <tr> elements.
Updates test selectors from div[data-category] to tr[data-category] and from
[role="columnheader"] to thead/th.

Closes #1121

* Address PR review feedback

- Restore w-max sm:w-full wrapper on report tables to preserve horizontal
  scroll behavior on narrow screens
- Add sr-only accessible header for net worth amount columns
- Use border-divider instead of border-primary in dashboard investment summary

* Fix rounded corners on semantic table body containers

Move rounded-lg, shadow-border-xs, and bg-container from tbody
(where border-radius and box-shadow don't apply) to a wrapper div
with overflow-hidden. Add bg-container-inset on thead to preserve
the two-tone card design.
2026-03-22 11:50:33 +01:00
soky srm
79e8469102 Merge pull request #1055 from ChakibMoMi/feature/privacy-mode
Add privacy mode to blur financial data across the app
2026-03-22 11:06:03 +01:00
sokiee
b6b093c578 Extend privacy headers
Extend privacy mode coverage to remaining financial views

  Transfers, trades, valuations, and holdings detail views were missing
  the privacy-sensitive class, leaving amounts visible when privacy mode
  was enabled. Also adds blur to the summary card partial (used by credit
  cards, loans, etc.), account chart balances, and time series chart
  containers (dashboard net worth and per-account charts).
2026-03-22 10:57:56 +01:00
sokiee
71c0735824 Linter 2026-03-22 10:48:54 +01:00
sokiee
9693477761 Merge main: resolve grid layout conflicts, add missing privacy-sensitive coverage
Resolve merge conflicts in investment summary/performance views where main's
grid layout refactoring conflicted with privacy-sensitive class additions.
Also add privacy-sensitive to transaction list amounts, transaction detail
header, and sankey cashflow chart containers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:46:52 +01:00
juan
573745af78 Use edge-based insertion for symmetrical up/down drag reordering
Replace center-point distance algorithm with edge-crossing logic.
The swap threshold is now at the midpoint of the gap between adjacent
sections, so moving a section up or down requires equal distance
regardless of section height. Also handles 2-column grid layout by
filtering to same-column siblings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 13:08:15 -07:00
LPW
e43a8f295d Bump pipelock image from 0.3.2 to 1.5.0 (#1238)
* Bump pipelock image from 0.3.2 to 1.5.0

* Releasing via `alpha`

---------

Co-authored-by: Juan José Mata <jjmata@jjmata.com>
2026-03-21 15:32:07 +01:00
Yacine Kanzari
62a5255e02 Fix select is hidden inside dialog (#1196)
* Fix Select hidden inside Dialog

* Fix regression in Drawer
2026-03-21 15:14:11 +01:00
Dream
46494bc07f Fix rule condition merchant dropdown to show all merchants (#1240)
The "transaction merchant" condition filter used `family.assigned_merchants`
which only returned merchants already assigned to a transaction. This meant
newly created merchants wouldn't appear in the rule condition dropdown until
manually assigned to a transaction.

Changed to `family.available_merchants` which includes all family merchants
(even unassigned ones), provider merchants on transactions, and recently
unlinked merchants — consistent with the transaction form merchant selector.

Fixes #1197

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 10:48:11 +01:00
Juan José Mata
30ef253536 Fix pgvector migration to only run when explicitly configured (#1239)
The migration previously checked only if the pgvector extension was
available on the PostgreSQL server. In production Docker environments
(e.g., managed Postgres services), the extension may be present but the
database user lacks superuser privileges to enable it, causing the
migration to fail.

Now the migration requires VECTOR_STORE_PROVIDER=pgvector to be set
before attempting to enable the extension, matching the application's
own configuration pattern in VectorStore::Registry.

https://claude.ai/code/session_017YYBFXGwamXpGwwDZxe8Pv

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-21 09:24:11 +01:00
Juan José Mata
8bc4cae728 Add Plaid migration constant alias (#1235)
Restore the original migration constant name as an alias so old references still resolve during production boot and migration loading. Add a regression test covering the legacy alias.
2026-03-21 01:03:19 +01:00
Juan José Mata
445206a02f Fix NameError: rename migration file to match class name (#1234)
The migration file was named scope_plaid_account_uniqueness_to_item.rb
but the class inside was ScopePlaidItemUniqueness (renamed to avoid
secret-scanner false positive). Rails derives the expected constant from
the filename, causing a NameError in production.

Rename the file to scope_plaid_item_uniqueness.rb to match the class.

https://claude.ai/code/session_015AekNFxveK4W71nLxiqbX9

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-21 00:24:01 +01:00
soky srm
ae5b23fe67 Initial split transaction support (#1230)
* Initial split transaction support

* Add support to unsplit and edit split

* Update show.html.erb

* FIX address reviews

* Improve UX

* Update show.html.erb

* Reviews

* Update edit.html.erb

* Add parent category to dialog

* Update en.yml

* Add UI indication to totals

* FIX ui update

* Add category select like rest of app

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-03-20 21:19:30 +01:00
Dream
6d22514c01 feat(vector-store): Implement pgvector adapter for self-hosted RAG (#1211)
* Add conditional migration for vector_store_chunks table

Creates the pgvector-backed chunks table when VECTOR_STORE_PROVIDER=pgvector.
Enables the vector extension, adds store_id/file_id indexes, and uses
vector(1024) column type for embeddings.

* Add VectorStore::Embeddable concern for text extraction and embedding

Shared concern providing extract_text (PDF via pdf-reader, plain-text as-is),
paragraph-boundary chunking (~2000 chars, ~200 overlap), and embed/embed_batch
via OpenAI-compatible /v1/embeddings endpoint using Faraday. Configurable via
EMBEDDING_MODEL, EMBEDDING_URI_BASE, with fallback to OPENAI_* env vars.

* Implement VectorStore::Pgvector adapter with raw SQL

Replaces the stub with a full implementation using
ActiveRecord::Base.connection with parameterized binds. Supports
create_store, delete_store, upload_file (extract+chunk+embed+insert),
remove_file, and cosine-similarity search via the <=> operator.

* Add registry test for pgvector adapter selection

* Configure pgvector in compose.example.ai.yml

Switch db image to pgvector/pgvector:pg16, add VECTOR_STORE_PROVIDER,
EMBEDDING_MODEL, and EMBEDDING_DIMENSIONS env vars, and include
nomic-embed-text in Ollama's pre-loaded models.

* Update pgvector docs from scaffolded to ready

Document env vars, embedding model setup, pgvector Docker image
requirement, and Ollama pull instructions.

* Address PR review feedback

- Migration: remove env guard, use pgvector_available? check so it runs
  on plain Postgres (CI) but creates the table on pgvector-capable servers.
  Add NOT NULL constraints on content/embedding/metadata, unique index on
  (store_id, file_id, chunk_index).
- Pgvector adapter: wrap chunk inserts in a DB transaction to prevent
  partial file writes. Override supported_extensions to match formats
  that extract_text can actually parse.
- Embeddable: add hard_split fallback for paragraphs exceeding CHUNK_SIZE
  to avoid overflowing embedding model token limits.

* Bump schema version to include vector_store_chunks migration

CI uses db:schema:load which checks the version — without this bump,
the migration is detected as pending and tests fail to start.

* Update 20260316120000_create_vector_store_chunks.rb

---------

Co-authored-by: sokiee <sokysrm@gmail.com>
2026-03-20 17:01:31 +01:00
soky srm
2cdddd28d7 FIX schema drift and snaptrade and mercury issues (#1232) 2026-03-20 14:52:09 +01:00
dependabot[bot]
8e19cee329 chore(deps): bump bcrypt from 3.1.20 to 3.1.22 (#1227)
Bumps [bcrypt](https://github.com/bcrypt-ruby/bcrypt-ruby) from 3.1.20 to 3.1.22.
- [Release notes](https://github.com/bcrypt-ruby/bcrypt-ruby/releases)
- [Changelog](https://github.com/bcrypt-ruby/bcrypt-ruby/blob/master/CHANGELOG)
- [Commits](https://github.com/bcrypt-ruby/bcrypt-ruby/compare/v3.1.20...v3.1.22)

---
updated-dependencies:
- dependency-name: bcrypt
  dependency-version: 3.1.22
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 14:20:03 +01:00
dependabot[bot]
e2cfc36ee9 chore(deps): bump json from 2.18.1 to 2.19.2 (#1225)
Bumps [json](https://github.com/ruby/json) from 2.18.1 to 2.19.2.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](https://github.com/ruby/json/compare/v2.18.1...v2.19.2)

---
updated-dependencies:
- dependency-name: json
  dependency-version: 2.19.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-19 15:35:43 +01:00
Clayton
1191d9f7d8 feat: scope Mercury account uniqueness to mercury_item (#1032)
* feat: scope Mercury account uniqueness to mercury_item

* feat: extend to all other providers

* fix: add uniqueness test

* fix: lint

* fix: test

* fix: coderabbit comment

* fix: coderabbit comment

* fix: coderabbit comment

* fix: update

* fix: lint

* fix: update

* fix: update
2026-03-19 15:17:55 +01:00
juan
5336ec159f Increase touch hold delay to 1000ms for more reliable scroll behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 20:22:53 -07:00
juan
528f5f32a6 Revert "Bind touch events to drag handle only, not entire section"
This reverts commit 55ab9aed6e.
2026-03-18 20:22:45 -07:00
juan
55ab9aed6e Bind touch events to drag handle only, not entire section
Touch events on the full section meant any touch on the header could
trigger hold-to-drag. Now touch events are scoped to the grip handle
button, which is made visible on mobile (was hidden lg:block before).
Desktop drag-and-drop via draggable attribute is unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 17:56:59 -07:00
juan
31a5ac156b Increase hold delay to 750ms and use Euclidean distance for cancellation
Use total distance (diagonal-aware) instead of per-axis thresholds
to better detect scrolling gestures that travel diagonally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 16:20:48 -07:00