Skip to content

make the per-model "Sweep tunings" consent gate a routable drawer - #4807

Merged
atomantic merged 2 commits into
mainfrom
claim/issue-4803
Aug 22, 2026
Merged

make the per-model "Sweep tunings" consent gate a routable drawer#4807
atomantic merged 2 commits into
mainfrom
claim/issue-4803

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • The per-model Sweep tunings consent gate is now a routable Drawer keyed 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.
  • Only the model pair rides in the link. The runtime label, the server's tuning grid, and the generation count are re-derived from the report on every render, so a shared link always describes what the server would actually 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, the same as the measure drawer — with no grid behind it, Start is already disabled.
  • Sweep targets are matched 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 the existing entryKey built on top of it.
  • Opening either gate clears the other's params, and dismissing either clears both — a hand-edited link naming both resolves to exactly one drawer (the measure gate, which is the one that can be mid-run), rather than stacking two.

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.
  • New coverage in 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.
  • New coverage in AssessmentSweepPanel.test.jsx: the unknown-target notice appears for a stale target and stays absent for a listed one.
  • Both new guards were bypass-probed — reverting the precedence check and the param clearing each turns the corresponding test red.

Closes #4803

)

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.
@atomantic
atomantic merged commit f8ec508 into main Aug 22, 2026
7 checks passed
@atomantic
atomantic deleted the claim/issue-4803 branch August 22, 2026 03:23
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.

make the per-model "Sweep tunings" consent gate a routable drawer too

1 participant