The 401 interceptor was re-triggering itself when the refresh call
also returned 401, causing repeated requests before eventually
logging out. Add guards to skip refresh for the refresh endpoint
itself and prevent any request from retrying more than once.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restructure the system prompt as explicit rules to more forcefully
prevent smaller models from generating code. Add a server-side
safety net that strips fenced code blocks from assistant responses
before returning them to the user.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a lightweight docker:cli sidecar that prunes dangling images
every 24 hours to prevent untagged image buildup from redeployments.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Smaller models sometimes output Python/JS code instead of invoking
tools. Add explicit instruction to never generate code and always
call the provided function tools directly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate 6 new tool chains into the chat service: get_budget,
get_budget_summary, get_loan_details, calculate_loan_payoff,
list_payees, and get_scheduled_transactions. Also raises the
search_transactions page_size cap from 25 to 50 and the upcoming
bills display from 5 to 10.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three new tools: list_categories shows all categories with type and
parent, create_category adds a new one with optional parent nesting,
delete_category removes non-system categories by name. Frontend renders
category tables, success alerts for creation, and warning alerts for
deletion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ParseDateArg now applies DateTime.SpecifyKind(Utc) since TryParse
returns Unspecified kind. Also fixed the spending report fallback
start date to use the DateTimeKind.Utc constructor overload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Conversational AI chat that uses Ollama's native tool-calling API to query
transactions, spending reports, account balances, dashboard summaries, and
update transaction categories through natural language. Includes persistent
conversation history, a full-page chat UI with sidebar, and rich inline
rendering of tool results (tables, alerts, cards).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full-stack profile section: DisplayName column on User model, profile CRUD
endpoints on AuthController, and complete Settings > Profile tab UI with
profile editing, password change, account info, and account deletion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cache SimpleFIN API responses for 60 seconds so multiple accounts in
the same sync cycle reuse a single HTTP call instead of hitting the
API per-account. Pre-load existing transactions by FitId in one batch
query to skip per-duplicate FindAsync calls during memo backfill.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update duplicate handling during bank sync to populate the memo field
on existing transactions when it's empty. Fix raw SQL table name from
quoted "Transactions" to lowercase "transactions" matching the actual
PostgreSQL schema.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v-data-table-server re-emits update:options when items/totalCount
change, creating a loop that resets to page 1. Guard against
redundant fetches by skipping when page and pageSize haven't
changed. Remove duplicate loadTransactions from onMounted since
the table's initial update:options event handles the first load.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use the raw Description field as memo so the full bank text
(e.g. "Card purchase BUYVM VPS* FRANTECH 11 MY.FRANTECH.C WY
02-08-2026") is always visible. The cleaned Payee field is still
used for the payee name and matching.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
One-time migration: UPDATE all transactions that have a FitId
(bank-synced) and Status=Uncleared to Status=Cleared. Tracked
in data_migrations table so it only runs once.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both SimpleFIN and Plaid only return posted transactions (SimpleFIN
filters out pending, Plaid returns settled). These have already
cleared at the bank so they should be marked Cleared on import.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace v-data-table with v-data-table-server so page changes
fetch from the API instead of being limited to the first 50
results. Filters reset to page 1; page/size changes trigger a
new API call with the correct page and pageSize parameters.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make the entire header clickable to toggle rail mode so users
can expand the drawer after collapsing it
- Center the cat icon in rail mode via scoped CSS
- Add tooltips on all nav items and logout when in rail mode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resets LastSyncAt on all linked accounts so the next sync
re-fetches the full 90-day transaction window. Duplicate
detection prevents re-importing existing transactions.
- POST /api/bank-sync/connections/{id}/reset-sync endpoint
- Re-sync button shown only on SimpleFIN connection cards
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Npgsql requires DateTimeKind.Utc for timestamp with time zone
columns. This fixes errors in transaction create/edit, budgets,
reports, loans, scheduled transactions, and file imports.
Changes:
- TransactionService: SpecifyKind on request.Date for create,
update, and transfer
- BudgetService: UTC kind on all new DateTime(year, month, 1)
- ReportService: UTC kind on endOfMonth; rewrite spending-by-
category GroupBy to avoid untranslatable navigation properties
- LoanService: UTC kind on payoff scenario date construction
- ScheduledTransactionService: UTC kind on SemiMonthly date
- ImportService: SpecifyKind on parsed.Date when persisting
- OFX/CSV/QIF parsers: AssumeUniversal + AdjustToUniversal on
all date parsing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EF Core cannot translate GroupBy with a navigation property
(Category.Name) joined via nullable FK into SQL. Split into two
queries: group by CategoryId server-side, then look up category
names in a separate query.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Math.Abs() inside a GroupBy().Select() cannot be translated to
SQL by EF Core. Since the query already filters for Amount < 0,
negating the sum produces the same result and translates cleanly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Track completion in a `data_migrations` table. On startup the
migration checks if it has already been applied and skips the
SimpleFIN API calls entirely, avoiding the slow startup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap edit/delete buttons in a flex container so they render
side by side instead of stacking. Fix Dashboard DateTime to use
UTC kind, which Npgsql requires for timestamp comparisons.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runs once at startup after DB migrations. For each SimpleFIN
connection, re-discovers accounts from the API, groups by
institution, and splits connections that contain accounts from
multiple banks. Existing sync state and account mappings are
preserved.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Group discovered SimpleFIN accounts by institution and create a
separate SyncConnection per institution so each bank appears as
its own card in the UI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
UpdateAccountRequest was missing the Type field, so changes to
account type were silently ignored. Add Type to the DTO and apply
it in the update service method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sync-now and sync-all now return 202 Accepted immediately and
dispatch work to a background task. The frontend uses the existing
SignalR BankSyncComplete notification to stop the spinner and
display results.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A 403 from the claim URL means the token was already used or is
invalid. Throw InvalidOperationException so the middleware returns
a 400 with a helpful message instead of a generic 500.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HttpClient does not extract Basic Auth credentials from URLs with
embedded user:pass@host format. Parse the access URL, build the
Authorization header explicitly, and strip credentials from the
request URI. Also send Content-Length: 0 on token exchange POST
and update setup instructions to point to beta-bridge.simplefin.org.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Query-bound DateTimes have Kind=Unspecified which Npgsql rejects for
timestamptz columns, causing InvalidOperationException caught as 400.
Also add explicit CamelCase naming policy lost when AddJsonOptions was
introduced for the enum converter.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of showing defaults as greyed-out placeholder text, populate
textareas with the actual default prompt text so users can directly
edit it. Add {categories}, {examples}, and {transactions} placeholders
so users control where dynamic data is inserted in the prompts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add SystemPrompt and UserPromptTemplate fields to AI categorization
settings so users can customize the prompts sent to Ollama without
code changes. Null/empty values fall back to built-in defaults.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds local LLM-based transaction categorization using Ollama:
- Settings UI to configure Ollama URL, model, confidence threshold
- Auto-categorization during bank sync and file import
- Manual "Classify Uncategorized" button on Transactions screen that respects active filters
- Payee default category learning loop for classified transactions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without this, enums serialize as integers (0, 1, 2) instead of
strings ("Debit", "Credit", "Transfer"). This caused synced
transactions to have numeric type values and broke editing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DateOnly.ToDateTime() produces Kind=Unspecified which Npgsql rejects
for timestamptz. Specify UTC kind on Plaid transaction dates and add
a safety net in BankSyncService for all parsed dates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Plaid ClientId/Secret are now stored per-user in the database
(encrypted) instead of in appsettings.json. Users enter their own
Plaid developer credentials in the Settings > Bank Connections tab.
- New BankSyncSettings model (1:1 with User) for encrypted credentials
- PlaidSyncProvider is now stateless, receives credentials per-call
- Settings UI shows a credentials card with save form
- Connect via Plaid button disabled until credentials are configured
- Removed Plaid section from appsettings.json
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validate Plaid credentials are configured before calling the API,
and validate the returned link token before passing it to Plaid
Link JS. Show error snackbars for all bank sync failures instead
of only logging to console.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove nested AppLayout wrapper from SettingsView — the layout is
already applied at the App.vue level around router-view.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add automated transaction syncing via Plaid and SimpleFIN providers,
a Settings page for managing connections and account mappings,
background scheduled syncing, and sync history logging.
New backend: BankSync plugin project with PlaidSyncProvider and
SimpleFinSyncProvider, SyncConnection/LinkedAccount/SyncLog models,
AES-256 encryption service, BankSyncService orchestration,
BankSyncBackgroundService (15-min tick), and BankSyncController
(13 endpoints). EF migration creates sync_connections,
linked_accounts, and sync_logs tables.
New frontend: Settings view with 3 tabs (Profile, Bank Connections,
Sync History), bankSync API service, BankSyncComplete SignalR
notifications, and Settings nav item in sidebar + avatar dropdown.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add full frontend UI for five backend features: bank reconciliation (3-step
stepper workflow), payee management (CRUD with alias chips), transaction splits
(expandable rows + split editor), plugins (card grid), and real-time SignalR
notifications (bell dropdown with badge). Fix backend PayeeResponse to expose
alias IDs for deletion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap each report API call in a fetchReport helper that catches errors
individually and returns null, treating 4xx responses as empty data
instead of surfacing an error message to the user.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add interactive reports dashboard with 4 chart types (spending by
category donut, income vs expense bar, net worth area, cash flow bar)
using ApexCharts, date range presets, and account filtering. Add
investment portfolio view with holdings table, allocation chart, and
gain/loss color coding. Includes TypeScript types and API services.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add API service files and replace stub views with full implementations:
- Budgets: month navigator, budget items table with progress bars, create/edit/delete
- Scheduled Transactions: data table with skip/post-now actions, add/edit dialog
- Loans: loan list, detail view with amortization schedule, payoff scenario calculator
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete the import flow from file upload through duplicate resolution
to transaction creation. Previously, ResolveDuplicatesAsync was a stub
that only incremented counters, FileWatcherService detected files but
didn't process them, and ImportsView.vue ignored the API response.
Backend:
- Add ParsedDataJson column to ImportBatch to persist parsed data
between upload and confirm steps
- Rewrite ImportService.ResolveDuplicatesAsync to deserialize parsed
transactions and create/merge/skip based on user decisions, with
payee matching, fingerprinting, and account balance updates
- Add GetBatchesAsync for import history
- Complete FileWatcherService: wait for file ready, resolve account by
filename, call UploadAsync, send SignalR notification, archive file
- Add GET /api/imports/batches endpoint
Frontend:
- Create imports API service (frontend/src/services/imports.ts)
- Add ImportBatch, DuplicateResolution types
- Rewrite ImportsView.vue with 3-step Vuetify stepper wizard:
upload, review with duplicate handling, completion summary,
plus import history table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The broad plugins/ and imports/ patterns were matching directories
at all levels, excluding frontend/src/plugins/vuetify.ts,
frontend/src/views/imports/, frontend/src/views/plugins/, and
src/Purrse.Tests/Plugins/. Changed to /plugins/ and /imports/
to only match root-level directories.
This was the root cause of the Docker build failure - vuetify.ts
was missing from the repo.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents node_modules/dist from polluting Docker build context.
Sets NODE_OPTIONS max-old-space-size=4096 for Vite builds on
memory-constrained servers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>