actual
actual copied to clipboard
Bugfix: add reset SimpleFIN credential button to escape SimpleFIN broken/unable to sync state
category: Bugfix authors: [mattpetters]
Add reset SimpleFIN credential button to resolve a state in which SimpleFIN is unable to sync
Deploy Preview for actualbudget ready!
Name | Link |
---|---|
Latest commit | 541b68b23ae9d56cd30363df67ec0b24e10fb943 |
Latest deploy log | https://app.netlify.com/sites/actualbudget/deploys/665229ef41d1d2000844e18a |
Deploy Preview | https://deploy-preview-2739.demo.actualbudget.org |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
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.71 MB → 4.72 MB (+1.97 kB) | +0.04% |
Changeset
File | Δ | Size |
---|---|---|
src/components/settings/SimpleFINReset.tsx |
🆕 +1.79 kB | 0 B → 1.79 kB |
src/components/settings/index.tsx |
📈 +177 B (+2.92%) | 5.93 kB → 6.1 kB |
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
Asset | File Size | % Changed |
---|---|---|
static/js/index.js | 3 MB → 3 MB (+1.97 kB) | +0.06% |
Smaller
No assets were smaller
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/usePreviewTransactions.js | 790 B | 0% |
static/js/AppliedFilters.js | 20.41 kB | 0% |
static/js/narrow.js | 59.97 kB | 0% |
static/js/wide.js | 262.45 kB | 0% |
static/js/ReportRouter.js | 1.23 MB | 0% |
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% |
Thanks for adding this, I know lots of people have requested it!
It feels quite out of place where you put it though. To me, it would make more sense in the Advanced Settings screen with the other reset/repair buttons.
Thanks for adding this, I know lots of people have requested it!
It feels quite out of place where you put it though. To me, it would make more sense in the Advanced Settings screen with the other reset/repair buttons.
I actually slept on it and had this same thought, let me move it and I'll update the PR.
Seems like a good fit here.
yup
Seems like a good fit here.
yup, I did more or less the same thing. Feel free to take a look now and lmk if anything else needs maneuvering
whoops, linter fail
@psybers ready for another look whenever :)
I was not able to actually test the code, as I did not want to deal with resetting my token and do not have time to set up a second/test server.
I was not able to actually test the code, as I did not want to deal with resetting my token and do not have time to set up a second/test server.
Probably a hint that I should be updating the docs too. ;)
On SimpleFIN Bridge, you can add multiple "Apps" that all link to your same account:
Creating that Setup Token will generate the setup token you can enter into the "init" part of the setup and it basically is just a new auth credential to allow you to access your existing SimpleFIN accounts. To my knowledge it should not affect your linked accounts, it's just changing your credential to auth with SimpleFIN.
@psybers
@psybers actually hold off on this one, I'm going to run some tests of my own and maybe try to write automated tests as well. might not be able to be done done for another day or two
@psybers the more I sit with this, the more I'm thinking the right way to implement this is to actually have this button hit the server and have the server clear the rows instead of just trying to overwrite by forcing setup again. What do you think?
@mattpetters I'd suggest throwing a "[WIP]" tag on the PR title while you decide the best course.
Since you are rethinking it, maybe look at how the GoCardless sync handles the reset. I believe it has similar functionality: https://discord.com/channels/937901803608096828/940290142579605514/1232681744780759041
👋 We're quite selective about what goes in the "settings" page as we don't want it to get cluttered with all sorts of switches/toggles/buttons. Just the most crucial things.
Take a look at how it's done for gocardless. Ideally we should follow the same pattern for SimpleFin too:
We could add a 3-dot menu to the right of the "Link accounts" button:
We could add a 3-dot menu to the right of the "Link accounts" button:
Has to be earlier than that IMO. If you currently mis-configure the keys - you won't be able to access the "link accounts" modal. Meaning you wouldn't be able to change the keys.
Would it make sense to move the GoCardless one, so then both would be on the initial 'create account' dialog? Can put two menus there, and maybe only show them if credentials are already configured?
I think my initial impl was something similar to that with the reset button below the regular button. Initially I just did that for convenience (everything I wanted to call was right there) but maybe it could have just been refactored to a) be less obtrusive similar to the 3 dot menu and b) only show conditionally as you're suggesting.
PS I should have time to work on this a bit more at some point this weekend so if you guys come upon a design I'll get on it then. And of course feel free to take the reins if you want ;)
Maybe something like this? @MatissJanis what do you think?
I think that looks good (just need to vertically align the "..." menu with the button)!
@mattpetters Feel free to use this as a starting point:
https://github.com/psybers/actual/tree/reset-sync
👋 just checking in: is this ready for review? If so - would you mind removing the "WIP" prefix from the PR? That lets us know this is ready.
@MatissJanis Since this PR still implements it via the settings page, I would guess it is a WIP.
Closing in favor of #2870. Thanks for getting this started.