make the per-model "Sweep tunings" consent gate a routable drawer - #4807
Merged
Conversation
) Two per-model consent gates sat on the same table row behaving differently: "Measure this model" was a Drawer whose target lived in URL search params, while its neighbour "Sweep tunings" was a Modal backed by useState — so one was shareable and reload-safe and the other evaporated on refresh. The sweep gate now reads `?sweepBackend=&sweepModel=` on /models/performance and derives everything else (runtime label, the server's tuning grid, the generation count) from that pair plus the report, the same way `measureMatch` does — so a shared link always describes what the server would run today rather than a snapshot baked into the URL. A link naming a model the report no longer lists still opens and says so, matching the measure drawer. Matching is by model, not by tuning record: a sweep is what measures the tunings, so a model with three recorded configurations is one sweep target. That coarser identity is now `modelKey`, with `entryKey` built on top of it. The batch "Measure every model" gate stays a modal on purpose — it targets no record, just a scope, so there is nothing for a deep link to reopen. Its shared consent shell shrinks to the Cancel/Start footer both gates still share.
…ar both gate targets on dismiss (#4803)
atomantic
force-pushed
the
claim/issue-4803
branch
from
August 22, 2026 03:08
bfe6843 to
217d9c9
Compare
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.
Summary
Drawerkeyed on?sweepBackend=&sweepModel=at/models/performance, matching its neighbour on the same row. Both per-model gates on a table row now behave the same way: shareable, bookmarkable, and reload-safe.modelKey, with the existingentryKeybuilt on top of it.The batch Measure every model gate stays a modal on purpose (per the issue's Out-of-scope note): it targets no record, just a scope, so there is nothing for a deep link to reopen. The consent shell the two gates shared shrinks to the Cancel/Start footer they still share.
Test plan
cd client && npm test— full jsdom suite green (731 files / 9338 tests).cd client && npm run lint— clean.LocalModelAssessments.test.jsx: opening writes the pair to the URL; a deep link opens the gate with the server's grid and no click; a model whose only rows carry tunings still resolves; an unlisted model shows the notice; cancel and start both clear the URL; a link naming both gates opens one drawer; dismissing clears both targets.AssessmentSweepPanel.test.jsx: the unknown-target notice appears for a stale target and stays absent for a listed one.Closes #4803