Repository navigation
The category picker and reimbursable controls show the latest after a stale refusal, instead of saying "Refresh and try again" (#139) - #251
Merged
Conversation
…saying "Refresh and try again" (#139) The categorize route answered four refusals with "... Refresh and try again.": the transaction gone (404), removed by the bank (400), the category deleted (400), or the row changed under the write (409). The picker showed the words as they stood, and the installed app has no reload button, so the person was told to do something they couldn't, while the row kept its stale value. The picker now reloads itself after a 404 or 409, as CategoryRulesCard and the reimbursable controls already do, and the route says "Showing the latest." instead. The removed row and the deleted category answer 409 rather than 400, since they're stale rows too, so the reload removes the row or updates the list. The refusal's words stay through the reload that moves the select, so it doesn't change with nothing to say why. Any other refusal still neither reloads nor survives the next change from the server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e at the next change (#139) The test's second pick was another refusal, which clears the stale mark itself, so it could not see a new pick that forgot to. A request lost in flight can. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ther device's pick (#139) The route has no check on a pick another device made: the later pick wins. Its 409 is the bank removing or re-tagging the row, or a deleted category. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…s say "Showing the latest" too (#139) From the review of #251: - The flag that kept a stale refusal's words through the reload is gone. The route's 409s almost never leave the row on screen and change it, and when the reload left the row alone, the flag kept the words past the next unrelated change. The picker still reloads after a 404 or 409, and its words now go at the next change, as any refusal's do. - A row that's gone takes its message with it when the list reloads. That's also true of the reimbursable controls, so it's filed as #252 rather than half-fixed here. - The reimbursable route's stale-row refusals say "Showing the latest." too, since those controls already reload on a 404 or 409. Its removed row answers 409 rather than 400, so the controls reload for it as well, and one sheet no longer gives two answers for one removed row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This finishes #139. When a change to a transaction was refused because the transaction had gone stale, the picker and the reimbursable controls said "Refresh and try again". The installed app has no refresh button. Now they show the latest themselves.
What changes for you
This only changes what you see when a change on Transactions is refused because the page is out of date:
The reimbursable tick and editor, which already reloaded, say "Showing the latest." too. For a removed transaction they now reload as well, so one sheet no longer gives two answers.
Other refusals don't change. A credit-card payment, for example, still says why, and doesn't reload. Two people picking for the same transaction isn't one of these: the later pick simply wins, as before.
What's still missing: when the row itself is gone, its message goes with it, so nothing says the change wasn't saved. That was already true of the reimbursable controls. It's filed as #252, which suggests a notice above the list, like the one Goals has.
How
components/CategoryPicker.tsx: after a refusal with status 404 or 409, it callsrouter.refresh(), asCategoryRulesCardand the reimbursable controls already do. Any other refusal still doesn't reload.app/api/transactions/categorize/route.ts:app/api/reimbursable/route.ts: the same words for its three stale-row refusals. A removed transaction answers 409 rather than 400.Checked
Review
Code and behaviour: nothing Critical.
No phone check
None of these can be brought about on purpose without changing your real data. Deleting a category takes its rules with it, and the bank decides when a pending transaction posts. A preview won't help either: a pick there still saves to your real data, and only rule learning is off. The screens themselves don't change, so I'd merge this without a phone check.
Closes #139.
🤖 Generated with Claude Code