-
Notifications
You must be signed in to change notification settings - Fork 425
[UI] Prevent accidental row navigation in AppTable and VariantsTable #3263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[UI] Prevent accidental row navigation in AppTable and VariantsTable #3263
Conversation
|
@VahantSharma is attempting to deploy a commit to the agenta projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR prevents accidental row navigation in AppTable and VariantsTable by applying a shared shouldIgnoreRowClick guard that checks if clicks originated from interactive elements like checkboxes, dropdowns, or buttons before triggering row-level navigation.
Key changes:
- Added row click guard to AppTable's
onRowhandler to prevent navigation when interacting with dropdown menus - Added row click guard to VariantsTable's
onRowhandler to prevent conflicts with checkboxes, dropdown menus, and tooltips - Modified both tables to accept an event parameter in their onClick handlers
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| web/oss/src/components/pages/app-management/components/AppTable.tsx | Added shouldIgnoreRowClick guard to row click handler and imported the utility function |
| web/oss/src/components/VariantsComponents/Table/index.tsx | Added shouldIgnoreRowClick guard to row click handler and imported the utility function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| import useURL from "@/oss/hooks/useURL" | ||
| import {EnhancedVariant} from "@/oss/lib/shared/variant/transformer/types" | ||
| import {shouldIgnoreRowClick} from "@/oss/lib/tableRowClick" |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path '@/oss/lib/tableRowClick' does not exist in the codebase. The shouldIgnoreRowClick function is actually exported from '@/oss/components/InfiniteVirtualTable' (as seen in InfiniteVirtualTable/index.ts). This will cause a build failure. Update the import to use the correct path.
| import {shouldIgnoreRowClick} from "@/oss/lib/tableRowClick" | |
| import {shouldIgnoreRowClick} from "@/oss/components/InfiniteVirtualTable" |
| import NoResultsFound from "@/oss/components/NoResultsFound/NoResultsFound" | ||
| import useURL from "@/oss/hooks/useURL" | ||
| import {formatDay} from "@/oss/lib/helpers/dateTimeHelper" | ||
| import {shouldIgnoreRowClick} from "@/oss/lib/tableRowClick" |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path '@/oss/lib/tableRowClick' does not exist in the codebase. The shouldIgnoreRowClick function is actually exported from '@/oss/components/InfiniteVirtualTable' (as seen in InfiniteVirtualTable/index.ts). This will cause a build failure. Update the import to use the correct path.
| import {shouldIgnoreRowClick} from "@/oss/lib/tableRowClick" | |
| import {shouldIgnoreRowClick} from "@/oss/components/InfiniteVirtualTable" |
Response to Import Path ConcernThis PR depends on PR #3262, which introduces the shared PR #3262 — Foundation
PR #3263 — This PR (Application)
The import path I’m happy to rebase this PR on top of the foundational change if that helps with testing or review. |
|
Hey @VahantSharma it would be nice to provide a video demo of the functionality post this PR |
bekossy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @VahantSharma!
This PR relies on changes from PR #3262 (new tableRowClick helper). Since that PR isn’t merged yet, this will fail. Please merge both changes into one PR
- Add shouldIgnoreRowClick guard to AppTable row click handler - Add shouldIgnoreRowClick guard to VariantsTable row click handler - Fixes issue where clicking checkboxes or dropdown menus triggers row navigation - Affects app management page and all variant table contexts (overview, deployment, evaluation) Builds on shared utility from PR Agenta-AI#1
4025be4 to
13985db
Compare
PR.3263.mp4Above is the demo video of the functionality, after changes. I’ve moved the shared tableRowClick helper and the related table updates into this PR, so it’s fully self-contained and no longer depends on #3262. |
Summary
This PR prevents accidental row navigation in AppTable and VariantsTable when users interact with
checkboxes, dropdown menus, and other interactive elements inside table rows.
It applies the shared
shouldIgnoreRowClickguard to these tables to ensure row-level navigationonly triggers when the user intentionally clicks the row body.
Context
Several tables in the UI implement row-level navigation (
onRow/onClick) alongside interactivechild elements such as checkboxes and action menus.
In AppTable and VariantsTable, this resulted in the UX issue described in #3254:
clicks near or on interactive elements could unintentionally trigger row navigation.
Both components already use
stopPropagation()defensively on individual actions; however,this PR adds a row-level guard as a final safety net, following the same pattern previously
used in InfiniteVirtualTable.
What changed
AppTable
shouldIgnoreRowClickVariantsTable
shouldIgnoreRowClick(overview page, deployment modals, evaluation configuration)
No other logic or behavior was changed.
Why this approach
stopPropagation) already present in these componentsTesting
Manually verified the following scenarios:
AppTable
VariantsTable
Related to #3254
Builds on the shared guard introduced in the previous PR.