Skip to content

[4535] fix(frontend): fix evaluator playground navigation from trace drawer#4560

Open
axelray-dev wants to merge 2 commits into
Agenta-AI:mainfrom
axelray-dev:fix-4535-evaluator-button-navigation
Open

[4535] fix(frontend): fix evaluator playground navigation from trace drawer#4560
axelray-dev wants to merge 2 commits into
Agenta-AI:mainfrom
axelray-dev:fix-4535-evaluator-button-navigation

Conversation

@axelray-dev
Copy link
Copy Markdown
Contributor

@axelray-dev axelray-dev commented Jun 5, 2026

Fixes #4535.

Summary

The trace drawer evaluator popover was using programmatic navigation (router.push) to open the evaluator playground, but closing the trace drawer first could prevent the navigation from completing. This switches the evaluator action button to a native link (href) so that clicking always navigates to the correct destination.

  • Automatic evaluator action resolves to the latest revision and opens the evaluator playground via native link.
  • Human evaluator action still opens the evaluator registry as before.
  • The button text reflects the destination type.

Testing

Verified locally

  • Ran a local OSS Agenta stack with seeded trace and evaluator data.
  • Verified the popover displays "Open evaluator playground" for automatic evaluators.
  • Confirmed the href resolves to the correct playground URL using the revision ID (not workflow ID).
  • Confirmed clicking navigates successfully to the evaluator playground.
  • Verified human evaluator action still opens the registry route.

Added or updated tests

No new tests. This is a behavioral fix in the click handler (native link vs programmatic push). Existing component behavior is unchanged for the user-visible output.

QA follow-up

  • Test with evaluators that have no latest revision (the button should not render).
  • Confirm the popover closes naturally after clicking the link.

Demo

page@fa2d68cb812c018eab28fa6b3a11e959.webm

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Signed-off-by: axelray-dev <110029405+axelray-dev@users.noreply.github.com>
…535]

Replace programmatic router.push with native href on the evaluator
button so that clicking always navigates even if the trace drawer
close handler does not complete. Removes the unused navigateToEvaluator
call and preventDefault, keeping only stopPropagation to avoid
triggering the parent popover's hover behavior.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

@axelray-dev is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Too much diff to scan? Review this PR in Change Stack to start with the highest-impact changes.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c734c679-adc3-4bfd-809b-e0720d682440

📥 Commits

Reviewing files that changed from the base of the PR and between 98b8a9d and 730b949.

📒 Files selected for processing (1)
  • web/oss/src/components/SharedDrawers/TraceDrawer/components/EvaluatorDetailsPopover.tsx

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved evaluator navigation behavior to correctly resolve and display the latest revision of evaluators in trace details.

Walkthrough

EvaluatorDetailsPopover.tsx fixes the "Open evaluator registry" button by reading the latest workflow revision id from atom state and using it to compute the correct navigation target. The component now links to the latest-revision evaluator for registry buttons while preserving human evaluators unchanged.

Changes

Evaluator Navigation Fix

Layer / File(s) Summary
Fix evaluator navigation with latest revision
web/oss/src/components/SharedDrawers/TraceDrawer/components/EvaluatorDetailsPopover.tsx
Imports atom utilities (workflowLatestRevisionIdAtomFamily, useAtomValue), reads the latest revision id, derives an evaluatorWithLatestRevision via memoization, updates the navigation target to use the latest-revision evaluator for non-human evaluators while keeping original evaluators for human ones, and adjusts the action button click handler to use href-based navigation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly references fixing evaluator playground navigation from the trace drawer, which matches the primary change in the PR.
Description check ✅ Passed The description is directly related to the changeset, explaining the fix for the evaluator button navigation issue and detailing testing performed.
Linked Issues check ✅ Passed The PR successfully addresses issue #4535 by converting programmatic navigation to native link (href) for the evaluator playground button, fixing incorrect navigation behavior.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the evaluator navigation issue in the trace drawer popover, with no extraneous modifications detected.
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.

@axelray-dev axelray-dev marked this pull request as ready for review June 5, 2026 21:27
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. Frontend labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open evaluator registry button links incorrectly

1 participant