Code Review Bench PR #19951 - feat(ui-v2): improve task run details page parity with Vue#12
Conversation
- Add copy button to Task Inputs tab using JsonInput copy prop - Add usePageTitle hook to set browser tab title based on task run name - Add useFavicon hook to change favicon based on task run state - Add state-specific SVG icons for favicon (cancelled, completed, crashed, failed, pending, running, scheduled) - Fix breadcrumb to link to /runs?tab=task-runs instead of just /runs - Show all detail fields consistently with 'None' when empty instead of hiding them - Add Cache Key, Cache Expiration, Retry Delay, and Retry Jitter Factor fields to always display Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
🔍 CI failure analysis for 73405db: Biome linter detected a non-null assertion operator in an unrelated test file that was not modified by this PR.IssueThe Biome linter detected a forbidden non-null assertion operator ( Root CauseIn await user.click(footerCloseButton!);The Biome linter rule DetailsImportant: This failing file is completely unrelated to the changes in this PR. The current PR modifies:
The failing test file Affected Location: Linter Output: Linter Rule: The non-null assertion operator ( Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
| ? document.getElementById("favicon-32-dark") | ||
| : document.getElementById("favicon-32"); | ||
|
|
||
| if (stateType) { |
There was a problem hiding this comment.
⚠️ Bug: Missing SVG favicons for CANCELLING and PAUSED states
The StateType union in use-state-favicon.ts includes "CANCELLING" and "PAUSED", but no corresponding SVG files (cancelling.svg, paused.svg) were added to ui-v2/public/. When a task run is in either of these states, the hook will set the favicon href to /cancelling.svg or /paused.svg, resulting in a broken favicon (404).
Either add the missing SVG files, or map these states to existing icons (e.g., CANCELLING → cancelled.svg, PAUSED → pending.svg).
Was this helpful? React with 👍 / 👎
- Apply suggested fix
| <dl className="flex flex-col gap-1 mb-2"> | ||
| <dt className="text-gray-500">Retry Jitter Factor</dt> | ||
| <dd className=""> | ||
| {taskRun.empirical_policy?.retry_jitter_factor |
There was a problem hiding this comment.
⚠️ Bug: Falsy check hides valid retry_jitter_factor value of 0
The expression taskRun.empirical_policy?.retry_jitter_factor ? ... : "None" uses a truthy check. If retry_jitter_factor is 0 (a valid numeric value), it will be treated as falsy and display "None" instead of "0". The original code used explicit !== null && !== undefined checks to avoid this issue.
This should use nullish coalescing or explicit null/undefined checks instead:
{taskRun.empirical_policy?.retry_jitter_factor != null
? taskRun.empirical_policy.retry_jitter_factor.toString()
: "None"}Was this helpful? React with 👍 / 👎
| {taskRun.empirical_policy?.retry_jitter_factor | |
| {taskRun.empirical_policy?.retry_jitter_factor != null | |
| ? taskRun.empirical_policy.retry_jitter_factor.toString() | |
| : "None"} |
- Apply suggested fix
Code Review Bench PR PrefectHQ#19951 - feat(ui-v2): improve task run details page parity with Vue
Benchmark PR for Gitar evaluation
Original PR: agentic-review-benchmarks#12
feat(ui-v2): improve task run details page parity with Vue
Summary by Gitar
useStateFaviconinhooks/useStateFavicon.tsdynamically updates browser favicon based on task run state (scheduled, pending, running, completed, failed, cancelled, crashed)usePageTitle, 7 state-specific SVG favicon icons in/publicwith dark/light mode support/runs?tab=task-runs)useStateFaviconcovering state transitions, dark/light mode switching, and cleanup behaviorThis will update automatically on new commits.