From ee59449d2994a3f7cea23f987b9f584014000d0e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 5 Jul 2026 20:58:12 +0200 Subject: [PATCH 1/2] Task/reorder attributes in cash portfolio calculator test (#7254) Reorder attributes --- .../calculator/roai/portfolio-calculator-cash.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts index 7774ee629..589168989 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-cash.spec.ts @@ -148,15 +148,15 @@ describe('PortfolioCalculator', () => { balances: [ { accountId, - id: randomUUID(), date: parseDate('2023-12-31'), + id: randomUUID(), value: 1000, valueInBaseCurrency: 850 }, { accountId, - id: randomUUID(), date: parseDate('2024-12-31'), + id: randomUUID(), value: 2000, valueInBaseCurrency: 1800 } From 898fc76965efe0096d2d76f48cffbf9155b1a7f0 Mon Sep 17 00:00:00 2001 From: Archit Goyal Date: Mon, 6 Jul 2026 00:53:23 +0530 Subject: [PATCH 2/2] Task/set change detection strategy to OnPush in FIRE page (#7252) * Set change detection strategy to OnPush * Update changelog --- CHANGELOG.md | 6 ++++++ .../src/app/pages/portfolio/fire/fire-page.component.ts | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df95d849b..12df7a33c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Set the change detection strategy to `OnPush` in the _FIRE_ page + ## 3.21.0 - 2026-07-05 ### Added diff --git a/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts b/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts index 04165ab11..e7b694819 100644 --- a/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts +++ b/apps/client/src/app/pages/portfolio/fire/fire-page.component.ts @@ -14,6 +14,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value'; import { CommonModule } from '@angular/common'; import { + ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, @@ -29,6 +30,7 @@ import { DeviceDetectorService } from 'ngx-device-detector'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @Component({ + changeDetection: ChangeDetectionStrategy.OnPush, imports: [ CommonModule, FormsModule, @@ -89,6 +91,7 @@ export class GfFirePageComponent implements OnInit { : 0 } }; + if (this.user.subscription?.type === SubscriptionType.Basic) { this.fireWealth = { today: { @@ -107,6 +110,8 @@ export class GfFirePageComponent implements OnInit { .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((impersonationId) => { this.hasImpersonationId = !!impersonationId; + + this.changeDetectorRef.markForCheck(); }); this.safeWithdrawalRateControl.valueChanges @@ -135,9 +140,9 @@ export class GfFirePageComponent implements OnInit { ); this.calculateWithdrawalRates(); - - this.changeDetectorRef.markForCheck(); } + + this.changeDetectorRef.markForCheck(); }); }