Repository navigation
Read the API monitor unload button's disabled terms, not its exact spelling - #12858
Merged
Merged
Conversation
…elling #11223 added modelLoading to the unload button's disabled= (no manual unload while a model is loading), and the contract test pinned the old string, so test_monitor_can_unload_the_loaded_model fails on main. The test now reads that button's disabled= as a set of || terms and requires unloading and !data?.active_model to stay among them.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Problem
tests/studio/test_usage_examples_model_source_contract.py::test_monitor_can_unload_the_loaded_modelfails on main 9a43c1b:#11223 (model picker and reload shortcut for the API monitor) changed the Unload button to
disabled={unloading || modelLoading || !data?.active_model}, so the button stays disabled while a model is loading. That is a reasonable product change. The test pinned the exact old string, so the first PR run to pick it up (#12835's, queued from 08:15 UTC) went red.Fix
The test now finds the Unload button by its
onClick={() => void unloadActiveModel()}and reads thedisabled=right after it as a set of||terms. It requiresunloadingand!data?.active_modelto stay among them. Those two carry the original guarantee: the button is always rendered, it is disabled rather than hidden when nothing is loaded, and it cannot be pressed twice. Additional terms likemodelLoadingare allowed. The other assertions in the test are unchanged.Verification
tests/studio/test_usage_examples_model_source_contract.py: 17 passed (main: 1 failed).api-monitor-page.tsx, each fails the test:disabled={modelLoading};disabled={unloading || modelLoading}(drops the no-model case).tests/test_formatter_fixed_point.pypasses.