Problem Statement
Currently, the transaction creation and update workflow does not properly handle multiple rapid submissions while a request is still processing.
Users can click the submit/update button multiple times, which may lead to:
- duplicate transaction entries
- repeated API/database requests
- inconsistent dashboard totals
- accidental duplicate expenses/income records
- confusing UI behavior during async operations
Additionally, there is limited visual feedback during processing, making it unclear whether a request is still running.
Proposed Solution
Implement proper async loading-state handling and duplicate submission prevention for transaction-related actions.
Suggested improvements:
- disable submit/update buttons while requests are processing
- add loading indicators/spinners
- prevent duplicate requests using execution guards
- restore UI state correctly after request completion/failure
- improve async cleanup using
finally
Example:
if (loading) return;
setLoading(true);
try {
await submitTransaction();
} finally {
setLoading(false);
}
Optional enhancements:
- toast notifications
- reusable loading button component
- debounce/throttle handling
- optimistic UI updates
Affected Component
Frontend Dashboard (Next.js — apps/frontend/)
Estimated Difficulty
🟢 Beginner — Small, self-contained change
Alternatives Considered
A temporary workaround is manually avoiding repeated clicks during submission, but this is unreliable and does not solve the underlying async state-management issue.
Frontend-only button disabling without proper request-state handling was also considered, but a more complete async workflow solution would provide better reliability and scalability.
Additional Context
This enhancement improves:
- frontend responsiveness
- data consistency
- backend efficiency
- transaction reliability
- overall user experience
Similar patterns are commonly implemented in financial/productivity applications to avoid duplicate actions and improve UX during async operations.
Contribution
Checklist
Problem Statement
Currently, the transaction creation and update workflow does not properly handle multiple rapid submissions while a request is still processing.
Users can click the submit/update button multiple times, which may lead to:
Additionally, there is limited visual feedback during processing, making it unclear whether a request is still running.
Proposed Solution
Implement proper async loading-state handling and duplicate submission prevention for transaction-related actions.
Suggested improvements:
finallyExample:
Optional enhancements:
Affected Component
Frontend Dashboard (Next.js — apps/frontend/)
Estimated Difficulty
🟢 Beginner — Small, self-contained change
Alternatives Considered
A temporary workaround is manually avoiding repeated clicks during submission, but this is unreliable and does not solve the underlying async state-management issue.
Frontend-only button disabling without proper request-state handling was also considered, but a more complete async workflow solution would provide better reliability and scalability.
Additional Context
This enhancement improves:
Similar patterns are commonly implemented in financial/productivity applications to avoid duplicate actions and improve UX during async operations.
Contribution
Checklist