Commit Graph

2241 Commits

Author SHA1 Message Date
0xRozier
4ba90e0e8a fix: Update PWA icons to use current logo (#1052)
* fix: Update PWA icons to use current logo (#997)

Replace outdated android-chrome-192x192.png and logo-pwa.png with the
current logo. The old icons showed the previous branding (cyan border /
old logomark) which appeared when creating web shortcuts on smartphones.

Also add the 192x192 icon entry to the PWA manifest for better Android
home screen icon support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Replace transparent background with solid #F9F9F9 in 192x192 PWA icon

The android-chrome-192x192.png had an RGBA transparent background which
can cause display issues on Android home-screen shortcuts. Regenerated
with a solid #F9F9F9 background to match theme_color/background_color
in the PWA manifest and the 512x512 icon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:05:46 -05:00
github-actions[bot]
4dd5ed4379 Bump version to next iteration after v0.6.8-alpha.13 release 2026-02-23 14:39:33 +00:00
Juan José Mata
90e94f0ad1 Use Langfuse client trace upsert API (#1041)
Replace direct trace.update calls with client trace upserts so OpenAI provider is compatible with langfuse-ruby 0.1.6 behavior. Add richer warning logs that include full exception details for trace creation, trace upserts, and generation logging failures. Add tests for client-based trace upserts and detailed error logging.
2026-02-23 09:29:21 -05:00
Juan José Mata
1f9a934c59 Add build ID to Flutter app version display 2026-02-23 14:22:54 +00:00
LPW
17e9bb8fbf Add MCP server endpoint for external AI assistants (#1051)
* Add MCP server endpoint for external AI assistants

Expose Sure's Assistant::Function tools via JSON-RPC 2.0 at POST /mcp,
enabling external AI clients (Claude, GPT, etc.) to query financial data
through the Model Context Protocol.

- Bearer token auth via MCP_API_TOKEN / MCP_USER_EMAIL env vars
- JSON-RPC 2.0 with proper id threading, notification handling (204)
- Transient session (sessions.build) to prevent impersonation leaks
- Centralize function_classes in Assistant module
- Docker Compose example with Pipelock forward proxy
- 18 integration tests with scoped env (ClimateControl)

* Update compose for full Pipelock MCP reverse proxy integration

Use Pipelock's --mcp-listen/--mcp-upstream flags (PR #127) to run
bidirectional MCP scanning in the same container as the forward proxy.
External AI clients connect to port 8889, Pipelock scans requests
(DLP, injection, tool policy) and responses (injection, tool poisoning)
before forwarding to Sure's /mcp endpoint.

This supersedes the standalone compose in PR #1050.

* Fix compose --preset→--mode, add port 3000 trust comment, notification test

Review fixes:
- pipelock run uses --mode not --preset (would prevent stack startup)
- Document port 3000 exposes /mcp directly (auth still required)
- Add version requirement note for Pipelock MCP listener support
- Add test: tools/call sent as notification does not execute
2026-02-23 09:13:15 -05:00
MkDev11
111d6839e0 Feat/Abstract Assistant into module with registry (#1020)
* Abstract Assistant into module with registry (fixes #1016)

- Add Assistant module with registry/factory (builtin, external)
- Assistant.for_chat(chat) routes by family.assistant_type
- Assistant.config_for(chat) delegates to Builtin for backward compat
- Assistant.available_types returns registered types
- Add Assistant::Base (Broadcastable, respond_to contract)
- Move current behavior to Assistant::Builtin (Provided + Configurable)
- Add Assistant::External stub for future OpenClaw/WebSocket
- Migration: add families.assistant_type (default builtin)
- Family: validate assistant_type inclusion
- Tests: for_chat routing, available_types, External stub, blank chat guard

* Fix RuboCop layout: indentation in Assistant module and tests

* Move new test methods above private so Minitest discovers them

* Clear thinking indicator in External#respond_to to avoid stuck UI

* Rebase onto upstream main: fix schema to avoid spurious diffs

- Rebase feature/abstract-assistant-1016 onto we-promise/main
- Rename migration to 20260218120001 to avoid duplicate version with backfill_crypto_subtype
- Regenerate schema from upstream + assistant_type only (keeps vector_store_id, realized_gain, etc.)
- PR schema diff now shows only assistant_type addition and version bump

---------

Co-authored-by: mkdev11 <jaysmth689+github@users.noreply.github.com>
2026-02-23 07:38:58 -05:00
LPW
0ddca461fc Add Pipelock agent security scan to CI (#1049)
* Add Pipelock agent security scan to CI

Scans PR diffs for leaked secrets and agent security risks.
Zero config, runs on every PR to main.

* Retrigger CI (v1 action tag now available)

* Harden checkout: persist-credentials false

Pipelock only reads local git history for diff scanning,
no auth token needed in .git/config.
2026-02-23 07:33:36 -05:00
Juan José Mata
ad3087f1dd Improvements to Flutter client (#1042)
* Chat improvements

* Delete/reset account via API for Flutter app

* Fix tests.

* Add "contact us" to settings

* Update mobile/lib/screens/chat_conversation_screen.dart

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

* Improve LLM special token detection

* Deactivated user shouldn't have API working

* Fix tests

* API-Key usage

* Flutter app launch failure on no network

* Handle deletion/reset delays

* Local cached data may become stale

* Use X-Api-Key correctly!

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-22 21:22:32 -05:00
Jeff Rowberg
b1b2793e43 Skip unnecessary sync when account balance unchanged on update (#1040)
The update action was calling set_current_balance (which triggers
sync_later internally) on every form submission, even when the balance
hadn't changed. This caused the account to enter a syncing state,
replacing the visible balance with a pulsing skeleton placeholder
until the sync completed.

Now we compare the submitted balance against the current value and
only call set_current_balance when it actually differs. Also removes
a redundant sync_later call that duplicated the one already inside
set_current_balance.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 08:47:31 -06:00
Alessio Cappa
1881606786 feat: Add merchant logo in filter selection (#1037)
* feat: Add merchant logo in filter selection

* fix: move external div outside of if statement
2026-02-21 08:41:33 -06:00
Juan José Mata
e70865e939 Sync Helm chart and Rails app versions in CI and release workflows (#1030)
* Sync Helm chart and Rails app versions in CI and release workflows

- values.yaml: default image.tag to "" so it uses Chart.appVersion
  (was hardcoded to stale "0.6.6" while app was at 0.6.8-alpha.13)
- chart-ci.yml: add version-sync job that fails if version.rb,
  Chart.yaml version, and Chart.yaml appVersion diverge; trigger on
  version.rb changes too
- chart-release.yml: derive chart version from version.rb (single
  source of truth) instead of auto-incrementing independent chart-v* tags

https://claude.ai/code/session_01Eq3WHBn3Uwjezxb6ctdjMB

* Default to `false` AI_DEBUG_MODE

* Apply suggestions from CodeRabbit

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

---------

Signed-off-by: Juan José Mata <jjmata@jjmata.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-20 10:04:07 +01:00
Claude
efcc3583d5 Fix mobile-build using tag name instead of branch for filenames
When workflow_dispatch is triggered from a tag (e.g. v0.6.7) instead
of a branch, github.ref_name returns the tag name, causing filenames
like sure-v0.6.7-{stamp}.apk instead of sure-main-{stamp}.apk.

Guard against this by checking github.ref_type and falling back to the
repository's default branch when a tag is selected.

https://claude.ai/code/session_01TDfNkNxQ6uWxQxLAwJY5Qa
2026-02-20 00:18:32 +01:00
Juan José Mata
f339414257 Add workflow to build mobile apps from main without tagging (#1028)
* Add workflow to build mobile apps from main without tagging

Adds a new `mobile-main-build.yml` workflow that can be triggered
manually via workflow_dispatch to build Android APK and iOS unsigned
builds from the main branch. Uses a `main-YYYYMMDDHHMI` stamp for
versioning (e.g. sure-main-202602181259.apk) and updates the gh-pages
README.md MOBILE_DOWNLOADS section with direct download links.

https://claude.ai/code/session_01TDfNkNxQ6uWxQxLAwJY5Qa

* Rename to mobile-build.yml and support any branch

Instead of hardcoding "main", derive the branch name from
github.ref_name, sanitise it for filenames/tags (slashes → hyphens),
and use it throughout: version, tag, release notes, and gh-pages
README. The checkout step now explicitly pins ref: ${{ github.ref }}
so the tag always matches the dispatched branch.

Example artifacts from main:  sure-main-202602181259.apk
Example from feature/foo:    sure-feature-foo-202602181259.apk

https://claude.ai/code/session_01TDfNkNxQ6uWxQxLAwJY5Qa

* Add continue-on-error to artifact download steps

If either the Android or iOS build fails, the download step would
hard-fail and abort the release job before the conditional logic in
"Prepare release assets" could handle the partial result. Adding
continue-on-error lets the workflow proceed so a release can still
be created with whichever artifacts succeeded.

https://claude.ai/code/session_01TDfNkNxQ6uWxQxLAwJY5Qa

* Fix in-place replacement of MOBILE_DOWNLOADS section in README

The previous logic stripped the marker block then appended the new
section at the end of the file, causing it to drift to the bottom on
every run. Now writes the section to a temp file and uses awk to
replace the block between the markers in-place, preserving the
section's original position in the README.

https://claude.ai/code/session_01TDfNkNxQ6uWxQxLAwJY5Qa

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-20 00:02:02 +01:00
github-actions[bot]
87acbb64ef Bump version to next iteration after v0.6.8-alpha.12 release 2026-02-19 21:26:44 +00:00
Juan José Mata
150e0f7fda Enable inclusion of hidden files in helm chart package
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-02-19 22:09:11 +01:00
Juan José Mata
7a11c81d26 Remove OPENAI_URI_BASE and OPENAI_MODEL from Helm secret values (#1025)
These are optional app configuration values (not secrets), and listing
them in rails.secret.values alongside required keys like SECRET_KEY_BASE
makes users think they must be specified. Users who need them can set
them via rails.extraEnv or rails.settings instead.

https://claude.ai/code/session_01BP8Nr2cZWDdu9zGL9vD8Mw

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-19 21:55:44 +01:00
Number Eight
7725661a96 fix: Enable Banking DNS issues and provide better UI sync feedback (#1021)
* fix(docker): add explicit DNS config to fix enable banking sync

* fix(enable-banking): surface sync errors in the UI

* fix: add spaces inside array brackets for RuboCop

* fix(enable-banking): surface sync errors and partial failures in UI
2026-02-19 21:54:44 +01:00
dependabot[bot]
f5e4fed5a4 chore(deps): bump nokogiri from 1.18.9 to 1.19.1 (#1024)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.18.9 to 1.19.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.18.9...v1.19.1)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-version: 1.19.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-19 21:53:28 +01:00
Juan José Mata
69fa440558 Refactor GitHub Actions workflows (#1023)
* Unify release workflows and add chart/mobile wrappers

* Update chart CI to kube 1.25

* Fetch tagged commit before pushing release branch

* Old `azure/setup-helm`

* Base chart dispatch version on existing chart tags

* `grep` failure with `pipefail` bypasses the user-friendly error message

* `gh-pages` push lacks retry logic

* Auto-incremented chart tag collision

* `grep -Ev` pipeline will crash

* Missed one
2026-02-19 21:36:47 +01:00
Alessio Cappa
13c2335a6a feat: New tag creation UI (#1014)
* feat: Update tag creation UI

* fix: remove unused target

* fix: remove connect/disconnect functions

* fix: remove unnecessary target
2026-02-19 19:55:10 +01:00
dataCenter430
cfadff641f Fix crypto subtype for trades api (#1022)
* fix: crypto subtype not persisted by permitting :subtype in CryptosController

* Backfill crypto subtype for existig accounts so Trades API works

* fix: backfill only unlinked cryptos; use raw SQL in migration; deterministic redirect in test

* Update schema.rb for BackfillcryptoSubtypeForTrades migration

---------

Signed-off-by: dataCenter430 <161712630+dataCenter430@users.noreply.github.com>
2026-02-19 19:51:42 +01:00
AdamWHY2K
356d9ebf3a fix: add logic to skip future pending transactions and add cleanup ta… (#1011)
* fix: add logic to skip future pending transactions and add cleanup task for stuck entries

* Update lib/tasks/cleanup_stuck_pending_lunchflow.rake

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: AdamWHY2K <adamgm.email@gmail.com>

* Update app/models/lunchflow_entry/processor.rb

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: AdamWHY2K <adamgm.email@gmail.com>

* fix(coderabbit): assertions use entryable instead of transaction for pending state checks

* chore(codex): add comments to clarify handling of pending transactions, exclude self in cleanup task

* fix(coderabbit): memoize external_id

---------

Signed-off-by: AdamWHY2K <adamgm.email@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-19 18:58:01 +01:00
dataCenter430
cb3c076f7b fix: show Edit button in account view bulk selection bar (#1002) 2026-02-19 18:55:15 +01:00
Mikael
cc20e2c19c Fix foreign currency accounts using wrong exchange rate in balance sheet totals (#1010)
Balance sheet totals and accountable type summaries used a SQL JOIN on
exchange_rates matching only today's date, which returned NULL (defaulting
to 1:1) when no rate existed for that exact date. This caused foreign
currency accounts to show incorrect totals.

Changes:
- Refactor BalanceSheet::AccountTotals to batch-fetch exchange rates via
  ExchangeRate.rates_for, with provider fallback, instead of a SQL join
- Refactor Accountable.balance_money to use the same batch approach
- Add ExchangeRate.rates_for helper for deduplicated rate lookups
- Fix net worth chart query to fall back to the nearest future rate when
  no historical rate exists for a given date
- Add composite index on accounts (family_id, status, accountable_type)
- Reuse nearest cached exchange rate within a 5-day lookback window
  before calling the provider, preventing redundant API calls on
  weekends and holidays when providers return prior-day rates

https://claude.ai/code/session_01GyssBJxQqdWnuYofQRjUu8

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-19 18:07:47 +01:00
Juan José Mata
a63e1c5a89 Syntax error in workflow 2026-02-18 16:47:03 +01:00
github-actions[bot]
9a6728edb9 Bump version to next iteration after v0.6.8-alpha.11 release 2026-02-18 15:10:29 +00:00
Juan José Mata
a16e1f8482 Default tap on URL opens settings 2026-02-18 15:51:17 +01:00
Juan José Mata
9dd3aad250 No credentials = no TestFlight 2026-02-18 13:42:33 +01:00
Juan José Mata
5dfa8e6760 Upload to TestFlight after release / fix version name 2026-02-18 13:41:01 +01:00
Juan José Mata
3670858447 Fix Android icon color 2026-02-18 13:37:31 +01:00
Juan José Mata
2c50bd1d9a Add demo account to Flutter client also 2026-02-18 11:22:44 +01:00
Juan José Mata
42724335ab Default login for Flutter client beta 2026-02-18 11:17:44 +01:00
Juan José Mata
e9bba43554 Wire TestFlight up to mobile releases 2026-02-18 10:31:24 +01:00
Juan José Mata
65f1daa995 iOS build fixes/prep for TestFlight 2026-02-18 10:11:16 +01:00
Juan José Mata
3b0b2f7ada LLC is Sure Finances, keep it the same 2026-02-18 09:22:14 +01:00
Juan José Mata
e9d59a9a0e New icon set and name 2026-02-18 01:57:22 +01:00
Juan José Mata
e2dc0513c9 Safe area around icon 2026-02-18 01:54:17 +01:00
Juan José Mata
6831f56375 Add flutter_export_environment.sh to .gitignore
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-02-18 01:41:59 +01:00
Juan José Mata
fe5419c1fd Ignore changes in mobile/ directory for publish workflow
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-02-18 01:40:27 +01:00
Juan José Mata
41bc05a7ac Enhance mobile release workflow with dispatch and script
Added workflow_dispatch trigger and updated GitHub Release step to use a script for release notes and asset uploads.

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-02-18 01:11:37 +01:00
Juan José Mata
2e752d3cec New icons 2026-02-18 00:59:11 +01:00
Juan José Mata
d933d2a82f New icon 2026-02-18 00:58:15 +01:00
Juan José Mata
0d3862e25e Fix version number for Android 2026-02-18 00:36:11 +01:00
Juan José Mata
ea1c190127 Version number in Gradle build 2026-02-18 00:27:33 +01:00
Juan José Mata
da754b8d05 Version number to bundle files 2026-02-18 00:23:02 +01:00
Juan José Mata
d0bf9fc3f2 More .gitignore noise 2026-02-18 00:13:52 +01:00
dependabot[bot]
e499036d7d chore(deps): bump rack from 3.1.18 to 3.1.20 (#1013)
Bumps [rack](https://github.com/rack/rack) from 3.1.18 to 3.1.20.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v3.1.18...v3.1.20)

---
updated-dependencies:
- dependency-name: rack
  dependency-version: 3.1.20
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-17 21:06:03 +01:00
Juan José Mata
15b9bf78bc Update Flutter iOS run command in mobile/README.md
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
2026-02-17 17:25:52 +01:00
Alessio Cappa
862d39dc3b fix: Remove additional padding from JS controller and add directly as a class (#1007) 2026-02-16 23:36:27 +01:00
soky srm
d79d86d848 PDF ai import (#1006)
Add support to review transactions for AI pdf import
2026-02-16 21:11:41 +01:00