Repository navigation
MAINT: split ScenarioDetail state into hooks and sections - #3526
Merged
Roman Lutz (romanlutz) merged 9 commits intoNov 6, 2026
Merged
Roman Lutz (romanlutz) merged 9 commits into
Roman Lutz (romanlutz) merged 9 commits into
Conversation
Changing max concurrency or max retries rebuilt an identical estimate request object, which re-triggered the estimate effect and re-POSTed the same estimate after the debounce. Drive the effect off the request key instead.
Contributor
Author
|
Good catch. Fixed in b2d8057, the estimate effect now keys off the request key instead of the request object, so changing max concurrency or max retries no longer re-POSTs the same estimate. Added a test for it. |
This was referenced Oct 31, 2026
Resolves the ScenarioDetail.tsx conflict against the preset one-click launch (microsoft#3490) and the objective-scorer and prompt support (microsoft#3584) that landed on main. Both features touched the monolithic launch form that this branch split into hooks and sections, so the feature logic is folded into the extracted pieces: the preset scenario-param merge, objective scorer, and supportsPrompt handling go into scenarioLaunchRequest, the preset technique and param seeding into scenarioLaunchForm with preset tokens preserved across reselection, the pinned-token tags into ScenarioTechniqueSection, and the objective-scorer and carried-param rows into ScenarioRunPreviewDialog. The preset fetch moves into a useScenarioPreset hook mirroring useScenarioDetail.
Utkarsh Bahuguna (u7k4rs6)
requested a review
from Richard Lundeen (richlundeen)
November 2, 2026 08:52
This was referenced Nov 4, 2026
Main landed four more feature PRs in the old monolithic ScenarioDetail.tsx (consolidated history, last-used defaults, scan results routes, contextual help). They are folded into the split modules instead: saved-run seeding goes to the form initializer, help labels and the unavailable-estimate message to ScenarioEstimateSection, the identity toggle to ScenarioTechniqueSection, and the saved-run guards, routes, remembered scan targets and help fields to ScenarioDetail.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore initial carried-parameter ownership and cover preset and saved-run refresh transitions. Replace ineffective unmount assertions with mounted stale-response regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Richard Lundeen (richlundeen)
approved these changes
Nov 6, 2026
Richard Lundeen (richlundeen)
left a comment
Contributor
There was a problem hiding this comment.
Automated review completed. No blocking concerns remain. This review records source coverage; it does not authorize merge.
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ScenarioDetail owned loading, the launch form, debounced estimates and launch confirmation all in one 1700 line component.
This moves loading into useScenarioDetail, the related form fields into a reducer, estimates into useScenarioRunEstimate (debounce and stale answers) and the confirm/launch flow into useScenarioLaunch (one run per double click).
The estimate and the run request are now built from the same launch input, and the technique list, estimate summary and run preview are their own components.
Nothing changes for the user: the existing ScenarioDetail tests pass untouched, and there are new focused tests for each piece.
Fixes #2653