Skip to content

A local-first personal finance app

[AI] Fix mobile back navigation after reconciliation (#9303)

Alejandro de Blas2c86a2e2ceaf
diff --git a/packages/desktop-client/e2e/accounts.mobile.test.ts b/packages/desktop-client/e2e/accounts.mobile.test.ts
index 6ea430fdf3..af9af1e3c5 100644
--- a/packages/desktop-client/e2e/accounts.mobile.test.ts
+++ b/packages/desktop-client/e2e/accounts.mobile.test.ts
@@ -86,5 +86,8 @@ test.describe('Mobile Accounts', () => {
await accountPage.lockTransactions();
await expect(accountPage.reconcilingBanner).not.toBeVisible();
+
+ await page.getByRole('button', { name: 'Back', exact: true }).click();
+ await expect(accountsPage.accountList).toBeVisible();
});
});
diff --git a/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx b/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx
index 30a61b89a8..687acd9fbd 100644
--- a/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx
+++ b/packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx
@@ -151,10 +151,13 @@ function AccountHeader({ account }: { readonly account: AccountEntity }) {
options: {
accountId: account.id,
onReconcile: (amount: number) => {
- setSearchParams(prev => {
- prev.set('reconcile', String(amount));
- return prev;
- });
+ setSearchParams(
+ prev => {
+ prev.set('reconcile', String(amount));
+ return prev;
+ },
+ { replace: true },
+ );
dispatch(
collapseModals({
rootModalName: 'account-menu',
diff --git a/upcoming-release-notes/mobile-reconciliation-back-navigation.md b/upcoming-release-notes/mobile-reconciliation-back-navigation.md
new file mode 100644
index 0000000000..060072c383
--- /dev/null
+++ b/upcoming-release-notes/mobile-reconciliation-back-navigation.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [AlejandroDeBlas]
+---
+
+Return to the accounts list with one tap on Back after reconciling an account on mobile.