Skip to content

Evals UI: maintaining page name change consistency#55

Merged
nishika26 merged 1 commit intomainfrom
enhancement/names_consistency
Mar 9, 2026
Merged

Evals UI: maintaining page name change consistency#55
nishika26 merged 1 commit intomainfrom
enhancement/names_consistency

Conversation

@nishika26
Copy link
Copy Markdown
Contributor

@nishika26 nishika26 commented Mar 5, 2026

Target issue is #57

Notes

This PR addresses terminology inconsistencies in the text evaluation UI that were missed during the initial renaming from "upload" → "datasets" and "results" → "evaluations".

These changes ensure consistent naming across the entire text evaluation feature.

Changes made -

  • Renamed tabs from "Upload" and "Results" to "Datasets" and "Evaluations" throughout the evaluations interface.
  • Updated navigation targets, button labels, and guidance text to align with the new tab naming.
  • Modified default tab initialization to "Datasets".

Context

These updates were deprioritized during the demo rush but are important for maintaining a consistent user experience.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 5, 2026

📝 Walkthrough

Walkthrough

This PR renames UI tab identifiers from "upload"/"results" to "datasets"/"evaluations" across the evaluations pages, updating navigation targets, component names, interface definitions, and user-facing labels accordingly.

Changes

Cohort / File(s) Summary
Navigation and Labels
app/evaluations/[id]/page.tsx
Updated router.push targets from ?tab=results to ?tab=evaluations and changed button label from "Back to Results" to "Back to Evaluations".
Tab Refactoring
app/evaluations/page.tsx
Renamed tab identifiers from 'upload'/'results' to 'datasets'/'evaluations', refactored component names (UploadTab→DatasetsTab, ResultsTab→EvaluationsTab), updated corresponding interface definitions, adjusted active-tab logic, and updated UI labels and navigation flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • UI: STT Evals #44: Directly modifies the evaluations page UI and tab identifiers with the same naming refactoring pattern (upload→datasets, results→evaluations).

Suggested labels

enhancement

Suggested reviewers

  • Prajna1999
  • vprashrex

Poem

🐰 Hops of joy for tabs renamed so clear,
From upload and results to datasets here!
Evaluations now shine in rightful place,
A fresher face for the page's embrace! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: renaming UI terminology from 'upload'/'results' to 'datasets'/'evaluations' for consistency across evaluation pages.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enhancement/names_consistency

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

@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.

Actionable comments posted: 1

🧹 Nitpick comments (2)
app/evaluations/page.tsx (2)

34-38: Consider preserving legacy tab query aliases for deep-link compatibility.

?tab=upload / ?tab=results links now fall back to datasets. Mapping legacy values prevents broken bookmarks and older shared links.

Suggested patch
 const [activeTab, setActiveTab] = useState<Tab>(() => {
   const tabParam = searchParams.get('tab');
-  return (tabParam === 'evaluations' || tabParam === 'datasets') ? tabParam as Tab : 'datasets';
+  const normalizedTab =
+    tabParam === 'upload' ? 'datasets'
+    : tabParam === 'results' ? 'evaluations'
+    : tabParam;
+  return (normalizedTab === 'evaluations' || normalizedTab === 'datasets')
+    ? normalizedTab
+    : 'datasets';
 });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/evaluations/page.tsx` around lines 34 - 38, activeTab initialization
currently only accepts 'evaluations' or 'datasets' and treats any other value as
'datasets', which breaks legacy links; update the initializer for activeTab (the
useState block referencing searchParams.get('tab')) to map legacy aliases: treat
'upload' as 'datasets' and 'results' as 'evaluations' (e.g., normalize tabParam
via a small map or switch before the existing ternary), then cast/return the
normalized value so setActiveTab and subsequent logic continue to work with
'datasets'/'evaluations'.

269-272: Sync URL when switching to the Evaluations tab after job creation.

Line 271 updates only component state; URL can stay stale (?tab=datasets or no tab), which hurts refresh/share/back behavior.

Suggested patch
-      setActiveTab('evaluations');
+      setActiveTab('evaluations');
+      router.replace('/evaluations?tab=evaluations');
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/evaluations/page.tsx` around lines 269 - 272, After creating the job you
only update component state with setIsEvaluating(false) and
setActiveTab('evaluations') but don't update the URL, leaving the query stale;
update the URL query to include tab=evaluations so refresh/share/back reflect
the new tab. Use the router from Next (e.g., useRouter from next/navigation) or
the project's route helper and call router.replace or router.push to set the
current query param to tab=evaluations (preserving other query params)
immediately after calling setActiveTab('evaluations'); ensure you preserve
existing params and prefer replace if you don't want an extra history entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/evaluations/page.tsx`:
- Around line 483-485: Update the remaining UI copy that still uses “results” to
the new terminology “evaluations”: change the list item string "View detailed
results and metrics in the Evaluations tab" and the label "View Results" to use
"evaluations" (e.g., "View detailed evaluations and metrics in the Evaluations
tab" and "View Evaluations") so the rename is consistent across the page.tsx UI.
Locate these exact text literals in app/evaluations/page.tsx and update them
accordingly.

---

Nitpick comments:
In `@app/evaluations/page.tsx`:
- Around line 34-38: activeTab initialization currently only accepts
'evaluations' or 'datasets' and treats any other value as 'datasets', which
breaks legacy links; update the initializer for activeTab (the useState block
referencing searchParams.get('tab')) to map legacy aliases: treat 'upload' as
'datasets' and 'results' as 'evaluations' (e.g., normalize tabParam via a small
map or switch before the existing ternary), then cast/return the normalized
value so setActiveTab and subsequent logic continue to work with
'datasets'/'evaluations'.
- Around line 269-272: After creating the job you only update component state
with setIsEvaluating(false) and setActiveTab('evaluations') but don't update the
URL, leaving the query stale; update the URL query to include tab=evaluations so
refresh/share/back reflect the new tab. Use the router from Next (e.g.,
useRouter from next/navigation) or the project's route helper and call
router.replace or router.push to set the current query param to tab=evaluations
(preserving other query params) immediately after calling
setActiveTab('evaluations'); ensure you preserve existing params and prefer
replace if you don't want an extra history entry.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d6e10264-a0ce-4b06-a10b-d3cf05e731ef

📥 Commits

Reviewing files that changed from the base of the PR and between e6b0b20 and a9472dd.

📒 Files selected for processing (2)
  • app/evaluations/[id]/page.tsx
  • app/evaluations/page.tsx

Comment on lines +483 to 485
<li>Wait for processing to complete (automatic redirect to evaluations tab)</li>
<li>View detailed results and metrics in the Evaluations tab</li>
</ol>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Terminology consistency is still partial (results remains in UI copy).

Line 484 still says “View detailed results…”, and there is another remaining label at Line 1195 (“View Results”). If this PR’s goal is full rename consistency, these should be updated too.

Suggested patch
-                  <li>View detailed results and metrics in the Evaluations tab</li>
+                  <li>View detailed evaluations and metrics in the Evaluations tab</li>
-              View Results
+              View Evaluation
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<li>Wait for processing to complete (automatic redirect to evaluations tab)</li>
<li>View detailed results and metrics in the Evaluations tab</li>
</ol>
<li>Wait for processing to complete (automatic redirect to evaluations tab)</li>
<li>View detailed evaluations and metrics in the Evaluations tab</li>
</ol>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/evaluations/page.tsx` around lines 483 - 485, Update the remaining UI
copy that still uses “results” to the new terminology “evaluations”: change the
list item string "View detailed results and metrics in the Evaluations tab" and
the label "View Results" to use "evaluations" (e.g., "View detailed evaluations
and metrics in the Evaluations tab" and "View Evaluations") so the rename is
consistent across the page.tsx UI. Locate these exact text literals in
app/evaluations/page.tsx and update them accordingly.

@Prajna1999 Prajna1999 changed the title evals UI: maintaining page name change consistency Evals UI: maintaining page name change consistency Mar 6, 2026
@Prajna1999 Prajna1999 moved this to In Progress in Kaapi-dev Mar 6, 2026
@nishika26 nishika26 self-assigned this Mar 8, 2026
@nishika26 nishika26 removed this from Kaapi-dev Mar 8, 2026
@nishika26 nishika26 merged commit aace56e into main Mar 9, 2026
1 check passed
This was referenced Mar 9, 2026
@Ayush8923 Ayush8923 deleted the enhancement/names_consistency branch March 20, 2026 11:36
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.

3 participants