feat: add useTransactionFilters hook, improve sidebar a11y, and refactor multisig state#1000
Merged
emdevelopa merged 1 commit intoJun 25, 2026
Conversation
…ilterSidebar and MultisigApprovalModal emdevelopa#941 — Add useTransactionFilters hook with optimistic UI updates: draft filter state updates synchronously on every interaction while URL sync is deferred (search debounced 350 ms, other filters wrapped in a React transition with isFilterPending flag). emdevelopa#940 — Improve screen reader support in TransactionFilterSidebar: desktop panel gets role="complementary" and aria-label="Transaction filters"; SyncSpinner wrapper inside asset buttons gains aria-hidden="true" to keep button accessible names clean; Clear All button gets an aria-label reflecting the active filter count. emdevelopa#941 — Add optimistic active-filter count badge in the sidebar header that updates immediately (before URL sync) and a polite aria-live region that announces count changes to screen readers. emdevelopa#939 — Extend TransactionFilterSidebar unit tests (section 7) to cover the new landmark role, count badge, live region text, aria-hidden spinner wrapper, and Clear All label. emdevelopa#942 — Refactor MultisigProvider from 6 separate useState calls to a single useReducer with explicit action types (OPTIMISTIC_SIGN, CONFIRM_SIGN, REVERT_SIGN, SUBMIT_SUCCESS, etc.). Preserves all public hook APIs and the optimistic signing behaviour tested in multisig-optimistic.test.tsx. Closes emdevelopa#939 Closes emdevelopa#940 Closes emdevelopa#941 Closes emdevelopa#942
|
@boys-cyberhub is attempting to deploy a commit to the Emmanuel's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@boys-cyberhub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #939
Closes #940
Closes #941
Closes #942
What changed
#941 — useTransactionFilters hook with optimistic updates (
frontend/src/hooks/useTransactionFilters.ts)useReducer+paymentHistoryFiltersReducerso draft filter state updates synchronously on every interaction — no waiting for URL syncsearchSyncPendingstaystruein the meantime so callers can show a syncing indicator without blocking the inputuseTransition;isFilterPendingexposes the transition stateonClearFilter("search")andonClearAllso no stale push fires after clearinghasActiveFiltersreflects the optimistic draft state immediately#940 — Screen reader improvements (
frontend/src/components/TransactionFilterSidebar.tsx)role="complementary"andaria-label="Transaction filters"so it is a named landmark for AT usersSyncSpinnerwrapper inside active asset buttons: addedaria-hidden="true"so the spinner text ("Syncing…") is excluded from the button's computed accessible namearia-labelnow includes the active filter count, e.g. "Clear all 2 active filters"role="status"/aria-live="polite"/aria-atomic="true"region in the header that announces count changes to screen readers (e.g. "2 filters active" → "1 filter active")#941 — Optimistic active-filter count badge (
frontend/src/components/TransactionFilterSidebar.tsx)aria-hidden) in the header shows the number of active filter dimensions and updates before URL sync (driven by the optimisticfiltersprop, not the committed URL state)#939 — Extended unit tests (
frontend/src/components/TransactionFilterSidebar.test.tsx)aria-hiddenon SyncSpinner wrapper inside asset buttonsaria-labelwith count vs. generic labelrole="dialog"andaria-modalattributes#942 — MultisigProvider refactored to
useReducer(frontend/src/lib/multisig-context.tsx)useStatecalls with a singleuseReducer+multisigReducerSET_TRANSACTION,SET_STEP,SET_LOADING,SET_ERROR,CLEAR_ERROR,RESET,SET_VISIBLE,OPTIMISTIC_SIGN,CONFIRM_SIGN,REVERT_SIGN,SUBMIT_SUCCESSOPTIMISTIC_SIGNsetshasSigned: trueimmediately (before async);CONFIRM_SIGNatomically attaches the real signature and auto-advances to the"submit"step if the weight threshold is metsignTransactionandsubmitTransactionuse astateRef(always-current snapshot) to avoid stale-closure issues without needing the state in their dependency arraysuseMultisig(),useMultisigState(),useMultisigActions(); all existing tests inmultisig-optimistic.test.tsxcontinue to passHow to test