Skip to content

fix: read model hints from the visible composer only - #88

Merged
youdie006 merged 2 commits into
mainfrom
fix/model-hints-composer
Nov 9, 2026
Merged

youdie006 merged 2 commits into
mainfrom
fix/model-hints-composer

Conversation

@youdie006

Copy link
Copy Markdown
Owner

Problem

The "Model hints" a consult saves with its answer, and the model_hints: line of prodex 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):

  • After a new chat, the home page's composer stays mounted but hidden (display: none) ahead of the conversation's composer, with its own model trigger. The hints named that composer's model.
  • "Edit message" opens a visible form inside the user turn. Every line of the message being edited that contains a word such as "Pro", "latest", "high" or "auto" was saved as a hint.
  • Text left typed in the composer was read the same way.

Change

CHATGPT_MODEL_HINTS_JS now 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 scope modelButtonRectExpression uses 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 --noEmit passes. Full suite: 1867 passed, 3 skipped (before the test restore; the restore only adds tests back).
  • WSL browser container, normal conversation page, read-only: the old and new readers both return ["Thinking effort","Pro"].
  • Not done: the edited-message and hidden-composer states were not recreated live for this change. Their structure comes from the 2026-11-03 measurements behind fix: skip an open message editor when looking for the model trigger #85 and fix: read tool state from the composer the prompt is typed into #86.

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
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

What this touches

  • browser adapter
  • tests

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T01:02:59.256371Z 81d8a57 PR opened
ℹ️ 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.

@youdie006
youdie006 merged commit 0834ad7 into main Nov 9, 2026
7 checks passed
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
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