Skip to content

feat(web): improve Work Item Runs UI with chronological sorting and direct navigation#780

Merged
aaight merged 1 commit intodevfrom
feature/work-item-runs-ui
Mar 13, 2026
Merged

feat(web): improve Work Item Runs UI with chronological sorting and direct navigation#780
aaight merged 1 commit intodevfrom
feature/work-item-runs-ui

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 13, 2026

Summary

Improved the Work Item Runs page and project Work tab with better UX and chronological ordering:

  • Chronological sort order: Oldest runs now appear at top, most recent at bottom (matching a timeline view)
  • Engine and Model columns: Added two new columns to Work Item Runs table exposing agent engine and model data
  • Simplified navigation: Removed expandable rows from Work tab; clicking a work item row now directly navigates to its runs page

Changes

Backend (runsRepository.ts)

  • Changed getRunsByWorkItem() to sort ascending by startedAt (oldest first)
  • Changed getRunsForPR() to sort ascending by startedAt (oldest first)

Frontend - Work Item Runs Table (work-item-runs-table.tsx)

  • Added engine and model fields to WorkItemRun interface
  • Added "Engine" and "Model" columns after "Agent" column
  • Engine displays as string, Model displays as string or "-" if null

Frontend - Project Work Table (project-work-table.tsx)

  • Removed ExpandedRunsRow component (113 lines)
  • Removed expand/collapse state and related hook logic
  • Updated WorkItemRow to navigate on click instead of toggling expand
  • Removed "Activity" link icon (functionality folded into row click)
  • Simplified imports (removed unused components and hooks)
  • Overall simplification from 461 to 293 lines (-38% code reduction)

Testing

  • ✅ All 4589 unit tests passing
  • ✅ TypeScript type checking passing
  • ✅ Biome linting passing

Links

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

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

Summary

LGTM — clean, well-scoped PR that improves the Work Item Runs UX with chronological sorting, new Engine/Model columns, and simplified navigation by replacing expandable rows with direct navigation.

Verified:

  • Sort order change (descasc): Both getRunsByWorkItem and getRunsForPR are only consumed by their respective tRPC routers → frontend pages. No other callers are affected. Integration tests don't assert on sort order, confirmed by passing CI.
  • Engine/Model columns: The enrichedRunSelect in runsRepository.ts already includes engine and model fields, so the data flows correctly from DB → tRPC → frontend. The WorkItemRun interface update (engine: string, model: string | null) matches the DB schema.
  • Navigation simplification: The removed ExpandedRunsRow (113 lines), expand/collapse state, and ActivityLink are fully replaced by useNavigate with correct route params for both work-item and PR types. The ~38% code reduction is a clear win with no loss of functionality — users just navigate directly instead of expanding inline.
  • All CI checks pass (lint, typecheck, 4589 tests, Docker builds, integration tests).

One minor pre-existing observation (not blocking): The clickable <tr> rows have an onKeyDown handler but no tabIndex attribute, so they aren't keyboard-focusable. This existed before this PR and is not a regression.

@aaight aaight merged commit 62c7d02 into dev Mar 13, 2026
6 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.

2 participants