Skip to content

fix(ui): avoid renormalizing unchanged model names - #198535

Merged
steipete merged 1 commit into
mainfrom
fix/ci-435270-model-label-memo
Nov 14, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/ci-435270-model-label-memo

Conversation

@steipete

@steipete steipete commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Unrelated translation registration makes a retained model picker normalize unchanged model names again.

User Impact

The picker keeps its existing labels and live updates while avoiding repeated work for unchanged names.

Why This Change Was Made

The row's name attribute shared a reactive computation with translated presentation fields. Memoize the name from its existing formatter so route text can refresh without reprocessing unchanged names. The inline normalization dates to the Solid composer migration (07384e0, #168779); the existing retained-view regression exposes it on current main.

Evidence

  • ui/src/pages/new-session/model-control-view.test.tsx → keeps one mounted model view live without depending on draft revisions fails on the base and passes with this change.
  • The warm retained-view workload reduces unchanged-name normalization from 1 call on the base to 0 calls with the fix. This is a work-count invariant; no latency claim is made.
  • All four model-control-view cases pass, including live runtime-label and search updates.
  • Focused UI typecheck, lint, and format checks pass.
  • Independent Codex review: no actionable P0–P2 findings.

CI: exact-head run 43537528113 completed with 16 inherited UI-unit failures in two jobs: responsive layout (#198532), hosted and pane controls (#198534), draft titles (#198516), and the semantic model-option assertion (#198546). The original signatures or independently reproduced later-main defect match the unchanged baseline sources. These are attributed separately from this repair; landing uses the authorized inherited-failure route and retains failed CI.

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review November 14, 2026 00:57
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Contributor
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-14T00:59:29.774597Z 0101215 Draft marked ready
ℹ️ 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR memoizes normalized model names independently of translated row presentation.

Example: An unrelated English translation catalog registers while the picker retains the GPT 5.5 row.

  • Before: The existing regression records one unnecessary normalization of GPT 5.5.
  • After: The PR reports zero repeated normalizations while retaining live labels and search updates.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and appears correct, with an established regression and reported base/head validation; required runtime evidence remains test-only.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: A retained model picker repeats unchanged-name processing when unrelated route translations register.
Reason: The maintainer-authored direction addresses an established work-count invariant with a narrowly scoped change and preserves existing visible behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it narrowly fixes an established model-picker work-count failure still present on main, and no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 01012152a0c6215a47a6b42f18ee8fb20b430d78

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted browser diagnostics or live output from the built Control UI showing unrelated translation registration no longer normalizes an unchanged retained model name while runtime-label and search updates remain live.
Agent review details

How this fits together

Chat and New Session share the model-picker renderer, which turns catalog entries and translated presentation into selectable rows and searchable attributes.

flowchart LR
  A[Model catalog entry] --> B[Model label formatter]
  B --> C[Normalized name memo]
  C --> D[Model row attributes]
  E[Translation registration] --> F[Translated presentation]
  F --> D
Loading

Technical review

Best possible solution:

Keep the normalized name as a narrow derivation in the existing row component, preserving translated presentation and the existing retained-view regression.

Do we have a high-confidence way to reproduce the issue?

The scheduled-main failure and existing retained-view test identify the exact translation-registration trigger and unnecessary normalization; source confirms the responsible dependency remains on fetched main, and no target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete repair: it isolates normalization from translated presentation using the existing formatter and component lifetime, without adding another owner or changing selection policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5e1bb26e340c.

Provenance checked

  • Model-name normalization and reactive row presentation keeps the original intent (07384e0: The Solid composer migration preserved model labels, selectors, and shared Chat/New Session rendering; subsequent row-level performance work narrowed unrelated invalidations.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit fdf6d47 adds ui/src/pages/chat/components/chat-model-picker-options.tsx:115 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fdf6d47e645b; files: ui/src/pages/chat/components/chat-model-picker-options.tsx)
  • Vyctor H. Brzezowski: Raw commit eb54b6c adds ui/src/pages/chat/components/chat-model-picker-options.tsx:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: eb54b6cb013f; files: ui/src/pages/chat/components/chat-model-picker-options.tsx)
  • Alix-007: Raw commit cd61ce3 adds ui/src/pages/chat/components/chat-model-picker-options.tsx:226 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: cd61ce32dd28; files: ui/src/pages/chat/components/chat-model-picker-options.tsx)

PR surface

Source +1. Total +1 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 1 +1

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This fixes a confirmed, limited model-picker computation defect without evidence of an urgent user-facing regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 8:12 PM ET / November 14, 2026, 01:12 UTC.

@steipete
steipete merged commit 793c22c into main Nov 14, 2026
162 of 168 checks passed
@steipete
steipete deleted the fix/ci-435270-model-label-memo branch November 14, 2026 02:43
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant