Skip to content

feat: add history filter - #610

Open
ECWireless wants to merge 9 commits into
mainfrom
feat/add-history-filter
Open

ECWireless wants to merge 9 commits into
mainfrom
feat/add-history-filter

Conversation

@ECWireless

Copy link
Copy Markdown
Collaborator

See #513 for all details. Original PR created by @Roaring30s .

Screenshot 2026-03-30 at 10 07 34 AM Screenshot 2026-03-30 at 10 07 40 AM

Roaring30s and others added 4 commits March 30, 2026 07:47
* feat: add history filter to user account

* fix: apply linter and prettier

* fix: add margin on popover from window

* fix: add UI changes to filter

* fix: remove auto scroll

* fix: remove lint error

---------

Co-authored-by: ECWireless <40322776+ECWireless@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 30, 2026 16:08
@vercel

vercel Bot commented Mar 30, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
explorer-arbitrum-one Ready Ready Preview Oct 6, 2026 9:36pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an event-type filter UI to the Account History view so users can narrow the displayed history entries by transaction/event type.

Changes:

  • Introduces a useHistoryFilter hook to manage selected event types, filtered results, and popover open/close behavior.
  • Adds a HistoryFilter popover component (with a new filter icon) and wires it into components/HistoryView.
  • Updates history rendering to use the filtered event list and show an empty-state message when no events match.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
hooks/index.tsx Re-exports the new history filter hook from the hooks barrel.
hooks/filter/useHistoryFilter.ts Implements filter state + memoized filtering + auto-close behavior on outside scroll.
components/Icons/FilterIcon.tsx Adds a small SVG filter icon used by the filter button.
components/HistoryView/index.tsx Integrates the filter hook/component and switches rendering from mergedEvents to filteredEvents.
components/HistoryView/HistoryFilter.tsx Implements the filter popover UI (trigger, header actions, event-type list).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/HistoryView/index.tsx Outdated
Comment thread components/HistoryView/HistoryFilter.tsx
Comment thread hooks/filter/useHistoryFilter.ts
Copilot AI balanced review requested due to automatic review settings October 6, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Filtered history can render blank or remain indefinitely loading in verified failure cases.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)

Comment thread components/HistoryView/index.tsx
Comment thread components/HistoryView/index.tsx Outdated
Copilot AI balanced review requested due to automatic review settings October 6, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The filtering behavior is coherently integrated and covered across key pagination, hydration, and failure scenarios.

Review effort: Balanced
Findings: None

Resolved since last review (2)

rickstaa
rickstaa previously approved these changes Oct 6, 2026

@rickstaa rickstaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ECWireless looks clean to me. I only have two comments:

  • Please also add the author of #720 as a co-author. Due to some unclear communication, we accidentally had two people working on this in parallel.
  • Could you add support for selecting the filters via query parameters? This would make it easier to link directly to specific votes from places in the Explorer that reference the vote history. If you can link these places to the right url that would also be great.

Once those are addressed, we can merge.

Image

Restore event filters from query parameters and update the URL with shallow
navigation when filters change. Link governance participation and voting
modals to the matching account history filters, and select account tabs
from the pathname so query strings do not hide the History view.

Co-authored-by: Moudi Network <lpt@moudi.network>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:16
@ECWireless

Copy link
Copy Markdown
Collaborator Author

looks clean to me. I only have two comments...

@rickstaa both have been addressed in b8daae3

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Rapid filter toggles can race asynchronous router updates and silently discard selections.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Comment thread hooks/filter/useHistoryFilter.ts
Apply selections optimistically so rapid toggles and Clear use the latest
selection before a shallow route change finishes. Only the latest
navigation can release that selection back to the URL, preserving browser
navigation and restoring the URL state after a failed or cancelled push.

Add delayed-navigation regression tests and await navigation in the
HistoryView integration tests.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The filtering behavior, URL synchronization, loading states, and edge cases are implemented consistently and covered by focused tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@rickstaa rickstaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, for applying my suggestions.

This branch was successfully deployed

1 active deployment
Preview — a811f01a Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Triage

Development

Successfully merging this pull request may close these issues.

4 participants