Commit Graph

4845 Commits

Author SHA1 Message Date
github-actions[bot]
88a8729071 [AI] Simplify CLI cache/lock internals
Use a discriminated SyncDecision union so connection.ts no longer needs
non-null assertions on the cached state. Thread the resolved CliConfig
through withConnection's callback to drop duplicate resolveConfig calls
in the sync and budgets commands. Extract an errorCode helper and
replace the existsSync+readdirSync TOCTOU pattern in the reader-wait
polling loop with a single readdir that tolerates ENOENT.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:13:50 +01:00
github-actions[bot]
85d601a707 [AI] Cache the CLI's local budget between invocations
Every `actual <cmd>` call currently delta-syncs the budget with the
sync server via `api.downloadBudget`, which hits the server's
500-req/min rate limit on scripted workflows. Actual is local-first:
once the budget is on disk, most read commands do not need fresh
server data.

Introduce a CLI-only cache layer inside `withConnection` that
decides per invocation whether to skip, sync, or re-download:

- Cache state lives at `{dataDir}/.actual-cli/{syncId}/state.json`,
  keyed by `syncId` to avoid the chicken-and-egg of not knowing the
  on-disk `budgetId` before the first download. The on-disk id is
  resolved via `api.getBudgets()` and persisted after first download.
- Read commands (list, balance, query run, …) skip the `/sync`
  call while `now - lastSyncedAt < cacheTtl`. Write commands
  (create, update, delete, set-*, etc.) sync before and after the
  operation to keep server state consistent.
- Encrypted budgets force a sync per call since `api/load-budget`
  does not re-verify the password.
- New `proper-lockfile`-backed shared/exclusive lock serializes
  writes while allowing parallel reads. Reader markers live in
  `{meta}/readers/`; writers sweep stale markers by PID.

New `actual sync` command with three modes: default (sync now),
`--status` (print cache age, TTL, stale flag), `--clear` (delete
cache, holding the exclusive lock to avoid racing writers).

New config surface, following the existing flag → env → config file
→ default precedence chain:

- `--cache-ttl <s>` / `ACTUAL_CACHE_TTL` / `cacheTtl` (default 60)
- `--refresh` / `--no-cache`
- `--lock-timeout <s>` / `ACTUAL_LOCK_TIMEOUT` / `lockTimeout` (10)
- `--no-lock` / `ACTUAL_NO_LOCK` / `noLock`

Every `withConnection` call site now passes an explicit
`{ mutates: boolean, skipBudget?: boolean }` so read/write intent is
visible at the edge.

The old `budgets sync` subcommand is removed — it silently diverged
from the new top-level `actual sync`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 23:03:40 +01:00
Matiss Janis Aboltins
f85627dcf6 [AI] Disable bundle minification for readable error messages (#7538)
* [AI] Disable bundle minification for readable production error messages

The desktop-client had dead terserOptions (no `minify: 'terser'` was set, so
Vite's default esbuild minifier ran with name mangling). The loot-core and
plugins-service workers used Terser with mangle:false but still compressed.
Set `minify: false` across all three browser build configs so production
stack traces are human-readable.

https://claude.ai/code/session_01VEywxebiNYAgJia35fygQx

* [AI] Rename release note to match PR number

https://claude.ai/code/session_01VEywxebiNYAgJia35fygQx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-19 20:35:26 +00:00
Matt Fiddaman
695fd0e7e0 fix bank sync account linking modal being disabled when relinking existing accounts (#7487)
* fix link account modal button disabled

* note
2026-04-18 22:25:28 +00:00
Matiss Janis Aboltins
9682f6d8c9 ci: disable fail-fast for Electron build workflows (#7547)
* [AI] Disable fail-fast for Electron build matrices

Prevents cancellation of in-progress platform builds when one fails, so
Windows/macOS/Linux results are all visible on a single run.

* Add release notes for PR #7547

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-18 21:32:21 +00:00
Matiss Janis Aboltins
4b940423ee [AI] Persist custom CSS override across theme changes (#7495)
* [AI] Persist custom CSS overrides as a standalone global pref

Moves the custom CSS override out of the InstalledTheme JSON blob into
a dedicated customCssOverride global pref so that overrides survive
switching themes, clearing installed themes, or toggling auto/light/dark
mode. Includes a one-time migration that lifts the legacy overrideCss
field out of installedCustomLightTheme / installedCustomDarkTheme JSON.

- Add customCssOverride global pref (loot-core types + server defaults)
- Inject the override as a trailing style layer in CustomThemeStyle so
  it layers on top of any installed custom theme
- Drop overrideCss from the InstalledTheme type; extractLegacyOverride
  + migrateLegacyOverride handle the one-time lift with whitespace trim
- Run the migration from CustomThemeStyle with an idempotent effect that
  re-runs safely once prefs hydrate
- Bind the ThemeInstaller textarea directly to the new pref
- Add a "Custom CSS is active" indicator button next to the theme
  selector that opens the installer for editing the override without
  flipping auto mode to light
- Pre-switch out of auto when the user picks "Custom theme" from the
  main selector, so the flag that used to distinguish entry points goes
  away and handleInstall collapses to a pure slot dispatch
- Tests: hermetic Themes settings tests, expanded customThemes unit
  tests covering extraction/migration/trim edge cases, updated
  ThemeInstaller tests for the new pref binding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Address review feedback for custom CSS override installer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Defer auto-mode theme switch and guard stale installer callbacks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:29:32 +00:00
Matiss Janis Aboltins
9fb6876f3b [AI] sync-server: use workspace reference for @actual-app/crdt (#7541)
* [AI] sync-server: use workspace reference for @actual-app/crdt

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Update build script in sync-server package to use TypeScript's build mode

* Package electron

* [AI] crdt: add conditional exports so Node can load the built bundle

Before this change the root exports entry pointed at `./src/index.ts`, so
any pure-Node consumer (notably the sync server that Electron forks as a
utility process) failed to import `@actual-app/crdt` — Node can't execute
TypeScript source directly. Sync-server had been masking this by pulling
`@actual-app/crdt@npm:2.1.0` where `publishConfig.exports` resolves to
`./dist/index.js`; once sync-server switched to `workspace:*`, the
Functional Desktop App CI job timed out waiting for the sync server to
boot.

Switch to conditional exports in the same shape `@actual-app/api` already
uses:

- `types` → `./dist/index.d.ts` for TypeScript tooling
- `development` → `./src/index.ts` for Vite/Vitest (HMR, fast feedback)
- `default` → `./dist/index.js` for Node runtime

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 15:27:34 +00:00
kenkuo
210422f61a [AI] Add 'Last 30 days' date range option to custom reports (#7217)
* Add 'Last 30 days' date range option to custom reports

Add a rolling 30-day date range to the Live mode date filter in custom
reports. The option appears between 'Last month' and 'Last 3 months'
and is available for Daily, Weekly, and Monthly intervals.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* Fix release note filename and author to match PR #7217

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
2026-04-18 15:10:35 +00:00
Aadhith
6941cc9e01 Add Ilavenil theme to custom theme catalog (#7543)
* Add theme Ilavenil to custom catalog

* Add release notes
2026-04-18 14:38:08 +00:00
tempiz
13abe0cb00 Addition of scoped ErrorBoundarys per #7391 (#7497)
* Addition of scoped ErrorBoundarys per 7391

* Adjusted to use FeatureErrorfallback from #7437
2026-04-17 20:52:57 +00:00
Matt Fiddaman
a4e401bc8b fix build error with typescript v6 (#7524)
* fix tsconfig error

* note

* fix strict mode violation

* fix another type issue
2026-04-17 20:52:44 +00:00
Matiss Janis Aboltins
ff7f81ac06 [AI] Emit bundle stats from the crdt package (#7537)
* [AI] Emit bundle stats from the crdt package

The crdt package was the only published library without a stats.json
artifact. Migrate its build to Vite (mirroring the api/cli setup), wire
in rollup-plugin-visualizer to emit dist/stats.json, and upload it from
the CRDT CI job. Declarations are still produced by tsgo via
--emitDeclarationOnly.

https://claude.ai/code/session_01CDVAGLGu49q5YMHsRLkYLQ

* Add release notes for PR #7537

* [AI] crdt: drop redundant rm -rf dist from build script

Vite's build.emptyOutDir: true already clears the output directory
before writing, so the leading rm -rf dist is unnecessary.

https://claude.ai/code/session_01CDVAGLGu49q5YMHsRLkYLQ

* [AI] Include crdt in the size-compare bundle stats table

Wait for the crdt build check on both the base branch and the PR,
download the crdt-build-stats artifact for each, and pass it to
bundle-stats-comment.mjs so the summary table rendered on the PR
includes a row for the crdt package alongside desktop-client,
loot-core, api, and cli.

https://claude.ai/code/session_01CDVAGLGu49q5YMHsRLkYLQ

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-17 20:38:06 +00:00
Michael Clark
5bf160463c 🎨 Update storybook fonts and brand image (#7536)
* update storybook fonts and brand image

* release notes
2026-04-17 19:26:24 +00:00
Matiss Janis Aboltins
598bf81da1 [AI] crdt: typecheck test files and clean up lint issues (#7534)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 17:33:02 +00:00
Julian Dominguez-Schatz
995670476e Add GitHub Actions check step via zizmor (#7465)
* Add GitHub Actions check step via `zizmor`

* Add security-events permissions to check-gh-actions

Added permissions for security events in GitHub Actions.

* Add persist-credentials option to checkout action

* Add release notes for PR #7465

* Change category to Maintenance and update action step

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-17 11:55:51 +00:00
Matt Fiddaman
711939f71c replace uuid and fs-extra with builtins (#7529)
* fs-extra

* uuid

* note
2026-04-16 20:42:27 +00:00
Matt Fiddaman
8486dca33a clean up more unused dependencies (#7528)
* remove unused deps

* note

* remove babel

* fix lint
2026-04-16 20:23:13 +00:00
Matt Fiddaman
359c1fe9ce consolidate internal naming patterns used for budget types (#7527)
* consolidate budget naming pattern

* note

* coderabbit feedback
2026-04-16 17:37:21 +00:00
Matt Fiddaman
7a4b43e7a4 fix some more GitHub code quality issues (#7520)
* Apply suggested fix to packages/desktop-client/src/components/modals/EditFieldModal.tsx from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to packages/desktop-client/src/components/modals/EditFieldModal.tsx from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* note

* fix typo in note

* remove useless conditions

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-04-16 17:07:22 +00:00
sk10727-a11y
94ea408303 Fix filter operator switching behavior (#7304)
* [autofix.ci] apply automated fixes

* Fix render condition (code rabbit)

* [autofix.ci] apply automated fixes

* Fix filter operator switching behavior

updated to allow conversion from multi-ID to text if only one array value and to handle no-value operators for account filter

final fixes before upstream sync
Fix UUID leakage when switching filter operators
Fix UUID leakage when switching filter operators#

* fixed merge conflicts

* [autofix.ci] apply automated fixes

* Fix Account filter input not rendering due to incorrect conditional logic

* [autofix.ci] apply automated fixes

* Rename isPayeeIdOp to isIdOp for clarity

* [autofix.ci] apply automated fixes

* Trigger CI rerun

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-16 16:47:28 +00:00
Matt Fiddaman
dc8694cc3a fix potentially inconsistent state updates (#7523)
* fix potentially inconsistent state updates

* note
2026-04-16 09:41:00 +00:00
Matt Fiddaman
89b442bc74 fix runImport failing when ACTUAL_DATA_DIR environment variable is not set (#7522)
* Fix ACTUAL_DATA_DIR being used instead of fetching it from config

* note
2026-04-16 09:40:43 +00:00
Matiss Janis Aboltins
3ca0bcbc13 Remove inactive community repository links from docs (#7500)
* [AI] Remove outdated community project links from docs

* Add release notes for PR #7500

* [AI] Add back actualplaid link to community repos

Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>

* Delete 7500.md

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>
2026-04-16 07:35:20 +00:00
Matt Fiddaman
0e5e641aae ⬆️ eslint v10 & migrate eslint plugins to oxc performant API (#7508)
* eslint (^9.39.3 -> ^10.2.0)

* migrate plugins to oxc alternative API

* note
2026-04-15 17:57:04 +00:00
Matt Fiddaman
8c47374b9d ⬆️ mid-month dependency bump (#7506)
* typescript (^5.9.3 -> ^6.0.2)

* eslint-plugin-perfectionist (^5.6.0 → ^5.8.0)

* @types/node (^22.19.15 → ^22.19.17)

* @typescript/native-preview (^7.0.0-dev.20260309.1 → ^7.0.0-dev.20260404.1)

* eslint (^9.39.3 → ^9.39.4)

* lage (^2.14.19 → ^2.15.5)

* lint-staged (^16.3.2 → ^16.4.0)

* minimatch (^10.2.4 → ^10.2.5)

* vitest (^4.1.0 → ^4.1.2)

* better-sqlite3 (^12.6.2 → ^12.8.0)

* commander (^13.0.0 → ^13.1.0)

* cosmiconfig (^9.0.0 → ^9.0.1)

* @chromatic-com/storybook (^5.0.1 → ^5.1.1)

* @storybook/addon-a11y (^10.2.16 → ^10.3.4)

* @storybook/addon-docs (^10.2.16 → ^10.3.4)

* @storybook/react-vite (^10.2.16 → ^10.3.4)

* eslint-plugin-storybook (^10.2.16 → ^10.3.4)

* storybook (^10.2.16 → ^10.3.4)

* @codemirror/language (^6.12.2 → ^6.12.3)

* @react-aria/interactions (^3.27.0 → ^3.27.1)

* @swc/core (^1.15.18 → ^1.15.24)

* @swc/helpers (^0.5.19 → ^0.5.21)

* @tanstack/react-query (^5.90.21 → ^5.96.2)

* @uiw/react-codemirror (^4.25.7 → ^4.25.9)

* @vitejs/plugin-basic-ssl (^2.2.0 → ^2.3.0)

* i18next (^25.8.14 → ^25.10.10)

* lru-cache (^11.2.6 → ^11.2.7)

* react-grid-layout (^2.2.2 → ^2.2.3)

* react-i18next (^16.5.6 → ^16.6.6)

* rolldown (^1.0.0-rc.12 → ^1.0.0-rc.13)

* sass (^1.97.3 → ^1.99.0)

* adm-zip (^0.5.16 → ^0.5.17)

* csv-parse (^6.1.0 → ^6.2.1)

* csv-stringify (^6.6.0 → ^6.7.0)

* jest-diff (^30.2.0 → ^30.3.0)

* express-rate-limit (^8.3.0 → ^8.3.2)

* upgrade yarn to 4.13.0

* react-aria-components (^1.15.1 → ^1.16.0)

* @vitejs/plugin-react (^6.0.0 → ^6.0.1)

* @codemirror/state (^6.5.4 → ^6.6.0), @codemirror/view (^6.38.7 → ^6.41.0)

* react-aria (^3.46.0 → ^3.47.0)

* react-error-boundary (^6.0.3 → ^6.1.1)

* recharts (^3.7.0 → ^3.8.1)

* fast-check (4.5.3 → ^4.6.0)

* rollup-plugin-visualizer (^6.0.11 → ^7.0.1)

* commander (^13.1.0 → ^14.0.3)

* note

* coderabbit feedback, and a test for good measure

* typescript (^5.9.3 -> ^6.0.2)

* @playwright/test (1.58.2 -> 1.59.1)

* yarn dedupe
2026-04-15 17:05:26 +00:00
Stephen Brown II
f8d5d38d0a Skip release notes generation for docs-only PRs (#6815) 2026-04-15 14:52:16 +00:00
Matt Fiddaman
023f34814c ⬆️ bump gh actions (#7507)
* upload-artifact

* codeql-action

* create-pr

* docker

* github-script

* sticky-pull-request-comment

* action-download-artifact

* note
2026-04-15 14:36:28 +00:00
JasmineLCY
2aa2e49df9 [AI] Fix regex checkbox label contrast in notes modal (#7515)
* [AI] Fix regex checkbox label contrast in notes modal (#7514)

Apply theme.menuAutoCompleteText color to the "Use Regular Expressions"
checkbox label in the find-and-replace tab so it contrasts with the
menuAutoCompleteBackground modal background.

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

* fix: rename release note file to match PR number

The CI expects the release note file to be named after the PR number
(7515), not the issue number (7514).

---------

Co-authored-by: liuren.lcy <liuren.lcy@antgroup.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 13:25:41 +00:00
Aadhith
c9f5f6deb2 Add Nord theme to custom theme catalog (#7513)
* Add nord theme to catalog

* Add release notes
2026-04-15 10:08:21 +00:00
Matiss Janis Aboltins
e109d652b4 [AI] Refactor IS_GENERIC_BROWSER env var to --mode=browser (#7466)
* [AI] Refactor IS_GENERIC_BROWSER env var to --mode=browser

Replace the IS_GENERIC_BROWSER environment variable with Vite's built-in
--mode=browser flag to distinguish browser builds from Electron builds.
This aligns with the existing --mode=desktop pattern used for Electron
production builds.

Also fix build-shims.js to derive NODE_ENV from import.meta.env.DEV
instead of import.meta.env.MODE, so custom modes don't leak into
process.env.NODE_ENV.

https://claude.ai/code/session_014HvkpR59Ke4eUoiUzsUruv

* Add release notes for PR #7466

* [AI] Fix COOP/COEP headers not set with --mode=browser

The server.headers config was gated on mode === 'development', which
excluded --mode=browser. Since server.headers only applies during
vite serve (not builds), always set the COOP/COEP headers. These are
required for SharedArrayBuffer support used by the SQLite backend.

https://claude.ai/code/session_014HvkpR59Ke4eUoiUzsUruv

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-15 07:39:31 +00:00
tempiz
4878c0f333 Add maketransfer to uncategorized transactions (#7496)
* Add maketransfer to uncategorized transactions

Add maketransfer to uncategorized transactions

* retrigger checks

* retrigger checks 2
2026-04-14 23:52:34 +00:00
dependabot[bot]
18886fe166 Bump tar from 7.5.1 to 7.5.13 (#7505)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.1 to 7.5.13.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.1...v7.5.13)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 22:32:49 +00:00
dependabot[bot]
081b43cf99 Bump jws from 3.2.2 to 3.2.3 (#7504)
Bumps [jws](https://github.com/brianloveswords/node-jws) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianloveswords/node-jws/compare/v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 22:17:18 +00:00
dependabot[bot]
29827b9be8 Bump electron from 39.8.4 to 39.8.5 (#7413)
Bumps [electron](https://github.com/electron/electron) from 39.8.4 to 39.8.5.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v39.8.4...v39.8.5)

---
updated-dependencies:
- dependency-name: electron
  dependency-version: 39.8.5
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 21:57:49 +00:00
dependabot[bot]
b5b422f4c8 Bump lodash from 4.17.21 to 4.18.1 (#7502)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.18.1.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.18.1)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.18.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-04-14 21:40:42 +00:00
dependabot[bot]
21408f1e66 Bump vite from 8.0.0 to 8.0.8 (#7501)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.0.0 to 8.0.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.0.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 8.0.8
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 21:27:47 +00:00
Trevin Chow
c77b4cc220 Add scoped ErrorBoundary to Rules page to contain rendering crashes (#7437)
* [AI] Add scoped ErrorBoundary to Rules page to contain rendering crashes

* [autofix.ci] apply automated fixes

* docs: add release notes for ErrorBoundary PR

* fix(rules): add resetKeys to ErrorBoundary for route navigation reset

In react-error-boundary v6, the boundary does not auto-reset when the
user navigates away and back. Adding resetKeys={[location.pathname]}
ensures the error state clears on route changes.

This contribution was developed with AI assistance (Claude Code).

* fix(rules): show error message in fallback UI and log to console

Addresses reviewer feedback on #7437: surface error.message in the
FeatureErrorFallback so users can copy-paste when reporting issues,
and log the error to the console via useEffect so the error isn't
swallowed by the boundary.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 21:06:32 +00:00
Matiss Janis Aboltins
eac26fa4ef Remove duplicate excludes.txt entry (#7499)
* Remove duplicate excludes.txt entry

Remove package-lock.json from spelling exclusions

* Add release notes for PR #7499

* Fix duplicate exclusion in spelling checks

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-14 20:48:32 +00:00
dependabot[bot]
d27db77164 Bump follow-redirects from 1.15.11 to 1.16.0 (#7498)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 20:35:48 +00:00
Matiss Janis Aboltins
c7876a58cb Revert "[AI] Add project-level hook to enforce PR creation rules" (#7491)
* Revert "[AI] Add project-level hook to enforce PR creation rules (#7471)"

This reverts commit d6253c86eb.

* Add release notes for PR #7491

* Delete upcoming-release-notes/7491.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-14 17:12:53 +00:00
Stephen Brown II
54a26ae199 [AI] Add BALANCE_OF() function to fetch balance of an arbitrary account (#7335)
* Add BALANCE_OF() function to fetch balance of an arbitrary account

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7335

* Adjust docs

* [autofix.ci] apply automated fixes

* Update tests to verify sidebar balances

* Add comments to schedule-template.ts

* Update index.ts to recompute sidebar balances

* [autofix.ci] apply automated fixes

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7335

* Address CodeRabbit comments

* [AI] Implement BALANCE_OF as HyperFormula custom function via context

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* Remove protective if statement when adding _balanceOfPrefetched

* [autofix.ci] apply automated fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-14 13:40:12 +00:00
Michael Clark
bf513ad11c :electron: Desktop app tests for exporting budget file (#7494)
* tests for exporting budget file

* release notes

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7494

* ditch the vrt, it's done in the cdesktop-client

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-14 07:51:45 +00:00
Matiss Janis Aboltins
4bc8ec876a [AI] Add publishConfig.imports sync validator with pre-commit integration (#7469)
* [AI] Add publishConfig.imports sync validator with pre-commit integration

Add a TypeScript script that validates publishConfig.imports stays in sync
with imports in all packages/*/package.json files. Runs automatically in
the pre-commit hook via lint-staged with --fix mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Add release notes for #7469

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Guard main() with require.main and respect lint-staged file args

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Handle non-string imports targets in derivePublishImports

- Add type guard to check for non-string values in imports
- Throw descriptive error when conditional imports are encountered
- Update type signature to accept Record<string, string | object>
- Add test case for non-string imports error handling

This prevents TypeError when packages have conditional imports (e.g., #browser-preload in desktop-client)

Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>

* [AI] Limit resolvePackageJsonPaths scope to packages directory

- Add packagesRoot constant to restrict path resolution
- Update while loop condition to only traverse within packages directory
- Add additional check to ensure candidate paths are under packages/
- Prevents resolution to repo root package.json for missing/deleted files

This ensures the validator only processes package.json files under packages/* and avoids accidentally targeting the monorepo root manifest.

Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>
2026-04-14 07:40:36 +00:00
Matiss Janis Aboltins
c4f3fb0b93 [AI] Fix type errors for API consumers by shipping .d.ts declarations (#7468)
* [AI] Fix type errors for API consumers by shipping .d.ts declarations from loot-core

Downstream consumers of @actual-app/api with strict: true get type errors
because @actual-app/core exports raw .ts source files. Consumers' tsc
follows the import chain into core's source (compiled with strict: false),
and skipLibCheck doesn't help since it only skips .d.ts files.

Add "types" conditions to all imports/exports entries in loot-core's
package.json, pointing to the pre-built declarations in lib-dist/decl/.
Add .npmignore to include lib-dist/decl/ in the published package.

Fixes #7410

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Use prepack/postpack scripts instead of inflating package.json

Replace the inline "types" conditions in imports/exports with a prepack
script that adds them at pack/publish time. This keeps the checked-in
package.json clean while still shipping .d.ts declarations to npm
consumers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Convert prepack/postpack scripts to TypeScript

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Add release notes for #7468

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Fix recursive ExportValue type and remove redundant comment

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Rename scripts to .mts and inline types conditions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Make backup/restore scripts safer

- Check if backup exists before creating it in prepack
- Make restore idempotent by checking if backup exists in postpack
- Prevents overwriting existing backups from interrupted runs
- Addresses CodeRabbit review feedback

Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>

* [AI] Type api-handlers.ts fields to drop implicit any

The `fields` / export-args slots in the ApiHandlers contract were
untyped, surfacing as TS7008 errors in strict consumers. Replace them
with the `Partial<APIXxxEntity>` shapes the `@actual-app/api` wrappers
already pass, and annotate the matching call sites in `api.ts` with
`@ts-expect-error` where the legacy helpers still declare full-entity
parameters despite accepting partial updates at runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Replace vite-plugin-dts with tsgo for api types

Drops vite-plugin-dts in favor of running tsgo --emitDeclarationOnly
after the vite bundle, eliminating a heavy dev dependency tree
(api-extractor, volar, vue language-core) from the api package build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Add build script to loot-core to emit declarations via lage

`yarn build:cli` failed in CI with TS6305 because api's
`tsgo --emitDeclarationOnly` depends on loot-core's pre-built
`lib-dist/decl/*.d.ts`, but loot-core had no `build` script, so lage's
`^build` cascade silently skipped it. Add `"build": "tsgo -b"` so loot-core
slots into the dependency chain; its tsconfig already has
`emitDeclarationOnly: true`, so the output is declarations only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Simplify API build

* [AI] Document TypeScript moduleResolution requirement for @actual-app/api

The published declarations rely on package.json exports conditions, which
classic node / node10 resolvers don't honor. Document the supported modes
(bundler / nodenext / node16) in the package README and in the Getting
Started section of the API docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Type-guard default value in add-types-conditions prepack

`value.default` is typed `ExportValue | undefined`, which allows nested
conditional objects. The previous truthy check fell through to
`shouldSkip(defaultValue)` and would crash on `.endsWith()` if that shape
ever appeared. Replace with a `typeof === 'string'` narrowing and drop a
now-redundant "Insert types as the first key" comment.

No runtime change on current package.json — no nested `default` values
exist today — but the script is not covered by loot-core's tsconfig
include, so the latent type issue was silent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Allow "nodenext" in docs spellcheck expect list

Referenced in the new TypeScript moduleResolution note in the API docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Move loot-core declarations to @types and whitelist publish with files

Relocate loot-core's composite TypeScript output from lib-dist/decl to the
top-level @types directory, matching the api package's convention. Replace
the old .npmignore blacklist with an explicit package.json files whitelist.

- tsconfig.json: outDir @types, exclude test/mock dirs from decl emission
- scripts/add-types-conditions.mts: rewrite paths to ./@types/src/...
- package.json: files whitelist shipping only src, @types, migrations,
  typings, default-db.sqlite; drop legacy typesVersions (docs now require
  moduleResolution bundler/nodenext/node16, so the classic-resolution
  fallback is unused)
- .gitignore: ignore the new @types build artifact
- lage.config.js: factor outputGlob into a shared BUILD_OUTPUT_GLOBS
  constant and add @types/** so lage caches loot-core's decl output
- root tsconfig.json: tighten exclude from packages/api/@types to
  packages/*/@types to cover both api and loot-core
- delete .npmignore entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* [AI] Build loot-core declarations inside prepack

yarn workspace @actual-app/core pack is the first non-setup step in the
publish workflow, running before any build. Without a build chained into
prepack the @types/ tree is empty at pack time, so the tarball shipped a
transformed package.json pointing at ./@types/src/... paths that didn't
exist. npm publish doesn't re-run hooks on a pre-packed tarball, so the
frozen snapshot must be self-contained; prepack now runs yarn build first
to populate @types/ before add-types-conditions rewrites the exports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com>
2026-04-14 07:40:17 +00:00
youngcw
69cd4fc13a Update sync error message (#7493)
* format

* note

* update test

* change message

* note

* fix
2026-04-13 19:07:22 +00:00
Juulz
35a48cbf15 🎨 You Need A - Theme Dark (#7447)
* Update customThemeCatalog.json

* Update customThemeCatalog.json

* [autofix.ci] apply automated fixes

* Update customThemeCatalog.json

* 🎨 You Need A Theme Dark, based on 2026 nYNAB dark

* YNA Theme Dark

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 15:17:53 +00:00
Emil Tveden Bjerglund
213185661f [AI] Add Sankey report toggle to view values as percentages (#7476)
* Add Options button. Add toggle for showing values as percentages.

* Add release note

* [autofix.ci] apply automated fixes

* Ensure 0's are also reported as percentages for consistency

* Shorten release note

* Remove reduncant type assertions

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 14:26:26 +00:00
Michael Clark
4fa658b91e :electron: Playwright test to verify sync server starts (#7484)
* test for opening sync server

* urelease note

* lint

* remove console logs from test

* wait on navigation

* works locally... Pipelines failing

* testing

* more

* rebuild electron before testing

* jeeezoo

* ipv4 issue?

* [autofix.ci] apply automated fixes

* add rebuild step to vrt

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7484

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-13 09:58:20 +00:00
Michael Clark
95b2925be6 :electron: Fix desktop app playwright vrt setup (#7490)
* fix desktop app playwright vrt tests

* release notes

* add bcrypt in as well

* install build tools for bcrypt....
2026-04-13 08:04:15 +00:00
Matt Fiddaman
db72948d7c change release process to use a branch and add automation (#7418)
* release automation

* note

* harden tokens for release notes workflow

* fix yarn install on release notes check

* amend release docs

* address coderabbit

* change back to auto version resolution

* more coderabbit

* clarify a poorly worded comment

* drop cherry pick workflows

* fix docker tag

* coderabbit

* drop `v` from release branch name

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>

* simplify release note workflows

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
2026-04-12 22:17:14 +00:00