Skip to content

test(ui): app.runs.tsx's pure mapping helpers and SavedViews flow have zero direct test coverage #8701

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

apps/loopover-ui/src/routes/app.runs.test.tsx only covers the drawer's copy buttons and the
filter-bar reset control (confirmed by grep:
grep -in "SavedView|groupByDate|mapAgentRunBundle|mapSignalFidelity|mapAgentRunKind" returns
nothing). The following pure mapping helpers have zero direct test coverage:

  • mapSignalFidelity (app.runs.tsx:516-523) — 4 branches (complete → ready, degraded
    degraded, blocked → blocked, default → stale), none exercised.
  • mapAgentRunKind (:509-514) — 4 branches, none exercised.
  • mapAgentRunBundle (:458-507) — including the repo-fallback chain
    (targetRepoFullName ?? payload.repoFullName ?? input?.repoFullName ?? "unknown") and the
    counterfactuals-pooling/snapshot-replay construction, none exercised.
  • SavedViews' save/apply/remove flow (:572-670), untested.

Requirements

  • Add direct unit test coverage for mapSignalFidelity, mapAgentRunKind, and mapAgentRunBundle
    (all branches), plus a render-level test for SavedViews' save/apply/remove flow.

Deliverables

  • mapSignalFidelity is tested for all 4 branches, including the default/fallthrough case.
  • mapAgentRunKind is tested for all 4 branches.
  • mapAgentRunBundle is tested exercising each level of the repo-fallback chain
    (targetRepoFullName present, absent-falls-to-payload.repoFullName,
    absent-falls-to-input?.repoFullName, all absent-falls-to-"unknown").
  • SavedViews has a render test: save a view, confirm it appears in the list, apply it, remove
    it.

All four Deliverables are required in the same PR.

Test Coverage Requirements

apps/** is excluded from codecov/patch gating, but apps/loopover-ui's own local vitest
coverage thresholds apply — every branch listed above currently has zero coverage.

Expected Outcome

The pure mapping helpers and saved-views flow that app.runs.tsx depends on — currently entirely
untested — have direct, explicit branch coverage, protecting them from a silent future regression.

Links & Resources

  • apps/loopover-ui/src/routes/app.runs.tsx:458-523,572-670
  • apps/loopover-ui/src/routes/app.runs.test.tsx (existing test file to extend)

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

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions