Skip to content

fix(studio): per-run compare timestamp appears duplicated #1044

@christso

Description

@christso

Problem

In the per-run compare view (CompareTab → Per run mode), each row's Timestamp column currently renders two lines:

  1. formatTimestamp(run.started_at) → human-friendly YYYY-MM-DD HH:MM
  2. shortenRunId(run.run_id) → shortened run id

For the common case where a run workspace directory is named after its ISO timestamp (e.g. 2026-04-01T10-00-00-000Z), both lines render something that starts with the same date, so the secondary line reads as a visual duplicate of the first. See the current docs screenshot:

https://d516ee08.agentv.pages.dev/_astro/studio-compare-per-run.DsB2C4Xo_22uUKo.png

Root cause

shortenRunId in apps/studio/src/components/CompareTab.tsx always returns only the trailing timestamp segment, discarding any experiment:: or remote:: prefix:

function shortenRunId(id: string): string {
  const parts = id.split('::');
  if (parts.length >= 2) {
    const tail = parts[parts.length - 1];
    return tail.length > 22 ? `${tail.slice(0, 10)}${tail.slice(-8)}` : tail;
  }
  return id.length > 22 ? `${id.slice(0, 10)}${id.slice(-8)}` : id;
}

So for with-skills::2026-04-01T10-00-00-000Z it drops with-skills and returns 2026-04-01…00-000Z. The prefix is only visible via the title={run.run_id} hover tooltip, and nothing visually differentiates two runs from different experiments that happen in the same minute.

Desired outcome

  • When the run id carries an experiment:: or remote:: prefix, the secondary line should surface that prefix (e.g. with-skills or remote), not throw it away.
  • When the run id is a plain timestamp with no prefix, the secondary line should either be omitted (cleanest) or show sub-minute precision — since the formatted timestamp already covers the date-and-minute case, a redundant shortened copy serves no purpose.
  • Full run id remains available on hover via the existing title attribute.

Non-goals

  • No changes to the run_id wire format or on-disk layout.
  • No changes to CompareRunEntry types or backend serialization.
  • No Aggregated matrix changes; this is per-run-view polish only.

Acceptance signals

  • Plain-timestamp runs render a single-line Timestamp cell (no visual duplicate).
  • Experiment-prefixed runs render formatTimestamp on line 1 and the experiment name on line 2.
  • Remote-prefixed runs render formatTimestamp on line 1 and remote (or equivalent source hint) on line 2.
  • Docs screenshot at apps/web/src/content/docs/docs/tools/studio.mdx is regenerated to reflect the fix.
  • Red/green UAT with fixture data covers all three run-id shapes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingin-progressClaimed by an agent — do not duplicate workwuiRelates to the browser dashboard / web UI runtime

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions