Skip to content

Evaluator Listing UI and Interaction Improvements#602

Merged
nadheesh merged 3 commits intowso2:mainfrom
rasika2012:fix-minor-bugs
Mar 20, 2026
Merged

Evaluator Listing UI and Interaction Improvements#602
nadheesh merged 3 commits intowso2:mainfrom
rasika2012:fix-minor-bugs

Conversation

@rasika2012
Copy link
Copy Markdown
Contributor

@rasika2012 rasika2012 commented Mar 20, 2026

Purpose

image

Fixes: #483

This pull request introduces several UI and code quality improvements to the evaluator and monitor management pages. The main focus is on refactoring the evaluator listing and card UI, improving accessibility with ARIA labels, and clarifying the handling of secrets in monitor editing. There are also some minor stylistic and usability adjustments to buttons and navigation.

Evaluator Listing and Card UI Refactor:

  • Refactored the evaluator listing in EvalEvaluatorsComponent to use new Form.CardButton, Form.CardHeader, and related components for a more consistent and accessible card UI, including improved handling of description truncation, tags, and card actions. The edit and delete buttons now use event handlers that prevent event bubbling, and the card's structure is simplified for readability and maintainability. [1] [2] [3] [4]
  • Updated imports and usage of components such as Form, Form.Stack, and removed unused ones for better code organization.

Accessibility and Usability Improvements:

  • Added ARIA labels to various IconButton components in monitor-related tables and lists to improve accessibility for screen readers. [1] [2] [3] [4]

Evaluator Creation and Editing Flows:

  • Updated the evaluator creation and form navigation: the "Back to Evaluators" button is now consistently passed as a prop and replaced with a disabled "Previous" button or outlined variant in certain steps for clearer navigation and visual consistency. [1] [2] [3]
  • Changed the edit button in ViewEvaluatorComponent to use the Edit icon and updated button text for clarity. [1] [2]

Monitor Editing and Filtering Logic:

  • Improved the logic for handling secrets in monitor editing: when editing, empty or masked values ("****") are now correctly interpreted as "preserve existing secret," ensuring the backend receives the right intent.
  • Updated the monitor table filter to include monitor.displayName in the search haystack, making search results more comprehensive.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter �N/A� plus brief explanation of why there�s no doc impact

Training

Fixes: #483

Certification

This pull request updates the Evaluators UI in several ways to improve consistency, usability, and code structure. The main changes include a redesign of the evaluator listing cards, updates to navigation and button behaviors, and improvements to the edit and form actions. These changes enhance the user experience when creating, viewing, and managing evaluators.

Evaluator Listing UI and Interaction Improvements:

  • Refactored the evaluator cards in EvalEvaluators.Component.tsx to use new Form.CardButton, Form.CardHeader, and related components for a more consistent and accessible UI. Added truncated descriptions with tooltips, improved tag display, and moved edit/delete actions into card actions with better event handling. [1] [2] [3] [4]
  • Changed the pagination logic to only show the paginator when there are more than 6 items, instead of using rowsPerPage.

Navigation and Back Button Updates:

  • Updated the CreateEvaluatorComponent to provide a "Back to Evaluators" label and link in the page layout, improving navigation clarity.
  • In the EvaluatorForm, replaced the "Back to Evaluators" link button with a disabled "Previous" button for step navigation, and updated the variant of the page navigation button for consistency. [1] [2]

Edit and Delete Button Consistency:

  • Standardized the use of the "Edit" icon (Edit instead of Pencil) and updated the edit button label to "Edit Evaluator" in the evaluator view. Changed the cancel edit button to use the outlined variant for visual clarity. [1] [2]

Code Cleanup and Imports:

  • Cleaned up imports in EvalEvaluators.Component.tsx, grouping and formatting them for readability, and removed unused imports.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

  • Bug Fixes

    • Preserve masked secret entries on save by sending them as empty values instead of omitting them.
  • Accessibility

    • Added descriptive screen-reader labels to toolbar and per-row action buttons.
  • UI Improvements

    • Moved back-navigation to page header and standardized button styles (outlined/disabled where appropriate).
    • Updated action icons/labels and evaluator card layout with truncated-description tooltips.
    • Pagination now appears for shorter lists; monitor search includes display names.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cab7e608-7990-4bb7-896f-f2dee53f6f1d

📥 Commits

Reviewing files that changed from the base of the PR and between 5e78b95 and 2f6f615.

📒 Files selected for processing (2)
  • console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx
  • console/workspaces/pages/eval/src/subComponents/EvaluatorForm.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • console/workspaces/pages/eval/src/subComponents/EvaluatorForm.tsx
  • console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx

📝 Walkthrough

Walkthrough

This PR adjusts evaluator page navigation and card rendering, fixes monitor LLM provider config sanitization, adds aria-labels to icon buttons, and expands monitor search to include displayName.

Changes

Cohort / File(s) Summary
Create / Edit / View Forms
console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx, console/workspaces/pages/eval/src/subComponents/EvaluatorForm.tsx, console/workspaces/pages/eval/src/ViewEvaluator.Component.tsx
Moved back-navigation props to PageLayout in create page; removed backHref prop from EvaluatorForm and replaced text link with a disabled outlined "Previous" button; changed some button variants and updated view edit button icon/label.
Evaluator List & Card Rendering
console/workspaces/pages/eval/src/EvalEvaluators.Component.tsx
Refactored evaluator cards to use react-router-dom Link wrapping Form.CardButton; added handleEditClick/handleDeleteClick that preventDefault/stopPropagation and use navigate/delete handlers; improved description truncation with tooltip and simplified tag rendering; pagination threshold adjusted to show when >6 items.
Monitor LLM Config Sanitization
console/workspaces/pages/eval/src/EditMonitor.Component.tsx
Changed update payload handling for llmProviderConfigs: stop filtering out masked configs and instead map preserved-secret cases (undefined, "", or "****") to objects with value: "", keeping entries in the payload.
Accessibility & Search
console/workspaces/pages/eval/src/subComponents/MonitorRunList.tsx, console/workspaces/pages/eval/src/subComponents/MonitorTable.tsx
Added aria-label attributes to icon-only buttons (refresh, re-run, edit, delete). Expanded MonitorTable search haystack to include monitor.displayName and incorporated displayName into edit/delete aria-label templates.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Backs now point the right way, cards hop straight to view,
Secrets kept but blanked for safety, nothing dropped from you,
Buttons now speak clearly for readers who listen near,
Search can find the names you show — the meadow’s bright and clear!

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (2 warnings, 2 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete: it includes Purpose (with screenshot and issue reference) but lacks Goals, Approach, User Stories, Release Note, Documentation, Training, Certification details, and other required sections from the template. Complete all required sections of the PR description template: Goals, Approach, User Stories, Release Note, Documentation, Training, Certification, Marketing, test coverage, Security checks, Samples, Related PRs, Migrations, Test environment, and Learning sections.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive The PR addresses all major coding requirements from issue #483: improved secret handling in EditMonitor, added aria-labels for accessibility, included displayName in search filter, and refactored evaluator UI; however, the editMonitor path property and intervalMinutes string-to-number conversion are not evident in the provided file summaries. Verify that the editMonitor routing entry includes the missing path property and that intervalMinutes conversion from string to number in CreateMonitorForm is implemented, as these specific changes are not documented in the raw_summary.
Out of Scope Changes check ❓ Inconclusive Most changes are scoped to evaluator/monitor UI improvements and accessibility per issue #483; however, the refactoring of EvalEvaluators card structure and the removal of backHref from EvaluatorForm represent broader structural changes beyond simple bug fixes. Clarify whether the extensive evaluator card UI refactoring (moving to Form.CardButton/CardHeader/CardActions) was explicitly required by issue #483 or represents additional scope creep.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Evaluator Listing UI and Interaction Improvements' accurately summarizes the main refactoring of the evaluator card UI and navigation flows across multiple files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
console/workspaces/pages/eval/src/EvalEvaluators.Component.tsx (2)

459-459: Use rowsPerPage for paginator visibility instead of a fixed threshold.

Tying this condition to 6 can show pagination when only one page exists under the current page size. Consider basing it on totalItems > rowsPerPage to stay consistent with user-selected page size.

Suggested change
-          {totalItems > 6 && (
+          {totalItems > rowsPerPage && (
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@console/workspaces/pages/eval/src/EvalEvaluators.Component.tsx` at line 459,
The paginator visibility currently uses a hardcoded threshold (totalItems > 6);
change the condition to use the user-selected page size by replacing that check
with totalItems > rowsPerPage so the paginator (where totalItems is evaluated)
only appears when there are more items than the current rowsPerPage value;
update the JSX conditional that renders the paginator in
EvalEvaluators.Component (look for the expression using totalItems > 6) to
totalItems > rowsPerPage.

271-327: Replace hardcoded card/layout dimensions with theme tokens or shared constants.

The newly added fixed values (260px, 300px, 224) make this layout harder to keep consistent with theme-driven spacing and sizing.

As per coding guidelines: "Use theme tokens via the sx prop instead of hardcoded colors and spacing values".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@console/workspaces/pages/eval/src/EvalEvaluators.Component.tsx` around lines
271 - 327, Replace the hardcoded sizing in the evaluators list with theme
tokens/constants: update the gridTemplateColumns minmax values (currently
"minmax(260px, 1fr)" and "minmax(300px, 1fr)") and the Form.CardButton fixed
height (currently 224) to use theme spacing/size tokens or shared constants;
locate the evaluators.map render block and change the sx props on the
surrounding container (gridTemplateColumns) and on Form.CardButton (height,
width if needed) to reference theme.breakpoints, theme.spacing/theme.shape
values or exported constants so sizing follows the app theme instead of literal
px values.
console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx (1)

84-84: Remove the now-dead backHref prop pass-through to EvaluatorForm.

Line 84 still passes backHref, but the form no longer uses it. Dropping this from the form API will reduce prop surface and avoid stale wiring.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx` at line 84,
Remove the now-unused backHref prop passed into EvaluatorForm from
CreateEvaluator.Component.tsx: delete the backHref attribute in the JSX where
EvaluatorForm is rendered (the pass-through named backHref) and, if present in
this file, stop reading backHref from the parent component props; also update
any local references or prop-type/interface usage in this file related to
backHref so the EvaluatorForm invocation matches its current API (reference:
EvaluatorForm and the backHref prop name).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx`:
- Line 84: Remove the now-unused backHref prop passed into EvaluatorForm from
CreateEvaluator.Component.tsx: delete the backHref attribute in the JSX where
EvaluatorForm is rendered (the pass-through named backHref) and, if present in
this file, stop reading backHref from the parent component props; also update
any local references or prop-type/interface usage in this file related to
backHref so the EvaluatorForm invocation matches its current API (reference:
EvaluatorForm and the backHref prop name).

In `@console/workspaces/pages/eval/src/EvalEvaluators.Component.tsx`:
- Line 459: The paginator visibility currently uses a hardcoded threshold
(totalItems > 6); change the condition to use the user-selected page size by
replacing that check with totalItems > rowsPerPage so the paginator (where
totalItems is evaluated) only appears when there are more items than the current
rowsPerPage value; update the JSX conditional that renders the paginator in
EvalEvaluators.Component (look for the expression using totalItems > 6) to
totalItems > rowsPerPage.
- Around line 271-327: Replace the hardcoded sizing in the evaluators list with
theme tokens/constants: update the gridTemplateColumns minmax values (currently
"minmax(260px, 1fr)" and "minmax(300px, 1fr)") and the Form.CardButton fixed
height (currently 224) to use theme spacing/size tokens or shared constants;
locate the evaluators.map render block and change the sx props on the
surrounding container (gridTemplateColumns) and on Form.CardButton (height,
width if needed) to reference theme.breakpoints, theme.spacing/theme.shape
values or exported constants so sizing follows the app theme instead of literal
px values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8108e8cd-7175-4edf-9491-c520106260c7

📥 Commits

Reviewing files that changed from the base of the PR and between 3f6e25c and 5e78b95.

📒 Files selected for processing (7)
  • console/workspaces/pages/eval/src/CreateEvaluator.Component.tsx
  • console/workspaces/pages/eval/src/EditMonitor.Component.tsx
  • console/workspaces/pages/eval/src/EvalEvaluators.Component.tsx
  • console/workspaces/pages/eval/src/ViewEvaluator.Component.tsx
  • console/workspaces/pages/eval/src/subComponents/EvaluatorForm.tsx
  • console/workspaces/pages/eval/src/subComponents/MonitorRunList.tsx
  • console/workspaces/pages/eval/src/subComponents/MonitorTable.tsx

@nadheesh nadheesh merged commit 503f007 into wso2:main Mar 20, 2026
5 checks passed
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.

Fix UI issues triggered during PR check

2 participants