Skip to content

feat(studio): add multi-column sort to evaluation sessions table [ASE-591] - #795

Merged
walston merged 2 commits into
mainfrom
nwalston/ase-591-fe-sort
Jul 20, 2026
Merged

feat(studio): add multi-column sort to evaluation sessions table [ASE-591]#795
walston merged 2 commits into
mainfrom
nwalston/ase-591-fe-sort

Conversation

@walston

@walston walston commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Wires the FE sort UI to the sessions endpoint added in #780.

Changes

  • ****: column id → API sort field (all 1:1 for sessions)
  • getSessionSortParam: converts TanStack Table sorting state to the comma-separated sort param; returns undefined when nothing is sorted so the API uses its default order
  • multiSort: true on useStudioDataViewState — enables shift-click for secondary sort keys
  • 7 columns enabled for sorting: test_case_id, started_at, ended_at, latency_ms, status, tokens, cost_total_usd
  • input, output, and evaluator score columns remain non-sortable (out of scope per ticket)
  • sort included in sessionParams when non-empty; dataViewState.sorting.state added to useMemo deps

Depends on

#780 (BE endpoint) must be merged before this branch is merged. This branch is cut from nwalston/ase-591-column-sorting — once #780 lands on main, rebase onto main before merging.

Closes ASE-591 (FE)

Summary by CodeRabbit

  • New Features

    • Added multi-column sorting for evaluation session tables in preview mode.
    • Enabled sorting for test case, timing, status, token, and cost columns.
  • Bug Fixes

    • Corrected latency values to display the proper formatted duration, with a fallback when unavailable.

@walston
walston requested review from a team as code owners July 20, 2026 20:12
@github-actions github-actions Bot added the feat label Jul 20, 2026
Base automatically changed from nwalston/ase-591-column-sorting to main July 20, 2026 20:18
…-591]

Enable sorting on 7 columns (test_case_id, started_at, ended_at,
latency_ms, status, tokens, cost_total_usd). Input, output, and
evaluator score columns remain non-sortable.

- SESSION_SORT_FIELD_MAP: column id → API sort field (all 1:1)
- getSessionSortParam: converts sorting state to comma-separated sort
  string; returns undefined when nothing is sorted (preserves default order)
- useStudioDataViewState: multiSort: true (shift-click for secondary keys)
- sessionParams: sort included when non-empty; sorting.state in useMemo deps

Signed-off-by: Nathan Walston <[email protected]>
@walston
walston force-pushed the nwalston/ase-591-fe-sort branch from b0c8354 to 1251324 Compare July 20, 2026 20:21
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 85366b0c-0ce8-4c33-8658-46afbcf5c9c5

📥 Commits

Reviewing files that changed from the base of the PR and between 0ec73d9 and 91f1cbd.

📒 Files selected for processing (1)
  • web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.tsx

📝 Walkthrough

Walkthrough

Evaluation session tables now send multi-column sorting to the API, enable sorting on additional fields, and correctly render latency values.

Changes

Evaluation session sorting

Layer / File(s) Summary
Server-side sort wiring
web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.tsx
Multi-column table sort state is mapped to API fields and included in session-list requests.
Sortable session columns
web/packages/studio/src/components/dataViews/EvaluationSessionsDataView/index.tsx
Sorting is enabled for session fields, and latency cells format latency_ms values or show - when unavailable.

Sequence Diagram(s)

sequenceDiagram
  participant EvaluationSessionsTable
  participant EvaluationSessionsDataView
  participant SessionListAPI
  EvaluationSessionsTable->>EvaluationSessionsDataView: Provide multi-sort state
  EvaluationSessionsDataView->>SessionListAPI: Request sessions with sort parameter
  SessionListAPI-->>EvaluationSessionsDataView: Return sorted sessions
Loading

Possibly related PRs

Suggested reviewers: briannewsom

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: multi-column sorting for the evaluation sessions table.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nwalston/ase-591-fe-sort

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

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 26385/34036 77.5% 61.8%
Integration Tests 15176/32661 46.5% 18.7%

@walston
walston enabled auto-merge July 20, 2026 20:29
@walston
walston added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 3e75fc6 Jul 20, 2026
60 checks passed
@walston
walston deleted the nwalston/ase-591-fe-sort branch July 20, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants