Repository navigation
fix: read model hints from the visible composer only - #88
Merged
Merged
Conversation
The model hints saved with an answer (and printed by `pro browser status`) were read from the first model trigger in the document and from every visible form. A page can hold more than the composer, measured 2026-11-03: a new chat keeps the home page's composer mounted but hidden ahead of the conversation's, and "Edit message" opens a visible form inside the user turn. The hints then named the hidden composer's model, or listed lines of the message being edited that contain words such as "Pro", "latest", "high" or "auto". Text left typed in the composer was read the same way. Hints now come from the visible trigger and the form of the visible editor outside the messages, the same scope the model trigger lookup uses since #85, minus the lines typed into that editor. Verified: the new tests fail before the change (3 of 4) and pass after; npx tsc --noEmit; full suite 1867 passed, 3 skipped. On the WSL browser container tab (normal page, read-only) the old and new readers both return ["Thinking effort","Pro"]. The edited-message and hidden-composer states were not recreated live for this change. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
The previous commit replaced tests/model-hints-scope.test.ts instead of extending it, dropping its two tests: hints come from the selector and the composer rather than the sidebar, and are filtered again when an answer is saved. Both are back, on the fake page the new tests use. Verified: against main's src/chatgpt-browser.ts the file runs 3 passed and 3 failed (the three new cases); against this branch 6 passed; npx tsc --noEmit passes. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
What this touches
3 file(s), 81 line(s) changed. Tests changed. This is an automated first pass, not a review. CI is the gate; a person decides. |
Codex Review Summary: ✅ CompletedThis 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. |
youdie006
added a commit
that referenced
this pull request
Nov 10, 2026
…y) to the container image Same change as main PR #88 (merge 0834ad7), released in 0.40.51, applied to src, tests and docs without changes. The CHANGELOG lines are main's with the PR noted. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
youdie006
added a commit
that referenced
this pull request
Nov 10, 2026
0.40.51 (#88-#99) published and installed on WSL, M3 and the Mac mini; M4 was unreachable. The publish run's first attempt failed on macOS Intel (the suite's 15 minute budget) and Windows (a fixed 200 ms wait in a test); the failed jobs passed on rerun, and both causes were fixed in #100. Both browser containers now run 88a8d96. M3's colima VM had been stopped since M3 restarted and was started for the swap. Includes the live check of #96's stdio limit on the WSL container. Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
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
The "Model hints" a consult saves with its answer, and the
model_hints:line ofprodex pro browser status, were read from the first model trigger in the document and from every visible form. A page can hold more than the composer (measured 2026-11-03 in the browser container):display: none) ahead of the conversation's composer, with its own model trigger. The hints named that composer's model.Change
CHATGPT_MODEL_HINTS_JSnow reads the visible trigger outside the messages, and the form of the visible editor outside the messages, minus the lines typed into that editor. This is the same scopemodelButtonRectExpressionuses since #85. The second filter applied when an answer is saved is unchanged.Verification
tests/model-hints-scope.test.ts: three new cases (edited message, hidden composer ahead of the visible one, typed text) fail against main and pass here. The two existing cases pass on both. The first commit had replaced the file and dropped them; the second commit brings them back.npx tsc --noEmitpasses. Full suite: 1867 passed, 3 skipped (before the test restore; the restore only adds tests back).["Thinking effort","Pro"].