mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-21 17:59:54 -05:00
delay-initial-sync-until-loaded
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
0b239e0a6d |
[AI] Add tag button mobile (#8344)
* added hash button to enable one-click mobile usage of tags feature * added tags to demo * release notes * [autofix.ci] apply automated fixes * fixed long tags wrapping * removed duplicate <Button> usages and fixed coderabbit smell * removed lint * added null check per coderabbit * moved Menus to after the menu to be consistent with transaction menus * textWrap => whiteSpace for coderabbit * updated tsconfig to fix typecheck issue * Update VRT screenshots Auto-generated by VRT workflow PR: #8344 * typecheck * improved button ergonomics * also don't add space if beginning of note * fixed not working on iOS * handle focus properly for add tag button * fixed focus issue when clicking button on new transaction * added delay because without it chrome doesnt work * Added some more logic for button focusing * fix typecheck * extracted common style into iconStyle * added aria label * removed log statement --------- 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> |
||
|
|
8f27e177dc |
[AI] api: add browser build (#8166)
* [AI] api: add browser build
Continuation of #7545 (and #8143, which moved the browser Web Worker
bootstrap into loot-core). This adds the browser-compatible build of
@actual-app/api: the full loot-core stack runs inside a Web Worker and a
thin main-thread facade exposes the same public surface as the Node entry.
loot-core:
- Add platform/client/backend-worker.ts: createBackendWorker(worker)
centralizes absurd-sql's main-thread initBackend + __absurd:* message
filtering, and is exported for the api to reuse.
- Refactor browser-preload's start.ts and worker-bridge.ts to route through
it (drops the duplicated __absurd:* filtering; terminate() now also clears
listeners). Behavior is preserved.
api:
- browser-worker.ts: Web Worker entry owning real loot-core, speaking
loot-core's {id,name,args} backend protocol; wraps fetch to map the
.js -> .js.data migration names.
- index.browser.ts: main-thread facade that spawns the worker.
- browser/rpc.ts: main-thread <-> worker RPC bridge (uses createBackendWorker).
- browser/lib-stub.ts: stubs lib.send so methods.ts routes over postMessage.
- vite.browser.config.mts / vite.browser-worker.config.mts and asset bundling
in vite.config.mts (sql-wasm.wasm + data/ + data-file-index.txt); package.json
build chain, browser export, and absurd-sql/npm-run-all/vite-plugin-node-polyfills deps.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] Rename release note to match PR number 8166
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: move browser worker plumbing into loot-core
Address review feedback: the browser worker logic shouldn't live in the api
package since it's generic "loot-core as a browser npm package" plumbing, not
api-specific. Resolve it via loot-core's existing conditional-export system
instead of a vite alias.
- loot-core: add server/main.api-browser.ts (worker-routing `lib` that
delegates to the existing platform/client/connection), selected via a new
`api-browser` export condition on "./server/main". Move the worker entry to
server/api-browser-worker.ts.
- api: the facade (index.browser.ts) now reuses loot-core's client connection
via a minimal global.Actual.getServerSocket shim and spawns the worker built
from loot-core's entry. Deletes browser-worker.ts, browser/rpc.ts and
browser/lib-stub.ts (~270 lines) in favor of the shared loot-core code.
- The facade build selects the impl with resolve.conditions: ['api-browser']
instead of resolve.alias, removing the enforce-boundaries lint exception.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: simplify browser build cleanups
Post-review cleanups (no behavior change):
- backend-worker.ts: fix stale doc comment referencing the removed
packages/api/browser/rpc.ts (the consumer is now index.browser.ts).
- api-browser-worker.ts: drop the redundant `endsWith('/data-file-index.txt')`
disjunct (subsumed by `endsWith('data-file-index.txt')`) and the no-op
`input as RequestInfo | URL` re-casts on the fetch pass-throughs.
- index.browser.ts: replace the single-field `state` holder with a plain
module-level `let backend`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: drop the createBackendWorker wrapper, revert browser-preload churn
Now that the facade rides on loot-core's platform/client/connection (which
already ignores absurd-sql's `__`-prefixed internal messages), the only thing
the main thread still needs is absurd's one-line initBackend. So:
- Replace the 60-line createBackendWorker wrapper (onMessage/postMessage/
terminate/listener filtering) with a tiny initBrowserBackend(worker) helper.
- Revert browser-preload/start.ts and worker-bridge.ts to their merged state —
they keep importing absurd's initBackend directly, so this PR no longer
refactors just-merged files and the loot-core change is purely additive.
- Facade holds a plain Worker handle and calls worker.terminate() on shutdown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: trim verbose comments in the browser build
Keep only the load-bearing "why" notes (the absurd-sql init, the fetch/.js.data
workaround, the global.Actual shim, the api-browser condition); drop protocol
diagrams, usage examples, and restated context. No code/behavior change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: drop redundant absurd-sql dependency
No api source imports absurd-sql; it's reached only through @actual-app/core
(the facade's initBrowserBackend and the bundled worker), which declares it.
It's bundled into the build output, so it isn't a runtime dependency of the
published package either. Bundles are byte-for-byte unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: drop the api-browser condition, inject the worker into the connection
Review feedback: the api-browser export condition fought loot-core's idiom
(browser IS the default platform; node/"api" is the override) and hid a bug —
the condition-swapped lib only had `send`, so api.utils.amountToInteger was
silently undefined in the browser build.
Replace the condition with a plain transport seam:
- methods.ts no longer imports server/main; it sends through api/send.ts,
which the Node entry wires to in-process lib.send and the browser entry
wires to loot-core's client connection. utils.ts re-exports
amountToInteger/integerToAmount from shared/util directly (fixes the bug).
- loot-core's client connection init() now accepts an optional injected
socket; connectBackendWorker(worker) installs absurd-sql's bridge and
connects in one call. This removes the forged global.Actual shim and the
facade's `define: { global: 'globalThis' }` workaround. Desktop's argless
init() path is unchanged.
- Delete main.api-browser.ts, the "./server/main" conditional export, and
the facade's resolve.conditions.
The 4 loot-core snapshot failures (main.test.ts / transfer.test.ts) are
pre-existing on the branch without these changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: route methods through the client connection, slim the facade
Review feedback: get rid of the _setSend seam and move the worker init logic
into loot-core.
- methods.ts now imports `send` from loot-core's client connection. The node
build resolves it via the existing `api` condition to a new in-process
implementation (platform/client/connection/index.api.ts — previously a dead
re-export of the electron client), matching the platform idiom: browser is
the default, node/"api" overrides. api/send.ts is deleted and the node
entry (index.ts) reverts to master byte-for-byte.
- loot-core's startBackendWorker(worker, config, assetsBaseUrl) now owns the
whole worker boot (absurd-sql bridge + connection.init + server init RPC),
so the browser entry just spawns the worker and calls it.
- Trims: single chained build script (drops the npm-run-all dep), copyFileSync
instead of the linkOrCopy helper, drop the worker entry's error listeners
(browsers already log worker uncaughts to DevTools).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: trim prose comments to the essential ones
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] fix client connection stalling when no sends are queued at connect
Found while smoke-testing the browser api build in a real consumer app: the
client connection only nulled messageQueue (switching from queueing to direct
postMessage) when the queue was non-empty at 'connect'. The desktop app always
has queued sends by then, so it never hits this; the api facade connects
before sending anything, so every later send queued forever and init() hung.
Drop the queue on connect unconditionally.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] fix client connection dropping api/* error replies
Found via the browser smoke test: opening an e2e-encrypted budget without the
key surfaced as "undefined is not an object" instead of an error. The server
connection forwards api/* handler failures as {type:'reply', id, error}, but
the web client connection only read `result`, silently resolving undefined for
every failed api/* call. Reject when the reply carries an error, matching the
server's envelope (and the old api rpc behavior). The electron client has the
same latent gap; left untouched here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: move the worker entry back into the api package
Review feedback: browser-worker.ts is the api package's build entry, not
generic loot-core code — move it back (it now imports loot-core through the
public @actual-app/core exports instead of #-subpaths).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* [AI] api: drop the manifest rewrite, align shutdown, trim comments
The data-file-index.txt manifest now lists migrations under their real .js
names (the worker's fetch shim already redirects those to the .js.data files
on disk), so the manifest-rewriting half of the shim is gone. The worker init
payload carries config and assetsBaseUrl as separate fields instead of
smuggling a private key into the config object, browser shutdown() mirrors
the node facade, and the client connection's queue flush drops a redundant
branch.
* [AI] fix rejected handler promises poisoning close-budget
runHandler only removed a method's promise from runningMethods when it
fulfilled, so any handler rejection left a stale promise in the set. The next
close-budget then failed: flushRunningMethods' Promise.all rejected with that
old, unrelated error before closeBudget even ran. Remove settled promises on
rejection too, and flush with Promise.allSettled since rejected methods
already reported their error to their caller.
* [AI] api: add a browser e2e test
A Playwright test loads the built browser bundle in chromium from a static
COOP/COEP server and exercises the full stack: worker boot, the rejected-error
contract, budget import, transaction read-back, and IndexedDB persistence
across a page reload. A dedicated workflow runs it in CI on api/loot-core
changes.
* [AI] api: drop the worker fetch shim; strip .data names in loot-core fs
The .js.data scheme was spread across three coordinated pieces: the build
renamed migrations on disk, the manifest listed names that didn't exist, and
a global fetch monkey-patch in the worker un-lied at runtime. Now the
manifest lists the true on-disk names and populateDefaultFilesystem (the only
fetcher of these files) strips the .data suffix when naming the virtual file
— the fetch patch is gone and the suffix becomes a small documented fs
convention. Also: e2e static server uses a single stat and drops a dead MIME
entry.
* [AI] fix electron client connection dropping api/* error replies
Both server connection variants post api/* handler failures as
{type: 'reply', id, error}, but only the web client rejected on it
(
|
||
|
|
4a5ee9c2dc |
[AI] Make TypeScript work in test files across packages (#7642)
* [AI] Make TypeScript work in test files across packages Match the CRDT package's tsconfig pattern in loot-core, desktop-client, api, and desktop-electron so test files participate in the project graph (IDE intellisense, project-wide typecheck) while production builds still emit clean declaration files. - Remove test-file exclusions from each package's main tsconfig - Add tsconfig.build.json for loot-core and api with test exclusions, used by the build scripts - Add e2e/tsconfig.json for desktop-client and desktop-electron with Playwright types - Fix latent type errors in test files now caught by typecheck - Disable typescript/unbound-method for test files (mock matcher pattern) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Release notes * [AI] Address review feedback on test type fixes - goal-template.test.ts: extract amounts to typed locals so single-value assertions no longer compare against unknown - category-template-context.test.ts: replace `as unknown as DbCategory` double-cast with a fully-typed object using `satisfies DbCategory` (the previous mock had `is_income: true` which doesn't match the `1 | 0` shape the cast was hiding) - api/tsconfig.build.json: broaden test exclude pattern to `**/*.test.ts` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * [AI] Widen toMatchThemeScreenshots matcher to accept Page The matcher's runtime impl already handled both Page and Locator (via `typeof locator.page === 'function'` branch), but the type only declared Locator. Call sites pass a Page (`expect(page).toMatchThemeScreenshots()`), which now compiles cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * [AI] Type window.Actual in e2e fixtures and refactor matcher - Pull loot-core/typings/window.ts into the e2e tsconfig include so the ambient `window.Actual` augmentation is visible. - Refactor toMatchThemeScreenshots to derive a Page once via `'page' in target`, then call evaluate on the page consistently. The previous union-typed access (locator.evaluate, locator.page) didn't typecheck on Locator | Page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * [AI] Drop tsconfig.build.json for loot-core and api The build-config indirection was incomplete protection: typecheck (`tsgo -b` against the main tsconfig, which now includes test files) already emits `*.test.d.ts` into `@types/`, and the build step does not clean before re-emitting. The same is observable in crdt's `dist/`, which currently contains test declarations on disk. What actually keeps test declarations out of the npm tarball is the `files` field in package.json — and loot-core already uses that mechanism for source files (`\!src/**/*.test.ts`). Extending the same pattern to `@types/` is more direct than maintaining a duplicate tsconfig that doesn't reliably do its job. - Delete loot-core/tsconfig.build.json; revert build to `tsgo -b`; add `\!@types/**/*.test.d.ts*`, `\!@types/**/__tests__/**`, `\!@types/**/__mocks__/**` to `files`. - Delete api/tsconfig.build.json; revert build to `vite build && tsgo --emitDeclarationOnly`; add `\!@types/**/*.test.d.ts*` to `files`. Verified: `yarn pack --dry-run` excludes all test declarations from both packages while production declarations still pack (428 .d.ts files for loot-core, methods.d.ts for api). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * [AI] Standardise crdt to drop tsconfig.build.json Apply the same simplification as loot-core and api: a single tsconfig per package, with `files`-field negations preventing test declarations from being published. Note: this also fixes a pre-existing issue where crdt was shipping `crdt/timestamp.test.d.ts` and `crdt/merkle.test.d.ts` to npm. The old `tsconfig.build.json` excluded test files from declaration emit, but the `typecheck` script (`tsgo -b` via the main tsconfig) had already emitted them into `dist/` and the build did not clean first, so they were packed via `"files": ["dist"]`. After this change, `yarn pack --dry-run` packs only production declarations (10 .d.ts files) and excludes the test ones. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
75da8f1851 |
[AI] fix: ensure crdt builds before loot-core is packed (#7565)
The `Publish nightly npm packages` workflow started failing at the
"Pack the core package" step with:
Cannot find module '@actual-app/crdt' or its corresponding type declarations.
PR #7541 switched `@actual-app/crdt`'s package.json to conditional
exports (`types` → `./dist/index.d.ts`). `yarn pack` for
`@actual-app/core` triggers a prepack that runs `tsgo -b`, which now
resolves `@actual-app/crdt` via the `types` condition and expects
`packages/crdt/dist/index.d.ts`. Nothing was building crdt first
because loot-core's tsconfig didn't declare it as a project
reference.
Fix: declare the project reference so `tsgo -b` walks the graph and
builds crdt before loot-core. Sibling packages already do this.
Also adopt `@monorepo-utils/workspaces-to-typescript-project-references`
to keep each package's tsconfig `references` in sync with its
`workspace:*` deps, and wire it into a new `yarn check:tsconfig-references`
step in the `check` CI job plus lint-staged. Running the tool added
`../desktop-client` references to sync-server and desktop-electron
(both declare `@actual-app/web` as a workspace dep even though they
only use it at runtime via `require.resolve`); the extra references
are harmless — in CI the corresponding build is already cached by
earlier steps.
https://claude.ai/code/session_01AA2gEMqX24GWeq5BovNmaz
|
||
|
|
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 |
||
|
+9 |
2295e6d464 |
[AI] Add electron conditions to loot-core platform/server exports (#7383)
* trim down some unused/unnecessary dependencies (#7350) * fix github actions inconsistencies * fix pinning of transitive deps in eslint-plugin * drop use of node-fetch in api * drop md5 dependency in favour of node:crypto * drop slash * drop unused top level packages * add note about node-polyfills warning * remove unused deps from desktop-client * drop pegjs types * note * drop node-jq * [Doc] More tour image (mostly) updates & a hotkey fix (#7328) * Fix keyboard shortcut Mac key for undo operations Updated keyboard shortcut instructions for Mac & make consistent. * Add files via upload * Fix undo shortcut from 'K' to 'Z' Updated keyboard shortcut for undo operation in payees guide. COFFEE! * Revise budget section for clarity and consistency Updated category descriptions and improved Markdown support details. * Add files via upload * Fix grammatical error in budget.md * Fix typo and clarify Markdown description in budget.md Corrected a typo in the documentation regarding the chevrons and clarified the description of rendered Markdown. * Fix spelling error in budget documentation Corrected the spelling of 'cheverons' to 'chevrons'. * Add files via upload * Remove redundant text in budget.md * Fix formatting issues in payees.md * count points script should fetch the release note from the PR directly (#7309) * get pr release note from PR, not top of master * note * [AI] Mobile: Post transaction today on global account lists (#7311) (#7322) * [AI] Mobile: pass today for Post transaction today on global account lists (#7311) All Accounts, On budget, and Off budget transaction lists now forward the today flag to schedule/post-transaction, matching single-account mobile and desktop behavior. Made-with: Cursor * [AI] Add release note for PR 7322 (#7311) Made-with: Cursor * [AI] Tighten release note wording for PR 7322 (imperative) Made-with: Cursor --------- Co-authored-by: Pranay Mac M1 <pranayseela@yahoo.com> --------- Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk> Co-authored-by: Pranay S <pranayritvik@gmail.com> Co-authored-by: Pranay Mac M1 <pranayseela@yahoo.com> Co-authored-by: youngcw <calebyoung94@gmail.com> * Implement Sankey report for spent and budgeted money (#7220) * Implement Sankey graph report * Add release notes * Update VRT screenshots Auto-generated by VRT workflow PR: #6068 * Remove local debug settings * [autofix.ci] apply automated fixes * Update VRT screenshots Auto-generated by VRT workflow PR: #6068 * Improve graphs from comments * Fix lints * coderabit fixes * Fix filtering and UI enhancements * remove pngs * Fix typecheck * Another type issue * Update VRT screenshots Auto-generated by VRT workflow PR: #6068 * Update VRT screenshots Auto-generated by VRT workflow PR: #6068 * Fix strict typing issues * Update report page Now better conforms with components from other reports, e.g. by reusing Header Makes it possible to display a period longer than one month. * Change view description order * Formatting and cleanup * Removed difference section, as it will be difficult to get a reliable view across months * Introduce the Timeframe param, similar to Spending report, to allow saving a Live sliding window. * Allow filtering just the last month * Fix linting errors * Remove all information about income * Remove debugging statement * Sort categories and subcategories by amount * Move compact mode to spreadsheet to fix Card view more easily * Update tests file * Add release notes * Rename release notes to match PR# * Fix autofix.ci issues * Update packages/desktop-client/e2e/sankey.test.ts Enable experimental feature fall all tests, pr. coderabbit recommendation Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add sankey-card to isWidgetType * Gate Sankey routes to prevent direct URL bypass * Fix typo * Change node transformation to work by key instead of name, to remove risk of duplicate issues Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Prevent false-positive pass in month-change test. * Translate mode to a proper label * Fix message for empty data * Enabled LoadingIndicator until data is ready * Change card default mode * More robust filtering * Fixed issue with budgeted spreadsheet not using 'end' date * Allow copying SankeyCard to dashboard * Fix typing and linting issues * Remove e2e tests I cannot currently get them to pass, because I dont fully understand playwright and how they are supposed to work. I can see that they don't exist for other reports. We can add them later if required. * Remove unecessary sankey reference * Refactor spreadsheet * Remove dead code from SankeyGraph * Collect to Other if too many subcategories * Edit wrong comment * Linting and typechecking * Show remaining amount to budget * Hide description on narrow device * Add visual clue if 'To budget' is larger than 'Budgeted' and would extend below the edge of the graph * Add colors to the links * Fix report card showing subcategories instead of main categories * Add tooltip info to Other on SankeyCard * Create globalOther flag and implement greedy category reduction algorithm * Allow user to select between Global or Per category Other * Allow user to choose number of subcategories to show * Allow user to select how subcategories are sorted * Fix budget filtering * [autofix.ci] apply automated fixes * Condense sorting and Other-grouping to one option * Implement Sort as budget option * Dynamically adjust topN based on SankeyCard height * Remove old feature flags from previous PR --------- Co-authored-by: andrewhumble <43395285+andrewhumble@users.noreply.github.com> 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> Co-authored-by: youngcw <calebyoung94@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Fix yarn generate:icons command (#7281) * fix icon templates with `module.exports` to `export default` * Add `@svgr/babel-plugin-add-jsx-attribute` to dependencies * Run `yarn generate:icons`, and set prettier singleQuote to reduce changes * Add release note * Add temporary fix for `SvgChartArea` * Add `ChartArea` svg from the existing tsx * CI rerun * Standardise ledger scrolling when using keyboard shortcuts (#7283) * Standardise table keyboard navigation by preventing browser scroll with arrow keys * Add release note * Apply the preventDefault() in specific cases so that it is not applied to default --------- Co-authored-by: youngcw <calebyoung94@gmail.com> * Fix updateTransaction corrupting split parents with partial updates (#7242) * [AI] Fix updateTransaction corrupting split parents with partial updates When `api.updateTransaction(id, { notes: '...' })` is called on a split parent, the `updateTransaction` helper replaces the parent with the sparse update object (`{ id, notes }`) instead of merging it with the existing transaction data. This causes `recalculateSplit` to see `amount` as `undefined` (→ 0), which doesn't match the children's total and sets a `SplitTransactionError` on the parent. `makeChild` also inherits undefined `account`, `date`, and `cleared` values, potentially creating broken child rows. Fix: merge the incoming partial fields (`{ ...trans, ...transaction }`) so all existing properties are preserved. Add a test that performs a notes-only update on a split parent and asserts no error is set and the amount stays intact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * [AI] Add release notes for PR #7242 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address review feedback: remove verbose comment and simplify release note Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: L. Warren Thompson <lwarrenthompson@Warren-MBP.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * [AI] Add electron conditions to loot-core platform/server exports and fix imports - Add "electron" condition to platform/server exports (asyncStorage, connection, fetch, fs, sqlite) so they resolve to .electron.ts files when using the electron export condition - Remove broken ./client/platform export referencing non-existent files - Convert deep relative imports in electron files to subpath imports (#types/prefs, #server/errors, #server/mutators) https://claude.ai/code/session_01FPpKnozt42Mf79YHAT6ytM * [AI] Convert remaining relative imports to subpath imports in electron files - Convert ../fs, ../log, ../../exceptions to subpath imports (#platform/server/fs, #platform/server/log, #platform/exceptions) - Add electron-conditional entries to the imports field in package.json for all 5 platform/server modules with electron variants - Add resolve.conditions: ['electron'] to vite.desktop.config.ts so the electron condition is recognized during desktop builds https://claude.ai/code/session_01FPpKnozt42Mf79YHAT6ytM * Add release notes for PR #7383 * [AI] Fix API build and test failures from conditional exports - Add "api" condition to all 5 platform/server exports and imports entries so the API build resolves to .api.ts variants correctly - Add resolve.conditions and ssr.resolve.conditions: ['api'] to packages/api/vite.config.ts - Add explicit #platform/server/log and #platform/exceptions entries to the imports field (array fallback in #* wildcard doesn't work for directory modules) - Revert #platform/server/fs back to relative ../fs import in asyncStorage/index.electron.ts — subpath imports for platform modules with electron variants don't work in vitest because the test runner doesn't propagate resolve.conditions to Node's import resolution https://claude.ai/code/session_01FPpKnozt42Mf79YHAT6ytM * fix: apply CodeRabbit auto-fixes Fixed 2 file(s) based on 2 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai> * [autofix.ci] apply automated fixes * Enhance package.json and Vite configurations for Electron support; refactor imports to use new path aliases. Added new paths for server and shared modules, updated SSR settings, and improved test configurations for better module resolution. * [AI] Merge electron condition with default Vite conditions in vitest config Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com> * [AI] Move @ts-strict-ignore comment to first line in reset.ts Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com> --------- Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk> Co-authored-by: Juulz <julesmcn@gmail.com> Co-authored-by: Pranay S <pranayritvik@gmail.com> Co-authored-by: Pranay Mac M1 <pranayseela@yahoo.com> Co-authored-by: youngcw <calebyoung94@gmail.com> Co-authored-by: Emil Tveden Bjerglund <emilbp@gmail.com> Co-authored-by: andrewhumble <43395285+andrewhumble@users.noreply.github.com> 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> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: James Skinner <56730344+JSkinnerUK@users.noreply.github.com> Co-authored-by: L. Warren Thompson <warren.thompson@zuirail.com> Co-authored-by: L. Warren Thompson <lwarrenthompson@Warren-MBP.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: CodeRabbit <noreply@coderabbit.ai> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Matiss Janis Aboltins <MatissJanis@users.noreply.github.com> |
||
|
|
3a22f1a153 |
refactor(api): fix cyclic dependencies (#6809)
* refactor(api): defineConfig vitest, api-helpers, drop vite.api build - Wrap api vitest.config with defineConfig for typing/IDE - Add loot-core api-helpers, use in YNAB4/YNAB5 importers - Remove vite.api.config, build-api, injected.js; simplify api package * refactor(api): update package structure and build scripts - Change main entry point and types definition paths in package.json to reflect new structure. - Simplify build script by removing migration and default database copy commands. - Adjust tsconfig.dist.json to maintain declaration directory. - Add typings for external modules in a new typings.ts file. - Update comments in schedules.ts to improve clarity and maintainability. * chore(api): update dependencies and build configuration - Replace tsc-alias with rollup-plugin-visualizer in package.json. - Update build script to use vite for building the API package. - Add vite configuration file for improved build process and visualization. - Adjust tsconfig.dist.json to exclude additional configuration files from the build. * fix(api): update visualizer output path in vite configuration - Change the output filename for the visualizer plugin from 'dist/stats.json' to 'app/stats.json' to align with the new directory structure. * refactor(api): streamline Vite configuration and remove vitest.config.ts - Remove vitest.config.ts as its configuration is now integrated into vite.config.ts. - Update vite.config.ts to include sourcemap generation and adjust CRDT path resolution. - Modify vitest.setup.ts to correct the import path for the CRDT proto file. * feat(api): enhance build scripts and add file system utilities - Update build scripts in package.json to include separate commands for building node, migrations, and default database. - Introduce a new file system utility module in loot-core to handle file operations such as reading, writing, and directory management. - Implement error handling and logging for file operations to improve robustness. * Refactor typecheck script in api package and enhance api-helpers with new schedule and rule update functions. The typecheck command was simplified by removing the strict check, and new API methods for creating schedules and updating rules were added to improve functionality. * Refactor API integration in loot-core by removing api-helpers and directly invoking handlers. Update typecheck script in api package to include strict checks, and refine TypeScript configurations across multiple packages for improved type safety and build processes. * Refactor imports and enhance code readability across multiple files in loot-core. Simplified import statements in the API and adjusted formatting in YNAB importers for consistency. Updated type annotations to improve type safety and maintainability. * Refactor handler invocation in YNAB importers to use the new send function from main-app. This change improves code consistency and readability by standardizing the method of invoking handlers across different modules. * Refactor schedule configuration in loot-core to enhance type safety by introducing a new ScheduleRuleOptions type. This change improves the clarity of the recurring schedule configuration and ensures better type checking for frequency and interval properties. * Update TypeScript configuration in api package to include path mapping for loot-core. This change enhances module resolution and improves type safety by allowing direct imports from the loot-core source directory. * Update TypeScript configuration in api package to reposition the typescript-strict-plugin entry. This change improves the organization of the tsconfig.json file while maintaining the existing path mapping for loot-core, ensuring consistent type checking across the project. * Update TypeScript configurations across multiple packages to enable noEmit option. This change enhances build processes by preventing unnecessary output files during compilation. Additionally, remove the obsolete tsconfig.api.json file from loot-core to streamline project structure. * Update TypeScript configuration in sync-server package to enable noEmit option. This change allows for the generation of output files during compilation, facilitating the build process. * Update api package configuration to streamline build process and enhance type safety. Removed unnecessary build scripts, integrated vite-plugin-dts for type declaration generation, and added migration and default database copying functionality. Adjusted vitest setup to comment out CRDT proto file import for improved test isolation. * Update TypeScript configurations in desktop-client and desktop-electron packages to enable noEmit option, allowing for output file generation during compilation. Additionally, add ts-strict-ignore comments in YNAB importers to suppress strict type checking, improving compatibility with embedded API usage. * Refactor api package configuration to update type declaration paths and enhance build process. Changed type definitions reference in package.json, streamlined tsconfig.json exclusions, and added functionality to copy inlined types during the build. Removed obsolete vitest setup file for improved test isolation. * Revert to solution without types * Update TypeScript configuration in API package to use ES2022 module and bundler resolution. This change enhances compatibility with modern JavaScript features and improves the build process. * Update yarn.lock and API package to enhance TypeScript build process and add new dependencies * Refactor inline-loot-core-types script to streamline TypeScript declaration handling and improve output organization. Remove legacy code and directly copy loot-core declaration tree, updating index.d.ts to reference local imports. * Add internal export to API and enhance Vite configuration for migration handling * Update Vite configuration in API package to target Node 18, enhancing compatibility with the latest Node features. * Enhance inline-loot-core-types script to improve TypeScript declaration handling by separating source and typings directories. Update the copy process to include emitted typings, ensuring no declarations are dropped and maintaining better organization of loot-core types. * Enhance migration handling by allowing both .sql and .js files to be copied during the migration process. Refactor file system operations in loot-core to improve error handling and streamline file management, including new methods for reading, writing, and removing files and directories. * Refactor rootPath determination in Electron file system module by removing legacy case for 'bundle.api.js'. This simplifies the path management for the Electron app. * Update API tests to mock file system paths for migration handling and change Vite configuration to target Node 20 for improved compatibility. * Add promise-retry dependency to loot-core package and update yarn.lock * Fix lint * Refactor build script order in package.json for improved execution flow * Feedback: API changes for "internal" |
||
|
|
387c8fce16 |
[AI] Enable TypeScript composite project references across monorepo (#7062)
* [AI] Enable TypeScript composite project references across monorepo - Add composite and declaration emit to all package tsconfigs - Wire root and per-package project references in dependency order - Replace cross-package include-based typing with referenced outputs - Fix api TS5055 by emitting declarations to decl-output - Add desktop-client alias for tests; fix oxlint import order in vite.config - Add UsersState.data null type and openDatabase return type for strict emit Co-authored-by: Cursor <cursoragent@cursor.com> * Remove obsolete TypeScript configuration for API and update build script to emit declarations directly to the output directory. This streamlines the build process and ensures compatibility with the new project structure. * Refactor TypeScript configuration in API package to remove obsolete decl-output directory and update build scripts. The changes streamline the build process by directing declaration outputs to the @types directory, ensuring better organization and compatibility with the new project structure. * Add TypeScript declaration emission for loot-core in desktop-electron build process * Refactor TypeScript configuration in API package to utilize composite references and streamline build scripts. Update include and exclude patterns for improved file management, ensuring better organization of declaration outputs and migration SQL files. * Refactor TypeScript configuration in loot-core and desktop-client packages to streamline path management and remove obsolete dependencies. Update paths in tsconfig.json files for better organization and compatibility, and adjust yarn.lock to reflect changes in workspace dependencies. * Update desktop-electron package to utilize loot-core as a workspace dependency. Adjust TypeScript import paths and tsconfig references for improved organization and compatibility across packages. * Enhance Vite configuration for desktop-client to support Electron-specific conditions and update loot-core package.json to include Electron as a platform for client connection. This improves compatibility for Electron builds. * Refactor TypeScript configuration across multiple packages to streamline path management. Update tsconfig.json files in root, api, and loot-core packages to improve import paths and maintain compatibility with internal typings. * Update package dependencies and Vite configuration across component-library and desktop-client. Add vite-tsconfig-paths to component-library and remove it from desktop-client. Refactor Storybook preview file to include a TODO for future refactoring. * Remove Node-specific path from loot-core package.json for client connection, streamlining platform configuration for Electron. * Remove loot-core as a workspace dependency from desktop-electron package.json * Update tsconfig.json to remove reference to desktop-client --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
032d10ac42 |
[AI] Fix API build output path (dist/index.js instead of dist/api/index.js) (#7084)
* [AI] Fix API build output path (dist/index.js instead of dist/api/index.js) - Set rootDir in packages/api/tsconfig.json so output is under dist/ not dist/api/ - Remove loot-core pegjs.ts from include; add local typings/pegjs.d.ts - Use mkdir -p in build:migrations for idempotent build - Exclude **/@types/** so declaration output does not conflict with input Made-with: Cursor * Update TypeScript configuration in api package to refine exclude patterns |
||
|
|
31a027fc64 |
[AI] Add per-package tsconfigs and typescript-strict-plugin for typecheck (#7019)
* [AI] Add per-package tsconfigs and typescript-strict-plugin for typecheck Co-authored-by: Cursor <cursoragent@cursor.com> * Update TypeScript configuration across multiple packages to correct plugin path key from "path" to "paths" and add reference to process-worker typings in index.electron.ts. * Remove reference to process-worker typings in index.electron.ts and add new process-worker typings file for global Process augmentation. * Refactor TypeScript build configurations across multiple packages by removing tsconfig.dist.json files and updating build scripts to use default TypeScript compilation. Adjusted compiler options to target ES2021 and enable declaration generation. * Update TypeScript configuration in api package to refine include and exclude patterns for better file management. * Update build script in api package to ensure migration SQL files are copied to the correct directory by creating the destination folder if it doesn't exist. * Update TypeScript configurations in crdt and desktop-electron packages to refine include and exclude patterns for improved file management. * Update TypeScript dependencies across multiple packages to include typescript-strict-plugin for enhanced type checking and maintain consistency in package.json files. --------- Co-authored-by: Cursor <cursoragent@cursor.com> |