Repository navigation
Follow #11648's UI-scale layout and #11628's Code placement in the studio contracts - #11673
Conversation
#11648 merged with Repo tests (CPU, studio) red, and main has failed those four since: - The Images and Audio rails are now min(408px, 100% - 13rem) at the default scale, so the canvas keeps the 13rem its header column reserves. Both pages pin that exact expression through a shared RAIL_WIDTH, so they still have to match each other. - The settings dialog stacks on its own measured width (data-stacked) rather than the max-sm viewport breakpoint, which a larger interface scale does not move. The test now requires the attribute to be set and the stacking class keyed on it. - The Thinking caret is 15px at the default scale in either spelling, since the composer's lengths are now wrapped in the space scale.
|
@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. What shall we delve into next? 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". |
A full tests/studio run on main turned up five more contracts and two Playwright drivers pinned to spellings those two PRs changed on purpose: - test_update_release_notes: the update banners are 448px at the default scale, now written scale-wrapped; widths are read back through the scale before comparing. - test_ui_font_scale_contract: the CSS default lives in the fallback of the derived --ui-font-scale, and icons scale linearly with it (#11648 said so), not at half rate. - test_chat_response_details_ui_contract: response details record Code from the placement actually sent, hosted sandbox or local tools (#11628). - playwright_chat_ui / playwright_update_banner_layout: --ui-font-scale is now a calc() and an unregistered custom property reads back as that text, so float() failed ('unreadable --ui-font-scale') and the banner's 'is it scaled' string compare could no longer fail. Both resolve the scale through a length instead.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d748133bc
ℹ️ 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".
| # #11628: Code is recorded from the placement the request actually sends, a hosted sandbox or Studio's local | ||
| # python/terminal/edit_file, so an external connection without a sandbox still reports Code when it runs locally. | ||
| assert "hostedCodeToolsForThisTurn.length > 0 ||" in src | ||
| assert "studioLocalCodeTools.length > 0" in src |
There was a problem hiding this comment.
Scope the local-Code assertion to response details
When the buildResponseDetails derivation stops including local Code—for example, if its second operand is accidentally replaced with false—this assertion still succeeds because studioLocalCodeTools.length > 0 also appears later in the request-payload construction. The test therefore does not actually protect the stated external-provider/local-tool metadata behavior; require the complete hosted-or-supported-local expression within the existing builder_block instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 0aa0740: the assertion now matches the whole hosted-or-local expression inside builder_block, and replacing the second operand with false fails it.
8144aab to
0aa0740
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aa0740e20
ℹ️ 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".
|
|
||
|
|
||
| # The Create rail on Images and Audio at the default UI scale, as `_ui_source` reads it. | ||
| RAIL_WIDTH = "@[50rem]:w-[min(408px,calc(100%-13rem))]" |
There was a problem hiding this comment.
Require the rail width to retain its scale wrapper
If either media page changes the rail to the bare @[50rem]:w-[min(408px,calc(100%-13rem))], both new assertions still pass because _ui_source() normalizes the current scale-wrapped value to exactly this constant. The rail would then remain 408px at non-default UI sizes instead of growing with its text, so this needs a raw-source assertion for the --ui-space-scale wrapper in addition to the default-scale geometry check.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 1378399: both tests now also require the raw calc(408px*var(--ui-space-scale,1)) spelling, and reverting either page to a bare 408px fails its test.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 137839922a
ℹ️ 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".
| assert "unsloth-thinking-caret size-[15px]" in source | ||
| # 15px at the default UI scale; #11648 wrapped it in the space scale like the rest of the composer. | ||
| assert re.search( | ||
| r"unsloth-thinking-caret size-\[(15px|calc\(15px\*var\(--ui-space-scale,1\)\))\]", |
There was a problem hiding this comment.
Require the Thinking caret to retain its scale wrapper
If either composer is reverted to the old size-[15px] class, this alternation still passes even though the caret then remains 15px while the surrounding controls grow or shrink with the interface scale. Since the change is intended to protect the UI-scale behavior, require the calc(15px*var(--ui-space-scale,1)) form rather than accepting the unscaled fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in b8a7bb4: both composers must now carry size-[calc(15px*var(--ui-space-scale,1))], and reverting either to size-[15px] fails the test.
| #11648 wrapped these lengths in `calc(Npx*var(--ui-space-scale,1))` so they follow the interface size, which is | ||
| Npx at the default scale. Read back that way, the contract stays about the width rather than its spelling. | ||
| """ | ||
| return {_SCALED_PX.sub(r"\1", width) for width in re.findall(r"max-w-\[([^\]\s\"]+)\]", source)} |
There was a problem hiding this comment.
Pin the update-banner width scale wrapper
When all 448px widths in any update-banner source are changed back to bare max-w-[448px], _max_widths() returns the same "448px" value and the new assertions still pass. The affected banner would consequently stop widening with larger interface sizes, so retain the default-scale comparison but also assert the raw --ui-space-scale wrapper in each banner source.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in b8a7bb4: the web, Tauri and llama.cpp banners must now carry max-w-[calc(448px*var(--ui-space-scale,1))] and no bare max-w-[448px]. Reverting any one of them fails its case.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8a7bb456c
ℹ️ 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".
| assert ( | ||
| f"--ui-font-scale: calc(var(--ui-font-size-scale, {scale:g}) * var(--ui-interface-scale, 1));" | ||
| ) in INDEX_CSS | ||
| assert '"--ui-font-size-scale"' in STORE |
There was a problem hiding this comment.
Tie the font-size scale check to its non-default write
If the non-default branch changes the property passed to setVar (for example, to a misspelled name), this assertion still succeeds because the default branch independently contains setVar("--ui-font-size-scale", null), while the arithmetic assertion above also remains present. CSS would then keep using the 0.9375 fallback for every custom font size despite this contract passing; require the correct property and effectiveUiFontSize / UI_FONT_SIZE_CSS_BASE value in the same setter call.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in d74e271: the property and the effectiveUiFontSize / UI_FONT_SIZE_CSS_BASE value are now matched in one setVar call. Misspelling the property in the non-default branch fails the test.
| assert "data-stacked={stacked || undefined}" in source | ||
| assert "min-w-0 w-full data-stacked:flex-col" in source |
There was a problem hiding this comment.
Require the stacking attribute on the flex container
If data-stacked={stacked || undefined} is moved onto another element while this flex container retains data-stacked:flex-col, both substring assertions still pass, but Tailwind's data variant checks the attribute on the element carrying the class, so the dialog never stacks. Match both tokens within the same opening tag to protect the measured-width behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in d74e271: the test now reads the opening tag that carries data-stacked:flex-col and requires data-stacked and group/settings in it. Moving the attribute onto the aside fails the test.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
… the update card's scaled width (unslothai#11700) * Read the sidebar pin's width default only where matchMedia exists unslothai#11660 made use-sidebar-pin read the lg media query when it is imported, without asking whether window.matchMedia exists. Frontend tests that reach the window titlebar supply a partial window with no matchMedia, so the import threw and failed training-dataset-source-transitions.test.ts on main. With nothing to ask, keep the desktop default, as the module already does when there is no window at all, and skip the width listener. * Expect the update card's scaled width at a larger UI size unslothai#11648 made the card's max width calc(448px * var(--ui-space-scale, 1)), so at the 20px UI size it is 597px, and the layout pass still wanted 448. The pass only reached that check once unslothai#11673 made its scale probe readable.
…lacement in the studio contracts (unslothai#11673) * Follow unslothai#11648's UI-scale layout in four studio contract tests unslothai#11648 merged with Repo tests (CPU, studio) red, and main has failed those four since: - The Images and Audio rails are now min(408px, 100% - 13rem) at the default scale, so the canvas keeps the 13rem its header column reserves. Both pages pin that exact expression through a shared RAIL_WIDTH, so they still have to match each other. - The settings dialog stacks on its own measured width (data-stacked) rather than the max-sm viewport breakpoint, which a larger interface scale does not move. The test now requires the attribute to be set and the stacking class keyed on it. - The Thinking caret is 15px at the default scale in either spelling, since the composer's lengths are now wrapped in the space scale. * Cover the rest of unslothai#11648's and unslothai#11628's studio fallout A full tests/studio run on main turned up five more contracts and two Playwright drivers pinned to spellings those two PRs changed on purpose: - test_update_release_notes: the update banners are 448px at the default scale, now written scale-wrapped; widths are read back through the scale before comparing. - test_ui_font_scale_contract: the CSS default lives in the fallback of the derived --ui-font-scale, and icons scale linearly with it (unslothai#11648 said so), not at half rate. - test_chat_response_details_ui_contract: response details record Code from the placement actually sent, hosted sandbox or local tools (unslothai#11628). - playwright_chat_ui / playwright_update_banner_layout: --ui-font-scale is now a calc() and an unregistered custom property reads back as that text, so float() failed ('unreadable --ui-font-scale') and the banner's 'is it scaled' string compare could no longer fail. Both resolve the scale through a length instead. * Read the Code placement inside buildResponseDetails, not anywhere in the adapter * Pin the rail's scale wrapper as written, since the default-scale read cannot see it * Pin the scaled spelling of the Thinking caret and the update notes width * Read the font-size setter and the stacking attribute where they take effect
… the update card's scaled width (unslothai#11700) * Read the sidebar pin's width default only where matchMedia exists unslothai#11660 made use-sidebar-pin read the lg media query when it is imported, without asking whether window.matchMedia exists. Frontend tests that reach the window titlebar supply a partial window with no matchMedia, so the import threw and failed training-dataset-source-transitions.test.ts on main. With nothing to ask, keep the desktop default, as the module already does when there is no window at all, and skip the width listener. * Expect the update card's scaled width at a larger UI size unslothai#11648 made the card's max width calc(448px * var(--ui-space-scale, 1)), so at the 20px UI size it is 597px, and the layout pass still wanted 448. The pass only reached that check once unslothai#11673 made its scale probe readable.
What failed
#11648 ("scale padding, icons and widths with the UI font size, and make interface scale work in the browser") merged with
Repo tests (CPU, studio)red (job). The same four tests fail on main at6eb1b2eec:Why
In each case the product change is deliberate and the test pinned the old spelling. I ran every assertion in the two desktop tests one by one, and only the rail-width line fails in each; the rest of each contract still holds.
@[50rem]:w-[408px]min(calc(408px*scale), calc(100%-13rem)), identical on both pagesminmax(13rem,1fr)) when a larger scale grows the rail. Still 408px at the default scale where it fits.... w-full max-sm:flex-col... w-full data-stacked:flex-col,data-stacked={stacked || undefined}fromuseStackedLayout()max-sm:reads the viewport, which a larger interface scale in the browser does not move, so stacking now follows the dialog's own width.size-[15px]size-[calc(15px*var(--ui-space-scale,1))]Fix
Tests only:
test_desktop_reliability_frontend_contract.py: both rail assertions pin one sharedRAIL_WIDTH = "@[50rem]:w-[min(408px,calc(100%-13rem))]", as_ui_sourcereads it at the default scale. Images and Audio still have to match each other, and the clamp is now part of the contract.test_settings_compact_overflow_contract.py: keepsflex h-full min-h-0 min-w-0 w-full, and requires both that the attribute is set (data-stacked={stacked || undefined}) and that the stacking class is keyed on it (min-w-0 w-full data-stacked:flex-col).test_chat_thinking_compact_layout.py: accepts the caret at 15px in either spelling, raw or scale-wrapped, and names the file when it fails.Verification
min(...)clampdata-stackedthread.tsxcaret grows to 18pxSecond commit: the rest of the fallout
A full
tests/studiorun on main (6eb1b2eec) turned up more tests pinned to spellings that #11648, and one pinned to a derivation that #11628 ("Fix Code tool placement for ChatGPT subscriptions"), changed on purpose.test_update_release_notes.py::test_update_popups_share_the_notes_width(x2)max-w-[448px]max-w-[calc(448px*var(--ui-space-scale,1))]on all three banners_max_widths()reads eachmax-w-[...]back at the default scale, then requires 448px and no 400px.test_ui_font_scale_contract.py::test_css_default_scale_matches_the_store_default--ui-font-scale: 0.9375;--ui-font-scale: calc(var(--ui-font-size-scale, 0.9375) * var(--ui-interface-scale, 1));, with the store writing--ui-font-size-scaleUI_FONT_SIZE_RANGE.default / UI_FONT_SIZE_CSS_BASE, now asserted as the fallback of that derivation.test_ui_font_scale_contract.py::test_icons_follow_the_ui_font_size_itselfmin(...)icon curvecalc(1rem * var(--ui-font-scale, 1))test_chat_response_details_ui_contract.py!isExternalRequest && supportsTools && codeToolsEnabledhostedCodeToolsForThisTurn.length > 0 || (supportsStudioToolsForThisTurn && studioLocalCodeTools.length > 0)Two Playwright drivers were broken by the same change, one loudly and one silently. Since #11648,
--ui-font-scaleis acalc(), and an unregistered custom property reads back as its text: Chromium returnscalc(0.9375 * 1).playwright_chat_ui.pycalledfloat()on it and failed withchat font size theme-cycle-1/assistant: unreadable --ui-font-scale. That is Studio: scale padding, icons and widths with the UI font size, and make interface scale work in the browser #11648'sChat UI Testsfailure.playwright_update_banner_layout.pycompared the string to"0.9375".calc(...)never equals that, so its "the type is actually scaled" check always passed. It became vacuous rather than red.Both now resolve the scale through a length: a hidden probe with
width: calc(10000px * var(--ui-font-scale, 1)). In Chromium against the new rule, the default, a 20px size and a 1.1 interface scale resolve to 0.9375, 1.25 and 1.375. The banner check compares that number to the default again, so it can fail when the scale did not move.Verification for this commit:
tests/studioon the branch: 14579 passed, 143 skipped. The one error istest_mlx_context_platform_matrix.py, which does not collect on this host, whereimport unslothstops on vLLM's Transformers v5 requirement. It errors on main here too.var(--ui-font-size-scale, 1))