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

[WIP] 🐛 fix the app randomly navigating back (closing) #2772

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

MatissJanis
Copy link
Member

Closes #2596

Reproduction:

  1. open demo link and create an empty budget
  2. close the tab
  3. open demo link /accounts
  4. close the tab
  5. open demo link /accounts
  6. 💣

@github-actions github-actions bot changed the title 🐛 fix the app randomly navigating back (closing) [WIP] 🐛 fix the app randomly navigating back (closing) May 17, 2024
Copy link

netlify bot commented May 17, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 0fc9430
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6647ac748896430008e87740
😎 Deploy Preview https://deploy-preview-2772.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

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
9 4.72 MB → 4.72 MB (-37 B) -0.00%
Changeset
File Δ Size
src/hooks/useNavigate.ts 📉 -37 B (-3.91%) 946 B → 909 B
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
static/js/index.js 3 MB → 3 MB (-37 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 59.97 kB 0%
static/js/usePreviewTransactions.js 790 B 0%
static/js/AppliedFilters.js 20.54 kB 0%
static/js/wide.js 261.78 kB 0%
static/js/ReportRouter.js 1.23 MB 0%

Copy link
Contributor

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.2 MB 0%

Changeset

No files were changed

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.js 1.2 MB 0%

@MatissJanis MatissJanis changed the title [WIP] 🐛 fix the app randomly navigating back (closing) 🐛 fix the app randomly navigating back (closing) May 17, 2024
Copy link
Contributor

@carkom carkom left a comment

Choose a reason for hiding this comment

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

LGTM!

@youngcw youngcw added this to the v24.6.0 milestone May 22, 2024
@joel-jeremy
Copy link
Contributor

joel-jeremy commented May 27, 2024

Removing this code will regress into the old bug where if you press back, it will appear as if nothing is happening. Steps to reproduce:

  1. Go to an account
  2. Add a transaction using the top right + button
  3. Press back
  4. Nothing happens - app stays on the same page

Maybe we could instead add a check to only do the navigate(-1) if there is still a previous location left or history stack still has entries.

@youngcw youngcw removed this from the v24.6.0 milestone May 28, 2024
@MatissJanis MatissJanis changed the title 🐛 fix the app randomly navigating back (closing) [WIP] 🐛 fix the app randomly navigating back (closing) Jun 5, 2024
@MatissJanis
Copy link
Member Author

Hey @joel-jeremy . Sorry for taking such a long time to get back at this PR.

So I tried to reproduce your bug on desktop (using this hash), but was not able to. So I tried on mobile - was able to reproduce there (after adding transaction you need to click 2x "back" to actually go back). However, I was also able to reproduce the same bug on edge. Can you double-check if you can reproduce the bug on edge? If yes - then this PR wouldn't be introducing the regression.

But maybe I'm testing incorrectly.

Copy link
Contributor

@joel-jeremy joel-jeremy left a comment

Choose a reason for hiding this comment

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

LGTM. I am also able to reproduce on the latest release build.

@MatissJanis MatissJanis merged commit 247e3e8 into master Jun 27, 2024
20 of 21 checks passed
@MatissJanis MatissJanis deleted the matiss/fix-2596 branch June 27, 2024 18:00
MatissJanis added a commit that referenced this pull request Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Site closes when opening
4 participants