Skip to content

FIX: Show newest scenario executions while relationships load or fail - #3968

Merged
Roman Lutz (romanlutz) merged 1 commit into
microsoft:mainfrom
jay23606:pr-go/3967-bug-scenario-hierarchy-fallback-hides-ne
Nov 9, 2026
Merged

Roman Lutz (romanlutz) merged 1 commit into
microsoft:mainfrom
jay23606:pr-go/3967-bug-scenario-hierarchy-fallback-hides-ne

Conversation

@jay23606

Copy link
Copy Markdown
Contributor

Bug

While a scenario display group's saved result relationships are loading or have failed to load, the group shows a flat-row fallback. That fallback merged member atomic-group lists in per-member order rather than global newest-first order before applying the 100-row cap. As a result it could drop a group's newest execution while the table still said it was showing the latest 100.

Change

The component merges member attempts newest-first before the cap (frontend/src/components/Scenarios/ScenarioRunPage.tsx, already in the fix commit). This revision adds regression cases to ScenarioRunPage.test.tsx for the flat-row fallback while relationships load or fail:

  • interleaved member groups (A at 1 and 3, B at 2 and 4) show 4, 3, 2, 1, while loading
  • the 100-row cutoff keeps the newest execution (101) and drops the oldest (1), while loading and after a failed request
  • a one-member group keeps its newest 100 (control)
  • a ready hierarchy shows all 101 supplied roots with no latest-100 notice (control)

The successful hierarchy view, the request parameters, and persisted data are unchanged.

Testing

  • npm --prefix frontend test -- ScenarioRunPage.test.tsx: 40 passed, 40 total, with the fix in place.
  • npm --prefix frontend run lint -- src/components/Scenarios/ScenarioRunPage.test.tsx: exit 0.
  • npm --prefix frontend run type-check: exit 0.
  • With the sort removed from the component, npm --prefix frontend test -- ScenarioRunPage.test.tsx -t "keeps the newest execution in the latest-100 fallback" fails with Unable to find an accessible element with the role "button": 1 failed, 39 skipped. The component was restored afterwards.

Regression test: fails on base twice (/Unable to find an accessible element with the role/), passes on fix twice (npm --prefix frontend test -- ScenarioRunPage.test.tsx -t "keeps the newest execution in the latest-100 fallback")

Fixes #3967

Copilot AI balanced review requested due to automatic review settings November 5, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block the scenario-group execution ordering change.

No open issues 🎉

What changed in this PR

Fixes #3967 by ensuring scenario groups show the globally newest executions in the latest-100 fallback while saved-result relationships load or fail.

Changes:

  • Sorts attempts across member groups newest-first before applying the 100-row cap.
  • Adds regression tests for interleaved ordering and loading/error cutoff behavior.
  • Adds controls for single-member groups and the uncapped ready hierarchy.
File Description
frontend/​src/​components/​Scenarios/​ScenarioRunPage.tsx Sorts merged member attempts by timestamp before truncation.
frontend/​src/​components/​Scenarios/​ScenarioRunPage.test.tsx Tests fallback ordering, cutoff behavior, and preservation of the ready hierarchy.

Review effort: Balanced

@romanlutz Roman Lutz (romanlutz) self-assigned this Nov 9, 2026
@romanlutz Roman Lutz (romanlutz) changed the title Cover latest-100 fallback ordering while relationships load or fail FIX: Show newest scenario executions while relationships load or fail Nov 9, 2026
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 9, 2026
@romanlutz
Roman Lutz (romanlutz) removed this pull request from the merge queue due to a manual request Nov 9, 2026
@romanlutz
Roman Lutz (romanlutz) merged commit 3f9d12f into microsoft:main Nov 9, 2026
61 checks passed
@jay23606
Jay (jay23606) deleted the pr-go/3967-bug-scenario-hierarchy-fallback-hides-ne branch November 13, 2026 21:20
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.

BUG: Scenario hierarchy fallback hides newer executions while claiming latest 100

3 participants