agenta icon indicating copy to clipboard operation
agenta copied to clipboard

fix(frontend): unify shouldIgnoreRowClick to shared utility in useTableManager

Open Quantum0uasar opened this issue 6 months ago • 5 comments

Summary

Closes #3254

This PR removes the duplicate shouldIgnoreRowClick helper from EvaluationRunsTablePOC/actions/navigationActions.ts and updates the import in EvaluationRunsTable/index.tsx to use the canonical shared utility already defined in InfiniteVirtualTable/hooks/useTableManager.tsx.

Changes

  • EvaluationRunsTable/index.tsx: Updated import of shouldIgnoreRowClick from ../../actions/navigationActions → ../../../../InfiniteVirtualTable/hooks/useTableManager
  • navigationActions.ts: Removed the duplicate shouldIgnoreRowClick function (lines 26–32) and the now-unused import type {MouseEvent} from "react" on line 1

Why

shouldIgnoreRowClick was defined in two places with slightly different implementations. The canonical version in useTableManager.tsx is more thorough (handles Ant Design-specific selectors like .ant-dropdown-trigger, .ant-checkbox-wrapper, .ant-select). All tables should use the one shared utility to stay consistent.

Testing

  • Verified the import path resolves correctly relative to the file location
  • No logic was changed — only the import source was updated
  • The canonical implementation in useTableManager.tsx is unchanged

Quantum0uasar avatar May 20 '26 21:05 Quantum0uasar

@Quantum0uasar is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 20 '26 21:05 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 20 '26 21:05 CLAassistant

Review Change Stack

[!IMPORTANT]

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e17bb26b-e6e4-4c9b-8532-9176a157a782

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • [ ] 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR consolidates the shouldIgnoreRowClick row click handler utility by moving it from a local navigationActions module to a shared utility location in InfiniteVirtualTable/hooks/useTableManager. The import in EvaluationRunsTable is updated to reference the new location, removing the local dependency on navigationActions.

Changes

Row click handler consolidation

Layer / File(s) Summary
Consolidate row click handler to shared utility
web/oss/src/components/EvaluationRunsTablePOC/actions/navigationActions.ts, web/oss/src/components/EvaluationRunsTablePOC/components/EvaluationRunsTable/index.tsx
The shouldIgnoreRowClick function and its MouseEvent import are removed from navigationActions.ts, and the table component is updated to import the function from the centralized InfiniteVirtualTable/hooks/useTableManager module instead.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: moving a duplicate shouldIgnoreRowClick helper to use a shared utility.
Description check ✅ Passed The description is well-detailed, explains the rationale for consolidation, and references the linked issue #3254.
Linked Issues check ✅ Passed The PR successfully addresses issue #3254 by consolidating duplicate click-handling logic onto the shared utility, ensuring consistent behavior across tables.
Out of Scope Changes check ✅ Passed All changes are directly related to consolidating the shouldIgnoreRowClick helper; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar May 20 '26 21:05 coderabbitai[bot]

Hey maintainers 👋 — the CI failures on this PR are not caused by any code issues.

All 6 build jobs are failing with:

denied: installation not allowed to Write organization package

This is because the PR comes from a fork (Quantum0uasar/agenta), and GitHub restricts the GITHUB_TOKEN for fork PRs to read-only access — so the workflow cannot push Docker images to ghcr.io/agenta-ai/.

The actual code change in this PR (removing the duplicate shouldIgnoreRowClick helper and importing from the shared utility in useTableManager) is clean and correct.

Could a maintainer please re-run the failed jobs from your side (with an org-scoped token), or approve the workflow run under Settings > Actions > Fork pull request workflows? That should unblock the merge. Thanks!

Quantum0uasar avatar May 25 '26 20:05 Quantum0uasar

Thanks so much @ardaerzin for the review and approval! Really appreciate the feedback on the import path — glad we got it sorted. 🙏

Quantum0uasar avatar May 26 '26 16:05 Quantum0uasar

Hi @Quantum0uasar, thanks for opening a pull request. 🙏

This PR was automatically closed because it does not yet meet our contribution requirements:

  • The description is missing required sections (Demo, Checklist). Please use the PR template without removing its sections.
  • This PR changes functional code (SDK, API, or frontend) but the Demo section has no screenshot or video. A short demo recording is required. Only test-only, docs-only, or chore changes may mark Demo as N/A.

We ask for this so every change is documented and demonstrably tested before review.

How to get it reopened Update the PR description (and add a demo recording if your change touches functional code). The bot reopens the PR automatically once the requirements are met. No need to open a new one.

See the Contributing guide and Creating your first PR. If you think this was closed in error, leave a comment and a maintainer will take a look.

github-actions[bot] avatar Jun 08 '26 11:06 github-actions[bot]