Skip to content

fix flaky tests - #8248

Merged
matt-fidd merged 6 commits into
actualbudget:masterfrom
matt-fidd:fix-flaxy-tests
Jun 17, 2026
Merged

matt-fidd merged 6 commits into
actualbudget:masterfrom
matt-fidd:fix-flaxy-tests

Conversation

@matt-fidd

@matt-fidd matt-fidd commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes:

Related issue(s)

Testing

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I have read every line of this diff and can explain what each change does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 29 13.1 MB → 13.1 MB (+32 B) +0.00%
loot-core 1 4.9 MB 0%
api 2 3.93 MB 0%
cli 1 8.02 MB 0%
crdt 1 11.12 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
29 13.1 MB → 13.1 MB (+32 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/transactions.ts 📈 +139 B (+1.65%) 8.22 kB → 8.36 kB
src/components/mobile/transactions/TransactionEdit.tsx 📉 -21 B (-0.03%) 71.59 kB → 71.57 kB
src/components/transactions/TransactionsTable.tsx 📉 -27 B (-0.03%) 90.5 kB → 90.47 kB
src/components/transactions/TransactionList.tsx 📉 -59 B (-0.33%) 17.38 kB → 17.32 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 7.61 MB → 7.61 MB (+32 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 735.67 kB 0%
static/js/PayeeRuleCountLabel.js 7.1 kB 0%
static/js/ReportRouter.js 1.25 MB 0%
static/js/TransactionList.js 85.25 kB 0%
static/js/_baseIsEqual.js 76.78 kB 0%
static/js/ca.js 179.71 kB 0%
static/js/da.js 100.19 kB 0%
static/js/de.js 176.61 kB 0%
static/js/en-GB.js 9.25 kB 0%
static/js/en.js 200.33 kB 0%
static/js/es.js 171.82 kB 0%
static/js/extends.js 478.5 kB 0%
static/js/fr.js 171.39 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 158.13 kB 0%
static/js/narrow.js 358.88 kB 0%
static/js/nb-NO.js 141.55 kB 0%
static/js/nl.js 119.14 kB 0%
static/js/pt-BR.js 181.5 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 173.33 kB 0%
static/js/theme.js 31.02 kB 0%
static/js/uk.js 209.97 kB 0%
static/js/useTransactionBatchActions.js 9.71 kB 0%
static/js/wide.js 298.21 kB 0%
static/js/workbox-window.prod.es5.js 7.21 kB 0%
static/js/zh-Hans.js 113.26 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.9 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.CBArEOvy.js 4.9 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.93 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.93 MB 0%
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 8.02 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 8.02 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.12 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 11.12 kB 0%

@netlify

netlify Bot commented Jun 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit ddafbac
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/6a32e1cef442220008fcfd9f
😎 Deploy Preview https://deploy-preview-8248.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hello contributor!

We would love to review your PR! Before we can do that, please make sure:

  • ✅ All CI checks pass
  • ✅ The PR is moved from draft to open (if applicable)
  • ✅ The "[WIP]" prefix is removed from the PR title
  • ✅ The PR description follows the provided template, with all checklist boxes filled in
  • ✅ All CodeRabbit code review comments are resolved (if you disagree with anything - reply to the bot with your reasoning so we can read through it). The bot will eventually approve the PR.
  • ✅ Any AI usage is disclosed (see our AI Usage Policy)

A quick note on volume: please get one PR reviewed and merged before opening several more. A stack of simultaneous, similar PRs from one author is reviewed slowly, and low-effort, untested, or undisclosed-AI PRs may be closed without a detailed review.

We do this to reduce the TOIL the core contributor team has to go through for each PR and to allow for speedy reviews and merges.

For more information, please see our Contributing Guide.

@github-actions

Copy link
Copy Markdown
Contributor

VRT tests ❌ failed. View the test report.

To update the VRT screenshots, comment /update-vrt on this PR. The VRT update operation takes about 50 minutes.

@matt-fidd

Copy link
Copy Markdown
Member Author

/update-vrt

@matt-fidd
matt-fidd marked this pull request as ready for review June 17, 2026 18:05
@matt-fidd
matt-fidd requested a review from joel-jeremy as a code owner June 17, 2026 18:05
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Extracts a new shared helper makeEmptySplitSubtransactions that generates two empty split child transactions with sort_order values of -1 and -2, replacing identical inline factories in TransactionEdit, TransactionList, and TransactionsTable. Adds unit tests for the helper and sort_order preservation. Separately, injects CSS to hide tooltips in the custom reports e2e test's beforeEach.

Changes

makeEmptySplitSubtransactions extraction

Layer / File(s) Summary
New helper and unit tests
packages/loot-core/src/shared/transactions.ts, packages/loot-core/src/shared/transactions.test.ts
Exports makeEmptySplitSubtransactions(parent) returning two child records with sort_order -1 and -2; adds tests verifying the shape and that splitTransaction honors provided sort_order values.
Update split callers to use helper
packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx, packages/desktop-client/src/components/transactions/TransactionList.tsx, packages/desktop-client/src/components/transactions/TransactionsTable.tsx
Imports makeEmptySplitSubtransactions in each component and passes it as the child factory to splitTransaction, replacing inline parent => [makeChild(parent), makeChild(parent)] callbacks.

Flaky test fixes

Layer / File(s) Summary
Tooltip CSS injection and release note
packages/desktop-client/e2e/reports.test.ts, upcoming-release-notes/fix-flaxy-tests.md
Adds page.addStyleTag in the custom reports e2e beforeEach to inject CSS hiding [role="tooltip"] elements during screenshot assertions; adds a maintenance release note.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • actualbudget/actual#8234: Directly related — introduces the "default two splits" behavior in splitTransaction and the inline child factory pattern that this PR now consolidates into makeEmptySplitSubtransactions.

Suggested reviewers

  • youngcw
  • MikesGlitch
  • jfdoming

🐇 Two little splits, -1 and -2,
Now live in a helper, tidy and true.
No more inline clones, no tooltip in sight,
The screenshots come clean and the tests burn bright!
Hop hop, refactor — everything's right! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix flaky tests' is vague and does not convey specific details about what makes the tests flaky or how they are fixed. Consider using a more descriptive title like 'Fix flaky tests by sorting splits and hiding report tooltips' to better convey the actual changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the two issues being fixed: inconsistent split sorting and unpredictable tooltip appearance in VRT, making it related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
upcoming-release-notes/fix-flaxy-tests.md (1)

1-7: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Filename typo: "flaxy" should be "flaky".

The release note file is named fix-flaxy-tests.md, but the correct spelling is "flaky" (as used in the note content). Please rename the file to fix-flaky-tests.md.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@upcoming-release-notes/fix-flaxy-tests.md` around lines 1 - 7, The release
note file has a spelling error in its filename. Rename the file from
"fix-flaxy-tests.md" to "fix-flaky-tests.md" to correct the typo where "flaxy"
should be spelled as "flaky", which matches the correct spelling already used in
the file content.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@upcoming-release-notes/fix-flaxy-tests.md`:
- Around line 1-7: The release note file has a spelling error in its filename.
Rename the file from "fix-flaxy-tests.md" to "fix-flaky-tests.md" to correct the
typo where "flaxy" should be spelled as "flaky", which matches the correct
spelling already used in the file content.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2d83b9a3-6633-4f9a-a1e8-34c649942458

📥 Commits

Reviewing files that changed from the base of the PR and between 19cea1a and ddafbac.

⛔ Files ignored due to path filters (17)
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Area-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Area-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Bar-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Data-Table-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Data-Table-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Donut-Graph-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Donut-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Donut-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Line-Graph-and-checks-the-visuals-1-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Line-Graph-and-checks-the-visuals-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Switches-to-Line-Graph-and-checks-the-visuals-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Validates-that-show-labels-button-shows-the-labels-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Validates-that-show-labels-button-shows-the-labels-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Validates-that-show-legend-button-shows-the-legend-side-bar-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Validates-that-show-legend-button-shows-the-legend-side-bar-3-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Validates-that-show-summary-button-shows-the-summary-2-chromium-linux.png is excluded by !**/*.png
  • packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-custom-reports-Validates-that-show-summary-button-shows-the-summary-3-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • packages/desktop-client/e2e/reports.test.ts
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx
  • packages/desktop-client/src/components/transactions/TransactionList.tsx
  • packages/desktop-client/src/components/transactions/TransactionsTable.tsx
  • packages/loot-core/src/shared/transactions.test.ts
  • packages/loot-core/src/shared/transactions.ts
  • upcoming-release-notes/fix-flaxy-tests.md

@matt-fidd
matt-fidd enabled auto-merge June 17, 2026 18:32
@matt-fidd
matt-fidd added this pull request to the merge queue Jun 17, 2026
Merged via the queue into actualbudget:master with commit f781cb1 Jun 17, 2026
39 checks passed
@matt-fidd
matt-fidd deleted the fix-flaxy-tests branch June 17, 2026 19:40
@coderabbitai coderabbitai Bot mentioned this pull request Aug 11, 2026
3 tasks done
RafaelEspino pushed a commit to RafaelEspino/actual that referenced this pull request Oct 28, 2026
* fix split sort order on new splits

* hide tooltips on report page to reduce vrt flakes

* note

* Update VRT screenshots

Auto-generated by VRT workflow

PR: actualbudget#8248

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.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