Skip to content

Conversation

@Gautamkumarsolanki
Copy link

The Approach is to another url param named "subview" to get the the filter path

nextgenai-fc2 and others added 3 commits August 23, 2025 17:39
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Aug 23, 2025

Someone is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes a bug where the view dropdown in the website analytics interface would become empty when users selected filter options within metric tables. The issue stemmed from URL parameter conflicts between the main view selection (pages, referrers, browsers, etc.) and the sub-view filters within each table (url, entry, exit, title for pages; referrer, grouped for referrers).

The solution introduces a new URL parameter called "subview" to separate these concerns. Previously, both the main navigation and the filtering within individual tables used the same 'view' parameter, causing state conflicts. Now:

  • The main view dropdown continues to use the 'view' parameter for navigation between different analytics sections
  • Individual metric tables (PagesTable and ReferrersTable) now use the 'subview' parameter for their internal filtering options
  • The useNavigation hook gains a new removeParams feature that allows selective removal of URL parameters when building new URLs
  • When switching between main views, the WebsiteExpandedView component explicitly removes the 'subview' parameter to ensure clean state transitions

This architectural change maintains the dropdown's selected state while preserving all filtering functionality within each view type. The fix spans across multiple components to ensure consistent parameter management throughout the analytics interface.

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it addresses a specific UI bug with a well-targeted solution
  • Score reflects straightforward parameter renaming changes that are unlikely to cause side effects, though the cross-component coordination requires some attention
  • Pay close attention to the useNavigation hook changes and verify that all references to the old 'view' parameter in metric tables have been properly updated

4 files reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

@Gautamkumarsolanki
Copy link
Author

Hello @mikecao, Please review when you have time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant