Skip to content

Fix no data bug / Replace hardcoded requester filter with dropdown - #545

Open
ikenwan-dev wants to merge 4 commits into
GoogleCloudPlatform:mainfrom
ikenwan-dev:fix-trends-filter
Open

Fix no data bug / Replace hardcoded requester filter with dropdown#545
ikenwan-dev wants to merge 4 commits into
GoogleCloudPlatform:mainfrom
ikenwan-dev:fix-trends-filter

Conversation

@ikenwan-dev

Copy link
Copy Markdown

Why I am making this change:
Currently, the Charts (trends) page has a hardcoded filter (df['requester'] == 'cloud-db-nl2sql-testing-jobs'), preventing users from viewing trends for evaluations triggered by other requesters.

Additionally, there is a "Catch-22" UI bug on this page. If the default Agent tab (Gemini) has no data, the if df.empty: return check triggers before any of the UI controls are rendered. This results in a completely blank page, hiding the Agent toggle buttons and trapping the user so they cannot switch to an Agent (like Claude) that actually does have data.
What changes are being made:

  1. Dynamic Requester Filter:
    • Removed the hardcoded requester string.
    • Extracted all unique requesters from the un-filtered dataset and populated a new "Filter by Requester" Mesop dropdown component on the Charts tab.
    • Added trends_requester_filter to the global State class in main.py to track the user's selection.
  2. UI Rendering Rearrangement (Bug Fix):
    • Refactored trends_component() in trends.py to unconditionally render the UI control elements (Agent Tabs, Requester Dropdown, Product Dropdown) at the top of the page.
    • Moved the if df.empty: check down so it only guards the chart rendering. Now, if a filter results in zero data, a polite "No data found" warning is displayed below the buttons, allowing the user to seamlessly click a different Agent or Requester to restore data.

Screenshots attached of new chart tab
Screenshot 2026-08-04 at 11 37 15 AM
Screenshot 2026-08-04 at 11 37 30 AM

…charts tab. Also added Requester Drop Down filter
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.

2 participants