Skip to content

FIX: Keep QUEUED in scenario history status filters (#3744) - #3815

Merged
Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
shawnrruss:fix/3744-queued-history-filter
Nov 6, 2026
Merged

Roman Lutz (romanlutz) merged 3 commits into
microsoft:mainfrom
shawnrruss:fix/3744-queued-history-filter

Conversation

@shawnrruss

Copy link
Copy Markdown
Contributor

Description

Fixes #3744.

SCENARIO_RUN_STATES in scenarioHistoryFilters.ts listed every persisted run state except QUEUED. As a result:

  • the History status filter never offered QUEUED, and
  • a shared URL with status=QUEUED lost its status filter, so the history request went out without run_statuses.

The list is now built from a map checked with satisfies Record<ScenarioRunState, ScenarioRunState>, so TypeScript fails if the ScenarioRunState union and the list drift apart again. QUEUED sits between CREATED and IN_PROGRESS to follow the run lifecycle; the other states keep their order.

Tests and Documentation

  • scenarioHistoryFilters.test.ts: the test that treated QUEUED as invalid now expects it to be kept (UNKNOWN is still dropped); the round-trip test lists all six states explicitly; new test: a QUEUED-only URL keeps statuses: ['QUEUED'].
  • ScenarioHistory.test.tsx: new test: a QUEUED-only URL filter sends run_statuses: ['QUEUED'] to listRuns.
  • Ran from frontend/: npx jest --runInBand History (8 suites, 140 tests passed), npm run type-check and npm run lint (clean).
  • No documentation changes needed.

🤖 Generated with Claude Code

SCENARIO_RUN_STATES omitted the persisted QUEUED state, so the History
status filter never offered it and a QUEUED-only shared URL lost its
status filter. Build the list from a map checked against
ScenarioRunState so the union and the list cannot drift again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shawnrruss

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Copilot AI balanced review requested due to automatic review settings November 3, 2026 21:43

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 are reported for the queued-status filtering change.

No open issues 🎉

What changed in this PR

Fixes #3744 by including QUEUED in scenario history status filters, so queued runs can be selected and shared URL filters retain the intended API request scope.

Changes:

  • Adds QUEUED in lifecycle order and checks the status map against ScenarioRunState.
  • Updates filter tests to cover all six states and preserve QUEUED-only URLs.
  • Adds a component regression test verifying run_statuses: ['QUEUED'] reaches listRuns.
File Description
frontend/​src/​components/​History/​scenarioHistoryFilters.ts Adds QUEUED and a type-checked status map.
frontend/​src/​components/​History/​scenarioHistoryFilters.test.ts Verifies valid statuses, full round-tripping, and QUEUED-only URL parsing.
frontend/​src/​components/​History/​ScenarioHistory.test.tsx Verifies the queued-only API request and reorganizes imports.

Review effort: Balanced

@romanlutz Roman Lutz (romanlutz) self-assigned this Nov 5, 2026
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 6, 2026
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 6, 2026
Merged via the queue into microsoft:main with commit 81643d2 Nov 6, 2026
53 checks passed
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.

Scanner history omits persisted QUEUED runs from status options and silently drops QUEUED-only shared filters

3 participants