Skip to content

Read the API monitor unload button's disabled terms, not its exact spelling - #12858

Merged
danielhanchen merged 1 commit into
mainfrom
ci/monitor-unload-disabled-terms
Oct 6, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/monitor-unload-disabled-terms

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

tests/studio/test_usage_examples_model_source_contract.py::test_monitor_can_unload_the_loaded_model fails on main 9a43c1b:

assert 'disabled={unloading || !data?.active_model}' in '...api-monitor-page.tsx...'

#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 the disabled= right after it as a set of || terms. It requires unloading and !data?.active_model to 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 like modelLoading are allowed. The other assertions in the test are unchanged.

Verification

  • tests/studio/test_usage_examples_model_source_contract.py: 17 passed (main: 1 failed).
  • Sabotage on api-monitor-page.tsx, each fails the test:
    • disabled={modelLoading};
    • disabled={unloading || modelLoading} (drops the no-model case).
  • tests/test_formatter_fixed_point.py passes.

…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.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T13:11:38.053913Z 29ca387 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 29ca387d95

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 6, 2026
@danielhanchen
danielhanchen merged commit b71c11f into main Oct 6, 2026
@danielhanchen
danielhanchen deleted the ci/monitor-unload-disabled-terms branch October 6, 2026 14:08
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.

1 participant