Skip to content

fix(trajectory-replay): show absent step durations as a dash #221

Closed

Description

@lanyue-llk

Problem

Each step in the replay result page's trajectory section shows its own duration. In _detail_page in src/harness/trajectory_replay/webarena_report.py, that value is:

duration = f'{float(actual.get("duration_ms") or 0) / 1000:.2f} s' if actual else "—"

An executed step with a missing or null duration_ms therefore renders as 0.00 s in both languages. executor.py starts each record with duration_ms: None, so null is a value the trace format can hold.

#213 fixed the page-level end-to-end and CPU facts only. This case was left out because it also changes the Chinese edition.

Change

Show a dash for an executed step without a duration sample, keep a measured zero as 0.00 s, and add a test that covers both.

The synthetic replay fixtures have no indexed trace steps, so the route snapshots do not exercise this line. Add a case that does.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions