Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeScript] Make db.runQuery generic to make it easy to type DB query results #4247

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

joel-jeremy
Copy link
Contributor

@joel-jeremy joel-jeremy commented Jan 28, 2025

This PR is to make the runQuery function generic to make it easy to type DB query results and propagate the proper types from the bottom up. Right now the runQuery returns any which means we lose type safety on the callers of this function unless we cast the result to the proper type.

Note: We have 2 runQuerys in the codebase. One is for AQL (server/aql folder) and the other is for direct DB access (server/db folder). This PR is for the DB.

The next phase for this is to make the higher level functions e.g. first, all, firstSync, etc, generic and all of their callers.

  • db.runQuery
  • db.first
  • db.firstSync
  • db.all
  • db.select
  • db.selectWithSchema
  • db.selectFirstWithSchema

@actual-github-bot actual-github-bot bot changed the title [TypeScript] Make runQuery generic to make it easy to type DB query results. [WIP] [TypeScript] Make runQuery generic to make it easy to type DB query results. Jan 28, 2025
Copy link

netlify bot commented Jan 28, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 89047ef
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/679820e8c94eb400081bdf2b
😎 Deploy Preview https://deploy-preview-4247.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 28, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit a4a40a6
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/679822344283cd0008ae5ec1
😎 Deploy Preview https://deploy-preview-4247.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Jan 28, 2025

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
15 6.7 MB → 6.7 MB (+237 B) +0.00%
Changeset
File Δ Size
node_modules/es-define-property/index.js 📈 +210 B (+60.00%) 350 B → 560 B
node_modules/has-property-descriptors/index.js 📈 +9 B (+1.57%) 573 B → 582 B
node_modules/call-bind/index.js 📈 +9 B (+0.85%) 1.04 kB → 1.05 kB
node_modules/define-data-property/index.js 📈 +9 B (+0.39%) 2.24 kB → 2.25 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 4.28 MB → 4.29 MB (+237 B) +0.01%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/nl.js 79.76 kB 0%
static/js/en-GB.js 92.87 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/workbox-window.prod.es5.js 5.69 kB 0%
static/js/pt-BR.js 103.29 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/en.js 99.34 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/uk.js 111.11 kB 0%
static/js/AppliedFilters.js 10.52 kB 0%
static/js/useAccountPreviewTransactions.js 1.69 kB 0%
static/js/narrow.js 84.94 kB 0%
static/js/wide.js 102.8 kB 0%
static/js/ReportRouter.js 1.59 MB 0%

Copy link
Contributor

github-actions bot commented Jan 28, 2025

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.33 MB → 1.33 MB (-1 B) -0.00%
Changeset
File Δ Size
packages/loot-core/src/server/db/index.ts 📈 +1.08 kB (+5.56%) 19.44 kB → 20.52 kB
packages/loot-core/src/server/tools/app.ts 📈 +3 B (+0.09%) 3.26 kB → 3.26 kB
packages/loot-core/src/server/main.ts 📉 -7 B (-0.01%) 69.5 kB → 69.49 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
kcab.worker.js 1.33 MB → 1.33 MB (-1 B) -0.00%

Unchanged

No assets were unchanged

// TODO: In the next phase, we will make this function generic
// and pass the type of the return type to `runQuery`.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return runQuery(sql, params, true) as any[];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be made generic on the the next PRs so that we can control the PR size

// TODO: In the next phase, we will make this function generic
// and pass the type of the return type to `runQuery`.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return arr.length === 0 ? null : (arr[0] as any);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be made generic on the the next PRs so that we can control the PR size

// TODO: In the next phase, we will make this function generic
// and pass the type of the return type to `runQuery`.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return arr.length === 0 ? null : (arr[0] as any);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be made generic on the the next PRs so that we can control the PR size

// TODO: In the next phase, we will make this function generic
// and pass the type of the return type to `runQuery`.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return rows[0] as any;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be made generic on the the next PRs so that we can control the PR size

@joel-jeremy joel-jeremy changed the title [WIP] [TypeScript] Make runQuery generic to make it easy to type DB query results. [TypeScript] Make runQuery generic to make it easy to type DB query results. Jan 28, 2025
Copy link
Contributor

coderabbitai bot commented Jan 28, 2025

Walkthrough

The pull request introduces comprehensive type safety improvements across multiple files in the loot-core package. The changes primarily focus on enhancing database query type annotations, replacing existing entity types with more specific Db* prefixed types from a new centralized types module. This includes updating function signatures in various server-side files like budget, db, main, and sync to use more precise type definitions. The modifications aim to improve type checking, reduce potential runtime errors, and provide clearer type constraints for database interactions. Key areas of change include replacing generic type annotations with specific database entity types and adding explicit type parameters to query methods.

Possibly related PRs

Suggested labels

typescript, type-safety, refactoring

Suggested reviewers

  • MikesGlitch
  • joel-jeremy
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
packages/loot-core/src/server/tools/app.ts (1)

Line range hint 1-1: Consider removing @ts-strict-ignore to align with type safety goals.

Given that this PR aims to improve type safety, particularly around database operations, we should remove this ignore directive and properly type the code. This would help catch potential type-related issues early.

Consider:

  1. Removing the @ts-strict-ignore directive
  2. Adding proper type annotations for database query results
  3. Utilizing the new generic runQuery functionality introduced in this PR
🧹 Nitpick comments (5)
packages/loot-core/src/server/db/types/index.ts (3)

100-102: Consider removing or documenting unused properties.

There are properties marked as "Unused in the codebase". Consider:

  1. Removing them if they're truly unused
  2. Adding documentation explaining why they're kept

Also applies to: 172-176


8-315: Consider enhancing type documentation.

While the types are well-structured, they could benefit from additional documentation:

  1. Add JSDoc comments for complex types
  2. Document the purpose of boolean flags (1 | 0)
  3. Explain the relationship between view types and their base types

Example enhancement:

+/** Represents a bank account in the system */
 export type DbAccount = {
+  /** Unique identifier for the account */
   id: string;
   name: string;
+  /** Whether the account is excluded from budget calculations (1: yes, 0: no) */
   offbudget: 1 | 0;
   // ... rest of the properties
 };

276-277: Consider consolidating view types.

The types DbViewTransactionInternalAlive and DbViewTransaction are identical. Consider:

  1. Using a single type
  2. Adding documentation explaining why multiple type aliases exist
packages/loot-core/src/server/sync/migrate.test.ts (1)

82-86: Consider selecting specific columns instead of using wildcard.

Since the test only checks length and parent_id, consider making the query more explicit:

-    const transactions = db.runQuery<db.DbTransaction>(
-      'SELECT * FROM transactions',
+    const transactions = db.runQuery<Pick<db.DbTransaction, 'parent_id'>>(
+      'SELECT parent_id FROM transactions',
       [],
       true,
     );

This change would:

  1. Make the query more performant by only fetching needed columns
  2. Better align the runtime data shape with the TypeScript type
  3. Make the test's intentions clearer
packages/loot-core/src/server/tools/app.ts (1)

Line range hint 13-98: Consider breaking down the large method into smaller, focused functions.

The tools/fix-split-transactions method handles multiple distinct operations. Consider refactoring it into smaller, focused functions for better maintainability and testability:

+ async function fixBlankPayees() {
+   const blankPayeeRows = await db.all(`
+     SELECT t.*, p.payee AS parentPayee FROM v_transactions_internal t
+     LEFT JOIN v_transactions_internal p ON t.parent_id = p.id
+     WHERE t.is_child = 1 AND t.payee IS NULL AND p.payee IS NOT NULL
+   `);
+   
+   await runMutator(async () => {
+     const updated = blankPayeeRows.map(row => ({
+       id: row.id,
+       payee: row.parentPayee,
+     }));
+     await batchUpdateTransactions({ updated });
+   });
+   
+   return blankPayeeRows.length;
+ }

  app.method('tools/fix-split-transactions', async () => {
-   // Current implementation
+   const numBlankPayees = await fixBlankPayees();
+   const numCleared = await fixClearedFlags();
+   // ... similar refactoring for other operations
    
    return {
      numBlankPayees,
      numCleared,
      // ... rest of the stats
    };
  });

Additionally, consider:

  1. Adding error handling for database operations
  2. Adding logging for better observability
  3. Adding transaction boundaries for related operations
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dcd229 and a4a40a6.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/4247.md is excluded by !**/*.md
📒 Files selected for processing (11)
  • packages/loot-core/src/server/budget/base.ts (2 hunks)
  • packages/loot-core/src/server/budget/statements.ts (2 hunks)
  • packages/loot-core/src/server/budget/template-notes.test.ts (2 hunks)
  • packages/loot-core/src/server/db/index.ts (19 hunks)
  • packages/loot-core/src/server/db/mappings.ts (1 hunks)
  • packages/loot-core/src/server/db/types.d.ts (0 hunks)
  • packages/loot-core/src/server/db/types/index.ts (1 hunks)
  • packages/loot-core/src/server/main.ts (5 hunks)
  • packages/loot-core/src/server/sync/index.ts (1 hunks)
  • packages/loot-core/src/server/sync/migrate.test.ts (1 hunks)
  • packages/loot-core/src/server/tools/app.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/loot-core/src/server/db/types.d.ts
👮 Files not reviewed due to content moderation or server errors (4)
  • packages/loot-core/src/server/budget/base.ts
  • packages/loot-core/src/server/db/index.ts
  • packages/loot-core/src/server/sync/index.ts
  • packages/loot-core/src/server/main.ts
🔇 Additional comments (6)
packages/loot-core/src/server/budget/statements.ts (1)

1-2: LGTM! Type-safe implementation.

The changes correctly implement type safety by:

  1. Importing the new DbSchedule type
  2. Using it as the return type for getActiveSchedules

Also applies to: 44-47

packages/loot-core/src/server/db/mappings.ts (1)

25-30: LGTM! Enhanced type safety with const assertions.

The addition of as const assertions improves type safety by:

  1. Making the tuple types more specific (exact types instead of general string)
  2. Ensuring immutability of the mapped arrays
packages/loot-core/src/server/budget/template-notes.test.ts (1)

22-22: LGTM! Tests updated to use new type definitions.

The mock functions have been correctly updated to use the new DbSchedule type, maintaining consistency with the type system changes.

Also applies to: 247-266

packages/loot-core/src/server/db/types/index.ts (1)

1-5: LGTM! Clear documentation of type purpose.

The comment clearly distinguishes between database schema types and AQL query framework types.

packages/loot-core/src/server/sync/migrate.test.ts (2)

82-86: LGTM! Type parameter improves type safety.

The addition of db.DbTransaction type parameter aligns with the PR's objective to enhance type safety in database queries.


Line range hint 1-1: Consider removing @ts-strict-ignore as part of type safety improvements.

Since this PR focuses on enhancing type safety through generic queries, it would be beneficial to address the issues preventing strict TypeScript checking in this file.

Let's identify what's preventing strict mode:

Copy link
Contributor

@matt-fidd matt-fidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the coderabbit comment happy to approve

@matt-fidd matt-fidd self-assigned this Feb 12, 2025
Copy link
Contributor

@matt-fidd matt-fidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joel-jeremy joel-jeremy merged commit cab24df into master Feb 18, 2025
20 checks passed
@joel-jeremy joel-jeremy deleted the ts-runQuery-new branch February 18, 2025 20:14
lelemm added a commit to lagoom-br/actual that referenced this pull request Feb 20, 2025
* 🐛  Fix Initializing the connection to the local database hang (actualbudget#4375)

* fix initializing to the local db

* release notes

* Add percentage adjustments to schedule templates (actualbudget#4098) (actualbudget#4257)

* add percentage adjustments to schedule templates

* update release note

* remove unecessary parentheses

* Update packages/loot-core/src/server/budget/goalsSchedule.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* PR comments addressed

* Linting fixes

* Updated error handling, added tests

* Linting fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Custom mapping and import settings for bank sync providers (actualbudget#4253)

* barebones UI

* add saving and prefs

* add last sync functionality

* use mapping for synced transactions

* note

* jest -u

* Update VRT

* Coderabbit

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* add new fields

* rename migration, newer in master

* lint

* coderabbit

* update snapshots

* GoCardless handlers fallback and notes

* expose new fields from SimpleFIN

* update tests

* update instructions on GoCardless handlers

* lint

* feedback

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Add fallback value for payeename: 'undefined' - CBC Bank (actualbudget#4384)

* Add fallback value for payename: 'undefined'

* docs: add release note

* Add fallback value for payename: 'undefined' (for negative amounts)

* [TypeScript] Convert test page models to TS (actualbudget#4218)

* Dummy commit

* Delete js snapshots

* Move extended expect and test to fixtures

* Fix wrong commit

* Update VRT

* Dummy commit to run GH actions

* Convert test page models to TS

* Release notes

* Fix typecheck errors

* New page models to TS

* Fix typecheck error

* Fix page name

* Put awaits on getTableTotals

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* rename two migrations to realign with convention (actualbudget#4343)

* Updating sync server package name to @actual-app/sync-server (actualbudget#4370)

* updating sync server to have a consistent package name

* release notes

* Add today button on mobile budget page (actualbudget#4380)

* feat: today button on mobile budget page

Jumps to the current month

* add release note

* cleaner onCurrentMonth

* Update VRT

* use SvgCalendar from icons/v2

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Development mode for sync server (React Fast Refresh on port 5006) (actualbudget#4372)

* devmode for sync server

* removed pluggy from this version

* md

* code review

* changed how open browser

* missed this

* linter

* trigger actions

* 🐛 Fix: Error rate limit at user directory page (actualbudget#4397)

* Error rate limit

* md

* 🐛 Fix new proxy middleware dependency missing on prod build (actualbudget#4400)

* fix new proxy middleware not installed on prod build

* release notes

* Remove deprecated imports for several components (actualbudget#4385)

* don't unbudget goals

* lint

* Fixes actualbudget#4069 : Ignore CSV inOutMode during OFX imports (actualbudget#4382)

* Ignore inOutMode during OFX imports

* Add release notes

---------

Co-authored-by: youngcw <calebyoung94@gmail.com>

* fix tooltip translation (actualbudget#4402)

* [TypeScript] Make `db.runQuery` generic to make it easy to type DB query results (actualbudget#4247)

* Make runQuery generic to make it easy to type DB query results.

* Release notes

* typo

* update mapping data for existing synced transactions and always show direction dropdown (actualbudget#4403)

* update sync mapping data for existing transactions on sync

* show payment direction dropdown regardless of sample data

* note

* ignore changes in raw_synced_data

* Fix top-level types of `send` function (actualbudget#4145)

* Add release notes

* Fix types of `send` function

* Fix `send` types in a number of places

* PR feedback

* Foundations for the budget automations UI (actualbudget#4308)

* Foundations for the budget automations UI

* Coderabbit

* Fix react-hooks/exhaustive-deps error on useSelected.tsx (actualbudget#4258)

* Fix react-hooks/exhaustive-deps error on useSelected.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on usePayees.ts (actualbudget#4260)

* Fix react-hooks/exhaustive-deps error on usePayees.ts

* Rename

* Release notes

* Fix react-hooks/exhaustive-deps error on useAccounts.ts (actualbudget#4262)

* Fix react-hooks/exhaustive-deps error on useAccounts.ts

* Release notes

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx (actualbudget#4273)

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx

* Release notes

* [WIP] BANKS_WITH_LIMITED_HISTORY constant update (actualbudget#4388)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx (actualbudget#4259)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx

* Remove comment in eslint config

* Release notes

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx (actualbudget#4268)

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx

* Release notes

* Fix lint

* Fix react-hooks/exhaustive-deps error on table.tsx (actualbudget#4274)

* Fix react-hooks/exhaustive-deps error on table.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on useCategories.ts (actualbudget#4261)

* Fix react-hooks/exhaustive-deps error on useCategories.ts

* Release notes

* 👷 Typescript: Improving typing of asyncStorage (global-store.json) (actualbudget#4369)

* typing globalprefs

* adding release notes

* unneeded partial

* removing prop that crept in

* 📚 Translation batch #1 (actualbudget#4408)

* Translation batch

* md

* Update packages/desktop-client/src/components/settings/Export.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix code review from coderabbit

* code review

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix currencyToAmount incorrectly converting input (actualbudget#4383)

* fix: ensure currencyToAmount works regardless of the configured number format

* chore: linting

* docs: add release note

* test: ensure correct amount is entered for debit when adding split transactions

* chore: rename variable thousandsSep to thousandsSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename variable decimalSep to decimalSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename decimalSep and thousandsSep variables to decimalSeparator and thousandsSeparator

---------

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* useDisplayPayee hook to unify payee names in mobile and desktop. (actualbudget#4213)

* useDisplayPayee hook to unify payee logic in mobile and desktop

* Release notes

* Fix typecheck errors

* Fix test

* Update test

* Revert (No payee) color

* Fix tests

* VRT

* Fix category transactions

* Fix lint and VRT

* Update VRT

* Translate

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Extract transaction related server handlers from `main.ts` to `server/transactions/app.ts` (actualbudget#4221)

* Move transaction related handlers to server/transactions folder and use the new convention

* Fix lint and typecheck

* Release notes

* Update handler names

* Move get-earliest-transaction

* Update release notes

* Fix tests

* Fix types

* Fix lint

* Update snapshot

* Remove duplicate parse-file.ts

* Fix lint

* 🐛 Fix `On budget` / `Off budget` underline with translated languages (actualbudget#4417)

* Fix `On budget` / `Off budget` underline

* md

* ajuste para o merge

---------

Co-authored-by: Michael Clark <5285928+MikesGlitch@users.noreply.github.com>
Co-authored-by: Matt Farrell <10377148+MattFaz@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Michotte <55855805+MMichotte@users.noreply.github.com>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
Co-authored-by: Adam Stück <adam@adast.dk>
Co-authored-by: Alberto Cortina Eduarte <albertocortina96@gmail.com>
Co-authored-by: Gabriel J. Michael <gabriel.j.michael@gmail.com>
Co-authored-by: Julian Dominguez-Schatz <julian.dominguezschatz@gmail.com>
Co-authored-by: Michał Gołąb <23549913+michalgolab@users.noreply.github.com>
Co-authored-by: Antoine Taillard <an.taillard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants